:root {
  --bg: #eef2ff;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --line: rgba(47, 73, 196, 0.18);
  --text: #111111;
  --muted: #4f5f9b;
  --accent: #4566f2;
  --accent-strong: #2f49c4;
  --accent-soft: rgba(69, 102, 242, 0.12);
  --gold: #d9ab4e;
  --gold-soft: rgba(217, 171, 78, 0.18);
  --warn: #b45309;
  --shadow: 0 24px 60px rgba(47, 73, 196, 0.14);
  --round-rows: 12;
  --round-columns: 1;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(69, 102, 242, 0.2), transparent 34%),
    radial-gradient(circle at bottom right, rgba(217, 171, 78, 0.18), transparent 30%),
    linear-gradient(180deg, #f8f9ff 0%, var(--bg) 100%);
}

.page-shell {
  width: calc(100% - 32px);
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero,
.panel,
.sub-panel {
  backdrop-filter: blur(10px);
}

.top-bar {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  min-height: 250px;
  padding: 30px 34px;
  border: 1px solid rgba(168, 85, 247, 0.55);
  border-radius: 18px;
  background:
    linear-gradient(105deg, rgba(8, 8, 12, 0.92) 0%, rgba(10, 11, 18, 0.88) 48%, rgba(22, 22, 28, 0.55) 100%),
    repeating-linear-gradient(-8deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 11px),
    linear-gradient(135deg, #111111, #252038 58%, #151515);
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.28);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 18px 22px auto 170px;
  height: 52px;
  transform: rotate(-4deg);
  background:
    linear-gradient(90deg, transparent 0 4%, rgba(168, 85, 247, 0.96) 10% 86%, transparent 96%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 7px);
  opacity: 0.92;
}

.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 18px;
  border: 1px solid rgba(168, 85, 247, 0.42);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(18, 18, 28, 0.96), rgba(31, 27, 48, 0.94)),
    repeating-linear-gradient(-12deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 9px);
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.2);
}

.top-action-button {
  width: fit-content;
  min-height: 42px;
  padding: 10px 16px;
}

.top-actions .ghost-button {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.42);
}

.top-actions .primary-button {
  background: linear-gradient(135deg, #34d399, #a855f7);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-phase2-group-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.draw-eight-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.42);
  background: rgba(255, 255, 255, 0.9);
  color: #0f766e;
  font-size: clamp(0.72rem, 1vw, 0.92rem);
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(47, 73, 196, 0.12);
}

.draw-eight-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #10b981;
}

.tournament-finished .top-actions {
  justify-content: center;
}

.hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 24px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.hero.has-side-blocks .hero-main {
  flex: 0 1 calc(50% - 12px);
}

.hero-pecko-slot,
.hero-winners-slot,
.hero-action-slot {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  display: grid;
  gap: 10px;
}

.hero-pecko-slot {
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(220, 252, 231, 0.9));
  border: 1px solid rgba(52, 211, 153, 0.48);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.hero-winners-slot {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.hero-action-slot {
  place-items: center end;
  display: grid;
}

.hero-next-button {
  width: fit-content;
  min-height: 44px;
  padding: 10px 16px;
  font-size: clamp(0.9rem, 1.2vw, 1.15rem);
  box-shadow: 0 10px 24px rgba(47, 73, 196, 0.18);
}

.hero.has-action .hero-action-slot {
  display: grid !important;
  visibility: visible;
  opacity: 1;
}

.hero-pecko-card {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-size: clamp(1.45rem, 2.2vw, 2.2rem);
}

.hero-pecko-player {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.3rem, 1.8vw, 1.8rem);
  text-transform: uppercase;
}

.hero-pecko-list-label {
  display: inline-flex;
  align-items: center;
  color: #14532d;
  font-size: clamp(1.35rem, 1.75vw, 1.7rem);
  font-weight: 900;
  text-transform: uppercase;
}

.hero-pecko-number {
  min-width: 64px;
  min-height: 64px;
  padding: 8px 12px;
  border-radius: 13px;
  background: linear-gradient(135deg, #ffffff, #dcfce7);
  border: 2px solid rgba(52, 211, 153, 0.72);
  color: #14532d;
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: clamp(2rem, 2.8vw, 2.65rem);
  font-weight: 950;
}

.pecko-title {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(217, 171, 78, 0.24);
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.winner-card-header {
  min-height: 100%;
  display: grid;
  gap: 10px;
  align-content: center;
  justify-items: center;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(220, 252, 231, 0.92));
  border: 1px solid rgba(52, 211, 153, 0.48);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  font-size: clamp(1rem, 1.45vw, 1.35rem);
}

.winner-card-empty {
  opacity: 0.4;
}

.winner-card-empty strong {
  display: none;
}

.winner-card-header strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 58px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(69, 102, 242, 0.14), rgba(217, 171, 78, 0.18));
  border: 1px solid rgba(217, 171, 78, 0.34);
  color: var(--accent-strong);
  font-size: clamp(2rem, 2.65vw, 2.55rem);
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.winner-title {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #166534, #22c55e);
  color: #ffffff;
  font-size: clamp(0.68rem, 0.9vw, 0.86rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1;
  overflow: hidden;
  text-overflow: clip;
  text-align: center;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: auto 28px 18px auto;
  width: min(42%, 430px);
  height: 68px;
  transform: rotate(-5deg);
  background:
    linear-gradient(90deg, transparent 0 3%, rgba(52, 211, 153, 0.9) 12% 78%, transparent 94%),
    repeating-linear-gradient(0deg, rgba(17, 17, 17, 0.22) 0 2px, transparent 2px 8px);
  opacity: 0.9;
}

.hero-logo-wrap {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 142px;
  height: 142px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding: 8px;
  background: rgba(8, 8, 12, 0.72);
  border: 3px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.36),
    0 0 0 5px rgba(168, 85, 247, 0.32);
}

.hero-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.hero-copy {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 10px;
  padding: 8px 18px;
  transform: rotate(-3deg);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(0.9rem, 1.25vw, 1.18rem);
  font-weight: 950;
  color: #06120d;
  background: linear-gradient(90deg, #34d399, #10b981);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.38);
}

.hero h1 {
  margin: 0;
  max-width: 13ch;
  color: #ffffff;
  font-size: clamp(3rem, 7.2vw, 6.8rem);
  font-weight: 950;
  line-height: 0.82;
  text-transform: uppercase;
  text-shadow:
    0 4px 0 #a855f7,
    0 10px 22px rgba(0, 0, 0, 0.5);
}

.hero-text {
  width: fit-content;
  margin: 18px 0 0;
  padding: 4px 16px;
  max-width: 62ch;
  color: #ffffff;
  background: rgba(17, 17, 17, 0.72);
  font-size: 0;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-text::before {
  content: "Palet Plab";
  font-size: clamp(1rem, 1.65vw, 1.5rem);
}

.hero-badge {
  position: relative;
  z-index: 1;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(160deg, var(--accent), var(--accent-strong));
  color: white;
  min-width: 180px;
  border: 2px solid rgba(217, 171, 78, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.hero-badge span,
.hero-badge strong {
  display: block;
}

.hero-badge span {
  opacity: 0.8;
  font-size: 0.82rem;
}

.hero-badge strong {
  margin-top: 8px;
  font-size: 1.2rem;
}

.single-layout {
  margin-top: 22px;
}

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

.panel {
  padding: 22px;
}

.screen-panel {
  width: 100%;
  max-width: none;
  margin: 0;
}

.round-stage-panel {
  margin-top: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.round-stage-panel .panel-head,
.round-stage-panel .status-banner {
  display: none;
}

.sub-panel {
  padding: 18px;
  background: var(--panel-strong);
}

.panel-head,
.sub-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.panel-head h2,
.sub-panel-head h3 {
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.field span {
  font-weight: 600;
}

input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(47, 73, 196, 0.18);
  background: white;
  color: var(--text);
  font: inherit;
}

.score-input {
  text-align: center;
  font-weight: 800;
  appearance: textfield;
  -moz-appearance: textfield;
}

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

input:focus {
  outline: 2px solid rgba(69, 102, 242, 0.18);
  border-color: var(--gold);
}

.score-winner {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(22, 163, 74, 0.45);
  color: #166534;
}

.score-loser {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(220, 38, 38, 0.35);
  color: #b91c1c;
}

.score-invalid {
  background: rgba(217, 171, 78, 0.16);
  border-color: rgba(217, 171, 78, 0.52);
  color: #9a6700;
}

.score-input:disabled {
  opacity: 1;
  cursor: default;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  transition: transform 150ms ease, opacity 150ms ease, background 150ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  border: 1px solid rgba(217, 171, 78, 0.7);
}

.ghost-button {
  background: linear-gradient(135deg, rgba(69, 102, 242, 0.1), rgba(217, 171, 78, 0.16));
  color: var(--accent-strong);
}

.danger-button {
  background: linear-gradient(135deg, #151515, #2a2a2a);
  color: white;
  border: 1px solid rgba(217, 171, 78, 0.5);
}

.teams-form {
  margin-top: 8px;
}

.screen-text {
  margin: 16px 0 0;
  color: var(--muted);
}

.team-inputs {
  display: grid;
  gap: 12px;
  max-height: 460px;
  overflow: auto;
  padding-right: 6px;
}

.registry-panel {
  margin-top: 20px;
}

.form-end-actions {
  justify-content: center;
  margin-top: 24px;
}

.registry-row,
.legend-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.registry-id {
  display: inline-flex;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(69, 102, 242, 0.12), rgba(217, 171, 78, 0.18));
  color: var(--accent-strong);
  font-weight: 700;
  border: 1px solid rgba(217, 171, 78, 0.3);
}

.registry-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.message {
  min-height: 24px;
  margin-top: 16px;
  color: var(--warn);
  font-weight: 600;
}

.status-banner {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(69, 102, 242, 0.1), rgba(217, 171, 78, 0.14));
  color: var(--accent-strong);
  font-weight: 700;
  border: 1px solid rgba(217, 171, 78, 0.35);
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(69, 102, 242, 0.08), rgba(217, 171, 78, 0.16));
  font-size: 0.86rem;
  border: 1px solid rgba(217, 171, 78, 0.22);
}

.victory-groups-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.victory-group-card {
  min-height: 220px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(217, 171, 78, 0.28);
  background: linear-gradient(135deg, rgba(240, 244, 255, 0.94), rgba(255, 250, 241, 0.94));
  box-shadow: 0 12px 28px rgba(47, 73, 196, 0.08);
}

.victory-group-card h3 {
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-size: 1.05rem;
}

.victory-group-card.is-selectable {
  border-color: rgba(69, 102, 242, 0.3);
}

.victory-group-card.is-selected {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 16px 34px rgba(34, 197, 94, 0.12);
  background: linear-gradient(135deg, rgba(230, 255, 241, 0.92), rgba(240, 244, 255, 0.95));
}

.group-status-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.group-status-pill {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(69, 102, 242, 0.1);
  color: var(--accent-strong);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.74rem;
}

.group-status-pill.status-finished {
  background: rgba(34, 197, 94, 0.16);
  color: #166534;
}

.victory-group-card .chip-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: flex-start;
}

.victory-group-card .chip {
  font-size: 1rem;
  font-weight: 700;
  justify-content: center;
  text-align: center;
}

.phase2-round-grid {
  gap: 8px;
}

.phase2-group-divider {
  min-height: 82px;
  display: grid;
  place-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(69, 102, 242, 0.22);
  background: linear-gradient(135deg, rgba(69, 102, 242, 0.14), rgba(217, 171, 78, 0.18));
  box-shadow: 0 8px 20px rgba(47, 73, 196, 0.08);
}

.phase2-group-divider-label {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4566f2, #2f49c4);
  color: #ffffff;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  box-shadow: 0 10px 24px rgba(47, 73, 196, 0.22);
}

.third-place-divider {
  min-height: 82px;
  display: grid;
  place-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(217, 171, 78, 0.34);
  background: linear-gradient(135deg, rgba(217, 171, 78, 0.2), rgba(168, 85, 247, 0.16));
  box-shadow: 0 8px 20px rgba(47, 73, 196, 0.08);
}

.third-place-divider-label {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d9ab4e, #a855f7);
  color: #ffffff;
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  box-shadow: 0 10px 24px rgba(168, 85, 247, 0.2);
}

.phase2-pecko-card {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(240, 244, 255, 0.94), rgba(255, 250, 241, 0.94));
  box-shadow: 0 8px 20px rgba(47, 73, 196, 0.06);
  background: linear-gradient(135deg, rgba(217, 171, 78, 0.18), rgba(69, 102, 242, 0.08));
  border: 1px solid rgba(217, 171, 78, 0.26);
}

.phase2-pecko-card strong {
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1;
  text-align: center;
}

.phase2-pecko-number {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 58px;
  min-height: 58px;
  padding: 6px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.22), rgba(220, 252, 231, 0.98));
  border: 1px solid rgba(22, 101, 52, 0.32);
  color: #166534;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.phase2-pecko-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 86px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(22, 101, 52, 0.14);
  color: #166534;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.phase2-pecko-label {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-strong);
}

.group-card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 42px;
  margin-top: 14px;
}

.group-select-button {
  min-height: 38px;
  padding: 9px 14px;
}

.group-status-note {
  color: var(--muted);
  font-size: 0.86rem;
  text-align: right;
}

.tournament-actions {
  margin-top: 12px;
}

.bottom-actions {
  justify-content: center;
  margin-top: 12px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.overlay[hidden] {
  display: none !important;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  backdrop-filter: blur(4px);
}

.overlay-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(217, 171, 78, 0.4);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.22);
}

.podium-overlay-card {
  width: min(1360px, 100%);
}

.podium-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  gap: 18px;
  align-items: end;
  margin-top: 22px;
}

.reset-confirm-card {
  width: min(460px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
  border-color: rgba(185, 28, 28, 0.34);
  background: linear-gradient(135deg, #ffffff, #fff7ed);
}

.reset-confirm-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  color: #ffffff;
  font-size: 2.8rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 12px 26px rgba(185, 28, 28, 0.22);
}

.reset-confirm-card h2 {
  margin: 0;
  color: #991b1b;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  text-transform: uppercase;
}

.reset-confirm-card p {
  margin: 0;
  color: #111111;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-weight: 800;
}

.reset-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.reset-confirm-actions button {
  min-width: 110px;
  min-height: 44px;
}

.podium-grid {
  display: grid;
  grid-template-columns: repeat(var(--podium-columns, 4), minmax(0, 1fr));
  gap: 20px;
  margin-top: 0;
}

.podium-hero-figure {
  width: min(100%, 220px);
  max-height: 360px;
  object-fit: contain;
  align-self: end;
  justify-self: center;
  filter: drop-shadow(0 18px 24px rgba(17, 17, 17, 0.22));
}

.podium-card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(217, 171, 78, 0.34);
  background: linear-gradient(135deg, rgba(240, 244, 255, 0.95), rgba(255, 250, 241, 0.95));
}

.podium-card h3 {
  margin: 0 0 18px;
  color: var(--accent-strong);
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.podium-places {
  display: grid;
  gap: 14px;
}

.podium-place {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(47, 73, 196, 0.12);
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
}

.podium-place strong {
  font-size: clamp(1.9rem, 2.7vw, 2.6rem);
  line-height: 1;
}

.podium-place-1 {
  background: linear-gradient(135deg, rgba(217, 171, 78, 0.28), rgba(255, 255, 255, 0.86));
  border-color: rgba(217, 171, 78, 0.54);
}

.podium-place-2 {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.22), rgba(255, 255, 255, 0.86));
}

.podium-place-3 {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.16), rgba(255, 255, 255, 0.86));
}

.podium-rank {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 72px;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(69, 102, 242, 0.1);
  color: var(--accent-strong);
  font-weight: 900;
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
}

.podium-trophy {
  font-size: 1.15em;
  line-height: 1;
}

.final-standings-panel {
  margin-top: 20px;
}

.single-column-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.current-round-card {
  margin-top: 18px;
}

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

.standings-table th,
.standings-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.standings-table th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(217, 171, 78, 0.35);
}

.rounds-list {
  display: grid;
  gap: 14px;
}

.round-card {
  border: 1px solid rgba(47, 73, 196, 0.16);
  border-radius: 18px;
  padding: 16px;
  background: white;
  box-shadow: 0 12px 32px rgba(47, 73, 196, 0.08);
}

.round-grid {
  display: grid;
  grid-template-columns: repeat(var(--round-columns), minmax(0, 1fr));
  align-content: start;
  grid-auto-rows: 158px;
  gap: 12px;
}

.round-view {
  margin-top: 0;
}

.round-card h4 {
  margin: 0 0 12px;
}

.round-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  margin-bottom: 12px;
}

.match-card,
.pecko-card {
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(240, 244, 255, 0.9), rgba(255, 250, 241, 0.9));
  border: 1px solid rgba(217, 171, 78, 0.22);
}

.match-card {
  height: 158px;
}

.match-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.group-label {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(69, 102, 242, 0.12), rgba(217, 171, 78, 0.2));
  border: 1px solid rgba(217, 171, 78, 0.28);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.9rem;
}

.duel-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  height: 100%;
}

.board-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  border-radius: 8px;
  background: url("assets/planche-badge.svg") center / cover no-repeat;
  color: #2b1405;
  font-weight: 900;
  font-size: 1.7rem;
  line-height: 1;
  border: 0;
  box-shadow: 0 2px 6px rgba(47, 35, 21, 0.16);
  text-shadow: 0 1px 0 rgba(255, 236, 205, 0.78);
}

.duel-player {
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(47, 73, 196, 0.12);
}

.player-pick {
  width: 100%;
  min-height: 86px;
  text-align: left;
  color: inherit;
}

.player-pick:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(217, 171, 78, 0.52);
  box-shadow: 0 12px 24px rgba(47, 73, 196, 0.12);
}

.duel-player-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

.duel-button {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
}

.duel-versus {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--accent-strong);
}

.result-pill {
  display: inline-flex;
  min-width: 30px;
  justify-content: center;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1;
}

.result-win {
  background: #15803d;
  color: #ffffff;
}

.result-loss {
  background: #b91c1c;
  color: #ffffff;
}

.result-pending {
  background: rgba(69, 102, 242, 0.1);
  color: var(--accent-strong);
}

.winner-card {
  border-color: rgba(21, 128, 61, 0.72);
  background: rgba(21, 128, 61, 0.22);
}

.loser-card {
  border-color: rgba(185, 28, 28, 0.72);
  background: rgba(185, 28, 28, 0.2);
}

.match-row {
  display: grid;
  grid-template-columns: 110px 92px 28px 92px 110px;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.team-id-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 8px 11px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(69, 102, 242, 0.12), rgba(217, 171, 78, 0.18));
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1;
  border: 1px solid rgba(217, 171, 78, 0.28);
}

.score-separator {
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.match-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.pecko-card {
  background: linear-gradient(135deg, rgba(217, 171, 78, 0.18), rgba(69, 102, 242, 0.08));
}

.finished-panel {
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 20px;
  border: 1px solid rgba(217, 171, 78, 0.34);
  background: linear-gradient(135deg, rgba(217, 171, 78, 0.18), rgba(69, 102, 242, 0.1));
  color: var(--accent-strong);
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.empty-state {
  color: var(--muted);
  margin: 0;
}

body.round-mode {
  height: 100vh;
  overflow: hidden;
}

.round-mode .page-shell {
  height: 100vh;
  padding: 6px 0 10px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.round-mode .top-bar {
  grid-template-columns: minmax(0, 3fr) minmax(180px, 1fr);
  gap: 6px;
}

.round-mode .hero {
  min-height: 0;
  padding: 8px 12px;
  border-radius: 18px;
  gap: 10px;
}

.round-mode .top-actions {
  padding: 8px;
  border-radius: 18px;
  gap: 6px;
}

.round-mode .top-action-button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: clamp(0.72rem, 1vw, 0.95rem);
}

.round-mode .hero-phase2-group-actions {
  gap: 6px;
}

.round-mode .phase2-group-button {
  min-height: 32px;
  min-width: 38px;
  padding: 6px 10px;
  font-size: clamp(0.86rem, 1.05vw, 1rem);
}

.round-mode .draw-eight-option {
  min-height: 32px;
  padding: 6px 10px;
  font-size: clamp(0.62rem, 0.8vw, 0.78rem);
}

.round-mode .draw-eight-option input {
  width: 16px;
  height: 16px;
}

.round-mode .hero-main {
  gap: 12px;
}

.round-mode .hero-logo-wrap {
  width: 66px;
  height: 66px;
  padding: 4px;
}

.round-mode .eyebrow {
  margin-bottom: 2px;
  font-size: 0.62rem;
}

.round-mode .hero h1 {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.round-mode .hero-text {
  display: none;
}

.round-mode .hero-pecko-slot,
.round-mode .hero-winners-slot,
.round-mode .hero-action-slot {
  gap: 6px;
}

.round-mode .hero-pecko-slot {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 12px;
}

.round-mode .hero-winners-slot {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.round-mode .hero-pecko-card,
.round-mode .winner-card-header {
  min-height: 0;
  padding: 6px 10px;
  gap: 6px;
  font-size: clamp(0.85rem, 1.05vw, 1.05rem);
}

.round-mode .winner-card-header strong {
  min-width: 40px;
  min-height: 40px;
  padding: 4px 8px;
  border-radius: 9px;
  font-size: clamp(1.35rem, 1.7vw, 1.75rem);
  font-weight: 950;
}

.round-mode .pecko-title,
.round-mode .winner-title {
  padding: 4px 8px;
  font-size: clamp(0.54rem, 0.72vw, 0.68rem);
}

.round-mode .hero-pecko-card {
  flex: 0 0 auto;
  font-size: clamp(0.86rem, 1vw, 1rem);
}

.round-mode .hero-pecko-list-label {
  font-size: clamp(1.05rem, 1.25vw, 1.25rem);
}

.round-mode .hero-pecko-player {
  gap: 7px;
  font-size: clamp(0.9rem, 1.05vw, 1.08rem);
}

.round-mode .hero-pecko-number {
  min-width: 42px;
  min-height: 42px;
  padding: 5px 8px;
  border-radius: 10px;
  border-width: 1px;
  font-size: clamp(1.35rem, 1.7vw, 1.7rem);
}

.round-mode .hero-pecko-card .result-pill {
  min-width: 24px;
  padding: 2px 6px;
  font-size: clamp(0.82rem, 0.95vw, 0.95rem);
}

.round-mode .winner-title {
  white-space: nowrap;
  font-size: 0.52rem;
  letter-spacing: 0;
}

.round-mode .single-layout {
  min-height: 0;
  margin-top: 0;
}

.round-mode .round-stage-panel {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding-bottom: 6px;
}

.round-mode .round-view {
  min-height: 0;
}

.round-mode .victory-groups-grid {
  height: 100%;
  gap: 8px;
}

.round-mode .victory-group-card {
  min-height: 0;
  padding: 10px;
  border-radius: 14px;
}

.round-mode .victory-group-card h3 {
  margin-bottom: 8px;
  font-size: clamp(0.9rem, 1.2vw, 1.15rem);
}

.round-mode .group-status-line {
  margin-bottom: 8px;
  font-size: clamp(0.72rem, 0.95vw, 0.88rem);
}

.round-mode .group-status-pill {
  padding: 4px 8px;
  font-size: 0.62rem;
}

.round-mode .victory-group-card .chip {
  font-size: clamp(1.34rem, 1.7vw, 1.62rem);
  padding: 6px 10px;
}

.round-mode .phase2-pecko-card {
  min-height: 82px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: clamp(1.05rem, 1.25vw, 1.22rem);
}

.round-mode .phase2-pecko-card strong {
  font-size: clamp(1.42rem, 1.8vw, 1.82rem);
}

.round-mode .phase2-pecko-number {
  min-width: 54px;
  min-height: 54px;
  padding: 5px 10px;
  border-radius: 10px;
}

.round-mode .phase2-pecko-badge {
  min-width: 76px;
  padding: 7px 10px;
  font-size: 0.9rem;
}

.round-mode .phase2-group-divider {
  min-height: 82px;
  padding: 8px 10px;
  border-radius: 12px;
}

.round-mode .phase2-group-divider-label {
  width: 100%;
  padding: 8px 12px;
  font-size: clamp(0.98rem, 1.2vw, 1.18rem);
}

.round-mode .phase2-pecko-label {
  font-size: 0.7rem;
}

.round-mode .phase2-matches .match-card {
  width: 100%;
}

.round-mode .group-card-actions {
  min-height: 34px;
  margin-top: 10px;
}

.round-mode .group-select-button {
  min-height: 30px;
  padding: 6px 12px;
  font-size: clamp(0.72rem, 0.95vw, 0.88rem);
}

.round-mode .group-status-note {
  font-size: clamp(0.68rem, 0.9vw, 0.82rem);
}

.round-mode .round-grid {
  height: auto;
  align-content: start;
  grid-template-rows: repeat(var(--round-rows), 82px);
  grid-auto-rows: 82px;
  grid-auto-flow: column;
  gap: 5px;
}

.round-mode .match-card {
  display: grid;
  align-items: center;
  min-height: 0;
  height: 82px;
  padding: 5px;
  border-radius: 10px;
}

.round-mode .group-label {
  padding: 2px 6px;
  font-size: clamp(0.76rem, 1vw, 0.96rem);
}

.round-mode .match-meta {
  gap: 6px;
  margin-bottom: 4px;
}

.round-mode .duel-row {
  grid-template-columns: 62px 104px 18px 104px;
  justify-content: center;
  align-items: center;
  gap: 3px;
  height: auto;
}

.round-mode .board-badge {
  width: 62px;
  min-width: 62px;
  min-height: 62px;
  height: 62px;
  border-radius: 6px;
  font-size: clamp(2.15rem, 2.65vw, 2.55rem);
  font-weight: 900;
  white-space: nowrap;
}

.round-mode .duel-player {
  min-height: 0;
  padding: 4px;
  border-radius: 10px;
}

.round-mode .duel-player-head {
  height: 100%;
  gap: 4px;
}

.round-mode .team-id-badge {
  min-width: 54px;
  min-height: 54px;
  padding: 4px 8px;
  border-radius: 9px;
  font-size: clamp(1.9rem, 2.35vw, 2.25rem);
  line-height: 1;
  white-space: nowrap;
}

.round-mode .result-pill {
  min-width: 24px;
  padding: 2px 6px;
  font-size: clamp(0.86rem, 1.08vw, 1rem);
}

.round-mode .duel-versus {
  font-size: clamp(0.62rem, 0.9vw, 0.82rem);
}

.round-mode .bottom-actions {
  display: none;
}

.round-mode .hero-next-button {
  min-height: 36px;
  padding: 8px 12px;
  font-size: clamp(0.82rem, 1.1vw, 1.05rem);
  border-width: 2px;
}

.round-mode.next-round-ready .hero-action-slot {
  display: grid !important;
}

.round-mode.knockout-mode {
  overflow: hidden;
}

.round-mode.knockout-mode .round-view {
  overflow: hidden;
}

@media (max-width: 980px) {
  .single-column-grid,
  .hero {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero {
    align-items: start;
    justify-items: start;
  }

  .hero.has-side-blocks .hero-main,
  .hero-pecko-slot,
  .hero-winners-slot,
  .hero-action-slot {
    width: 100%;
    flex-basis: auto;
  }

  .hero-logo-wrap {
    width: 132px;
    height: 132px;
  }

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

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

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

  .podium-hero-figure {
    width: min(46vw, 180px);
    max-height: 260px;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 20px, 100%);
  }

  .panel,
  .sub-panel,
  .hero {
    border-radius: 20px;
  }

  .match-row {
    grid-template-columns: 84px 74px 24px 74px 84px;
    gap: 6px;
  }

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

  .round-grid {
    grid-template-columns: 1fr;
  }

  .victory-groups-grid {
    grid-template-columns: 1fr;
  }

  .podium-grid {
    grid-template-columns: 1fr;
  }

  .podium-hero-figure {
    width: min(58vw, 160px);
  }

  .duel-versus {
    min-height: 24px;
  }

  .team-id-badge,
  .registry-id {
    font-size: 0.92rem;
  }
}
