:root {
  color-scheme: light;
  --bg: #eef5f4;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --ink: #203332;
  --muted: #6c7a78;
  --line: #d8e3df;
  --header: #eef8f6;
  --header-soft: #dcefeb;
  --accent: #2f7d75;
  --accent-strong: #235f59;
  --gold: #d8b455;
  --red: #c94532;
  --blue: #2b6cb0;
  --shadow: 0 18px 50px rgba(39, 73, 70, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(113, 184, 178, 0.28), transparent 30%),
    linear-gradient(180deg, #f7fbfa 0%, var(--bg) 42%, #edf4f1 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body::after {
  background-image: url("../img/atd-watermark.png");
  background-position: center 150px;
  background-repeat: repeat-y;
  background-size: min(460px, 62vw) auto;
  content: "";
  filter: grayscale(1);
  inset: 0;
  mix-blend-mode: multiply;
  opacity: 0.030;
  pointer-events: none;
  position: fixed;
  z-index: 30;
}

a {
  color: inherit;
}

main,
.auth-shell {
  flex: 1 0 auto;
  position: relative;
  z-index: 1;
}

.site-header,
.topbar,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-footer {
  background: transparent;
  border-top: 1px solid rgba(108, 122, 120, 0.18);
  color: var(--muted);
  flex: 0 0 auto;
  padding: 28px clamp(18px, 4vw, 54px);
}

.site-footer-inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: center;
}

.site-footer span {
  font-size: 15px;
  font-weight: 700;
}

.site-footer a {
  display: block;
  line-height: 0;
}

.site-footer img {
  display: block;
  height: 38px;
  object-fit: contain;
  width: auto;
}

.auth-page .site-footer {
  border-top-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.78);
}

.auth-page::after {
  filter: grayscale(1) invert(1);
  mix-blend-mode: screen;
  opacity: 0.07;
}

.site-header,
.topbar {
  background: #315963;
  color: #ffffff;
}

.utility-bar {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 clamp(18px, 4vw, 54px);
}

.utility-bar nav,
.main-nav,
.auth-links {
  align-items: center;
  display: flex;
  gap: 14px;
}

.utility-bar a,
.main-nav a,
.auth-links a {
  text-decoration: none;
}

.brand-row,
.topbar {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 54px);
}

.brand {
  align-items: center;
  color: #ffffff;
  display: inline-flex;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900;
  gap: 12px;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.brand span::after {
  color: var(--gold);
  content: ".";
}

.brand-logo {
  flex: 0 0 auto;
  height: clamp(54px, 6vw, 76px);
  object-fit: contain;
  width: clamp(54px, 6vw, 76px);
}

.main-nav {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #ffffff;
  flex-wrap: nowrap;
  font-size: 16px;
  font-weight: 800;
  gap: 8px;
  overflow-x: auto;
  padding: 0;
  scrollbar-width: thin;
}

.main-nav a {
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  display: inline-flex;
  justify-content: center;
  min-height: 48px;
  min-width: max-content;
  padding: 11px 18px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.main-nav a + a {
  margin-left: 0;
}

.main-nav a.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #315963;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #315963;
  transform: translateY(-1px);
}

.app-nav-row {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 12px;
  justify-content: flex-end;
  min-width: 0;
}

.menu-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  height: 46px;
  justify-content: center;
  padding: 0;
  width: 46px;
}

.menu-toggle span {
  background: #ffffff;
  border-radius: 999px;
  display: block;
  height: 3px;
  width: 22px;
}

.profile-button {
  align-items: center;
  background: #ffffff;
  border: 7px solid #ff5b0a;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 56px;
  justify-content: center;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
  width: 56px;
}

.profile-button svg,
.profile-avatar svg {
  fill: none;
  height: 28px;
  stroke: #b5bab9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 28px;
}

.profile-button img {
  border-radius: 999px;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.profile-button.active,
.profile-button:hover {
  box-shadow: 0 0 0 4px rgba(255, 91, 10, 0.18);
  transform: translateY(-1px);
}

.utility-bar a:hover,
.auth-links a:hover {
  color: var(--accent);
}

.hero {
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.93), rgba(236, 247, 244, 0.78)),
    repeating-linear-gradient(135deg, rgba(47, 125, 117, 0.08) 0 2px, transparent 2px 14px);
  border-top: 1px solid rgba(47, 125, 117, 0.16);
  border-bottom: 1px solid rgba(47, 125, 117, 0.1);
  padding: 34px clamp(18px, 4vw, 54px) 40px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.02;
  margin: 8px 0 14px;
  max-width: 880px;
  text-transform: uppercase;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
  margin: 0;
  max-width: 620px;
}

.eyebrow,
.section-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.layout {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 360px;
  padding: 26px clamp(18px, 4vw, 54px);
}

.prediction-layout {
  padding: 26px clamp(18px, 4vw, 54px);
}

.home-shell,
.positions-shell,
.profile-shell {
  padding: 26px clamp(18px, 4vw, 54px);
}

.home-hero {
  display: grid;
  gap: 14px;
  min-height: 280px;
  place-content: center start;
}

.home-hero h1 {
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1;
  margin: 0;
}

.home-hero p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
  max-width: 720px;
}

.home-action {
  margin-top: 10px;
  width: fit-content;
}

.player-whatsapp-notice {
  align-items: center;
  background: #e8f8ef;
  border: 1px solid #93d5aa;
  border-left: 6px solid #25d366;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(37, 211, 102, 0.13);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 16px 18px;
}

.player-whatsapp-copy {
  min-width: 0;
}

.player-whatsapp-label {
  color: #177946;
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.player-whatsapp-notice p {
  color: #214136;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
}

.player-whatsapp-link {
  align-items: center;
  background: #25d366;
  border-radius: 999px;
  color: #0b3521;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 900;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  text-decoration: none;
  white-space: nowrap;
}

.player-whatsapp-link:hover {
  background: #1fc25c;
}

.whatsapp-icon {
  fill: currentColor;
  height: 20px;
  width: 20px;
}

.home-dashboard {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
}

.home-main-panel,
.home-standings-panel {
  align-self: start;
}

.home-last-match,
.home-upcoming-card {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.home-last-match {
  margin-bottom: 18px;
}

.home-card-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-score-match {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.home-team-side {
  align-items: center;
  display: grid;
  gap: 8px;
  justify-items: center;
  min-width: 0;
  text-align: center;
}

.home-team-side img,
.home-upcoming-teams img {
  height: 46px;
  object-fit: contain;
  width: 46px;
}

.home-team-side strong {
  color: #315963;
  font-size: clamp(17px, 2vw, 24px);
  overflow-wrap: anywhere;
}

.home-team-side.away {
  direction: rtl;
}

.home-team-side.away strong,
.home-team-side.away img {
  direction: ltr;
}

.home-final-score {
  align-items: center;
  color: #315963;
  display: flex;
  font-weight: 900;
  gap: 10px;
}

.home-final-score span {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8cbae;
  border-radius: 8px;
  display: inline-flex;
  font-size: clamp(34px, 5vw, 58px);
  height: clamp(64px, 8vw, 88px);
  justify-content: center;
  min-width: clamp(64px, 8vw, 88px);
}

.home-final-score small {
  font-size: 28px;
}

.home-last-match p,
.home-upcoming-card p {
  color: var(--muted);
  font-weight: 800;
  margin: 0;
  text-align: center;
}

.home-next-block {
  display: grid;
  gap: 12px;
}

.home-upcoming-list {
  display: grid;
  gap: 10px;
}

.home-upcoming-teams {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.home-upcoming-teams span {
  align-items: center;
  color: #315963;
  display: grid;
  font-weight: 900;
  gap: 7px;
  justify-items: center;
  min-width: 0;
  text-align: center;
}

.home-upcoming-teams strong {
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
}

.home-mini-table {
  display: grid;
  gap: 9px;
}

.home-mini-row {
  align-items: center;
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 9px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 10px;
}

.home-mini-row.current {
  background: #eaf7ef;
  border-color: rgba(47, 125, 117, 0.42);
}

.home-mini-row > span {
  align-items: center;
  background: #315963;
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.home-mini-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.home-mini-row strong {
  color: #315963;
  overflow-wrap: anywhere;
}

.home-mini-row small {
  color: var(--muted);
  font-weight: 800;
}

.home-mini-row b {
  color: #315963;
  font-size: 22px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel h2,
.auth-card h2,
.topbar h1 {
  margin: 0;
}

.section-heading {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
}

select,
input {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  min-height: 42px;
  padding: 9px 11px;
}

select:focus,
input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(15, 123, 85, 0.16);
}

.matches-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(340px, 1fr));
}

.match-card {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(250, 247, 239, 0.9)),
    radial-gradient(circle at 50% 55%, rgba(47, 125, 117, 0.08), transparent 42%);
  border: 1px solid #dbcfae;
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(60, 83, 79, 0.1);
  display: grid;
  gap: 18px;
  min-height: 270px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.match-card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent);
  content: "";
  height: 100%;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
}

.match-card-top,
.match-detail,
.team-admin-card p,
.empty-state {
  color: var(--muted);
}

.match-card-top {
  align-items: center;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  justify-content: space-between;
  position: relative;
  text-transform: uppercase;
  z-index: 1;
}

.match-card-top > div {
  align-items: center;
  display: flex;
  gap: 18px;
}

.match-round {
  color: #315963;
}

.prediction-chip {
  background: #dcebe4;
  border-radius: 7px;
  color: #315963;
  font-size: 13px;
  font-weight: 900;
  padding: 5px 10px;
}

.prediction-chip[hidden] {
  display: none;
}

.match-card-locked {
  border-color: #c7cecc;
  filter: saturate(0.72);
}

.match-card-locked .predict-button,
.match-card .predict-button:disabled {
  background: #87918f;
  cursor: not-allowed;
}

.prediction-heading-actions,
.match-card-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.fan-points-badge {
  background: #fff3c4;
  border: 1px solid #e5c65e;
  border-radius: 999px;
  color: #71560a;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
  white-space: nowrap;
}

.match-card-actions {
  justify-content: center;
  position: relative;
  z-index: 1;
}

.match-card-actions .predict-button {
  margin: 0;
}

.reveal-button {
  background: #fff3c4;
  color: #71560a;
}

.reveal-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.match-whisper {
  background: #f4ecff;
  border: 1px solid #d8c0f2;
  border-radius: 10px;
  color: #65408a;
  font-size: 14px;
  font-style: italic;
  font-weight: 800;
  padding: 10px 12px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.scoreboard-row {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
  min-height: 118px;
  position: relative;
  z-index: 1;
}

.team-block {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.team-block strong {
  color: #303535;
  font-size: 17px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.local-team {
  justify-content: end;
}

.away-team {
  justify-content: start;
}

.team-logo {
  height: 28px;
  object-fit: contain;
  width: 28px;
}

.scoreboard {
  align-items: center;
  display: flex;
  gap: 12px;
}

.score-box {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d8cbae;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56);
  color: #2f3332;
  display: inline-flex;
  font-size: 24px;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  min-width: 58px;
}

.score-separator {
  color: #605d55;
  font-weight: 900;
}

.versus {
  background: var(--header);
  border-radius: 999px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  padding: 8px 9px;
}

.match-detail {
  font-size: 14px;
  font-weight: 800;
  margin: 0;
  position: relative;
  text-align: center;
  z-index: 1;
}

.admin-link,
.primary-button {
  align-items: center;
  background: var(--accent);
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  text-decoration: none;
}

.admin-link {
  background: var(--gold);
  color: var(--ink);
  white-space: nowrap;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.predict-button {
  justify-self: center;
  max-width: 240px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.side-panel {
  align-self: start;
}

.predictions-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.prediction-item {
  background: #f7fbfa;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 11px 12px;
}

.prediction-item span {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.positions-table-wrap {
  overflow-x: auto;
}

.positions-table {
  border-collapse: separate;
  border-spacing: 0 10px;
  min-width: 560px;
  width: 100%;
}

.positions-table th {
  color: var(--muted);
  font-size: 12px;
  padding: 0 14px 4px;
  text-align: left;
  text-transform: uppercase;
}

.positions-table td {
  background: #f7fbfa;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  padding: 15px 14px;
}

.positions-table td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 12px 0 0 12px;
  color: #315963;
  font-weight: 900;
}

.positions-table td:last-child {
  border-radius: 0 12px 12px 0;
  border-right: 1px solid var(--line);
}

.position-player {
  align-items: center;
  display: flex;
  gap: 10px;
}

.position-avatar {
  border: 2px solid #d8b455;
  border-radius: 999px;
  flex: 0 0 auto;
  height: 38px;
  object-fit: cover;
  width: 38px;
}

.position-avatar-fallback {
  align-items: center;
  background: #315963;
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
}

.position-action .small-button {
  text-decoration: none;
  white-space: nowrap;
}

.play-player-heading {
  align-items: center;
  display: flex;
  gap: 14px;
}

.play-avatar-button,
.play-avatar-fallback {
  border: 3px solid #d8b455;
  border-radius: 999px;
  flex: 0 0 auto;
  height: 72px;
  overflow: hidden;
  width: 72px;
}

.play-avatar-button {
  background: #ffffff;
  cursor: pointer;
  padding: 0;
}

.play-avatar-button img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.18s ease;
  width: 100%;
}

.play-avatar-button:hover img {
  transform: scale(1.05);
}

.play-avatar-fallback {
  align-items: center;
  background: #315963;
  color: #ffffff;
  display: inline-flex;
  font-size: 28px;
  font-weight: 900;
  justify-content: center;
}

.avatar-dialog {
  background: #ffffff;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  color: #315963;
  max-width: min(92vw, 520px);
  padding: 22px;
  text-align: center;
}

.avatar-dialog::backdrop {
  background: rgba(8, 17, 15, 0.72);
}

.avatar-dialog img {
  border: 4px solid #d8b455;
  border-radius: 24px;
  display: block;
  max-height: 72vh;
  max-width: 100%;
  object-fit: contain;
}

.avatar-dialog strong {
  display: block;
  font-size: 20px;
  margin-top: 12px;
}

.avatar-dialog-close {
  background: #315963;
  color: #ffffff;
  font-size: 24px;
  height: 38px;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 38px;
}

.play-list {
  display: grid;
  gap: 12px;
}

.play-card {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.play-card p {
  color: var(--muted);
  font-weight: 800;
  margin: 0;
  text-align: center;
}

.play-match {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.play-match span {
  align-items: center;
  display: grid;
  font-weight: 900;
  gap: 8px;
  justify-items: center;
  min-width: 0;
  text-align: center;
}

.play-match img {
  height: 42px;
  object-fit: contain;
  width: 42px;
}

.play-match strong {
  color: #315963;
  font-weight: 900;
}

.play-result-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.play-result-row div {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.play-result-row span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.play-result-row strong {
  color: #315963;
  font-weight: 900;
}

.position-exacts span,
.position-points span {
  display: none;
}

.players-count {
  background: #dcebe4;
  border-radius: 999px;
  color: #315963;
  font-size: 13px;
  font-weight: 900;
  padding: 8px 12px;
  white-space: nowrap;
}

.round-filter-form {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 16px;
}

.round-filter-form label {
  align-items: center;
  color: #315963;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  gap: 8px;
  text-transform: uppercase;
}

.admin-action-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.admin-action-card {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.admin-action-card:hover {
  box-shadow: 0 16px 34px rgba(39, 73, 70, 0.12);
  transform: translateY(-2px);
}

.admin-action-card span {
  color: #315963;
  font-size: 22px;
  font-weight: 900;
}

.admin-action-card p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.admin-create-form {
  align-items: end;
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  margin-bottom: 22px;
  padding: 16px;
}

.admin-create-form label {
  color: #315963;
  display: grid;
  font-size: 13px;
  font-weight: 900;
  gap: 7px;
}

.admin-form-heading {
  grid-column: 1 / -1;
}

.admin-form-heading strong {
  color: #315963;
  font-size: 18px;
}

.admin-form-heading p {
  color: var(--muted);
  margin: 4px 0 0;
}

.admin-subheading {
  margin: 8px 0 14px;
}

.admin-subheading h3 {
  color: #315963;
  margin: 0;
}

.match-create-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.match-create-form .primary-button {
  justify-self: start;
}

.dates-admin-list {
  display: grid;
  gap: 18px;
}

.dates-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin: 0 0 14px;
}

.date-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.date-group-heading {
  align-items: center;
  background: #315963;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
}

.date-group-heading {
  cursor: pointer;
  list-style: none;
}

.date-group-heading::-webkit-details-marker {
  display: none;
}

.date-group-heading::before {
  content: "▸";
  font-weight: 900;
  margin-right: 10px;
  transform: translateY(-1px);
}

.date-group[open] .date-group-heading::before {
  content: "▾";
}

.date-group[open] .toggle-status {
  font-size: 0;
}

.date-group[open] .toggle-status::after {
  content: "Contraer";
  font-size: 11px;
}

.date-group-heading > div {
  align-items: center;
  display: flex;
  gap: 10px;
}

.date-group-heading span {
  font-size: 17px;
  font-weight: 900;
}

.date-group-heading small {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
}

.date-match-list {
  display: grid;
}

.date-match-row {
  align-items: center;
  background: #f7fbfa;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(120px, 0.9fr) auto minmax(120px, 0.9fr) minmax(360px, 1.7fr) auto;
  padding: 14px 16px;
}

.date-match-row + .date-match-row {
  border-top: 1px solid var(--line);
}

.date-match-team {
  align-items: center;
  display: flex;
  gap: 9px;
  min-width: 0;
}

.date-match-team.away {
  flex-direction: row-reverse;
  justify-content: flex-end;
  text-align: right;
}

.date-match-team img {
  height: 36px;
  object-fit: contain;
  width: 36px;
}

.date-match-team strong {
  overflow-wrap: anywhere;
}

.date-match-vs {
  color: #315963;
  font-size: 13px;
  font-weight: 900;
}

.date-match-detail {
  display: grid;
  gap: 3px;
}

.date-match-detail span {
  color: #315963;
  font-weight: 900;
}

.date-match-detail small {
  color: var(--muted);
  font-weight: 700;
}

.match-edit-form {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(130px, 1fr) minmax(94px, 0.7fr) minmax(150px, 1fr) auto;
}

.match-edit-form label {
  color: #315963;
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 5px;
  text-transform: uppercase;
}

.match-edit-form input,
.match-edit-form select {
  min-height: 38px;
  min-width: 0;
  width: 100%;
}

.admin-table .inline-form {
  align-items: center;
  display: flex;
  gap: 8px;
}

.admin-users-toolbar {
  margin: 0 0 16px;
}

.admin-users-toolbar label {
  color: #315963;
  display: grid;
  font-size: 13px;
  font-weight: 900;
  gap: 7px;
  max-width: 520px;
}

.admin-users-toolbar input {
  min-height: 42px;
}

.admin-user-number {
  color: #315963;
  font-weight: 900;
  text-align: center;
}

.user-category-form {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.user-category-form label {
  color: #315963;
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 5px;
}

.user-category-form select {
  min-height: 38px;
}

.paid-rounds-details {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}

.paid-rounds-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.paid-rounds-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  max-height: 150px;
  overflow: auto;
}

.paid-rounds-list label {
  align-items: center;
  display: flex;
  gap: 7px;
}

.paid-rounds-list input {
  min-height: auto;
  width: auto;
}

.date-group-disabled {
  border-color: #c8cfcd;
}

.date-group-disabled .date-match-list {
  opacity: 0.68;
}

.date-status-list {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.date-status {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 11px;
  padding: 6px 9px;
  text-transform: uppercase;
}

.date-status.enabled {
  background: #dff4e7;
  color: #17613d;
}

.date-status.disabled,
.date-status.locked {
  background: #fde2de;
  color: #8d2f23;
}

.date-status.scheduled {
  background: #fff3c4;
  color: #71560a;
}

.round-settings-form {
  align-items: end;
  background: #edf5f3;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(250px, 1.2fr) auto;
  padding: 14px 16px;
}

.round-settings-form label {
  color: #315963;
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 6px;
}

.round-settings-form .round-enabled-control {
  align-items: center;
  display: flex;
  gap: 9px;
}

.round-enabled-control input {
  min-height: 20px;
  width: 20px;
}

.round-settings-form p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
}

.role-badge,
.muted-action {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.role-badge {
  background: #e8f2ef;
  border-radius: 999px;
  color: #315963;
  display: inline-flex;
  padding: 7px 10px;
}

.small-button,
.danger-button {
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 900;
  min-height: 38px;
  padding: 8px 12px;
}

.small-button {
  background: #dcebe4;
  color: #315963;
}

.danger-button {
  background: #fdecea;
  color: #8d2f23;
}

.real-results-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.real-result-card {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.real-result-card p {
  color: var(--muted);
  font-weight: 800;
  margin: 0;
  text-align: center;
}

.real-result-teams {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.real-result-teams span {
  align-items: center;
  display: grid;
  font-weight: 900;
  gap: 8px;
  justify-items: center;
  min-width: 0;
  text-align: center;
}

.real-result-teams img {
  height: 44px;
  object-fit: contain;
  width: 44px;
}

.real-result-teams strong {
  color: #315963;
  font-size: 24px;
  font-weight: 900;
  white-space: nowrap;
}

.real-result-inputs {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 74px auto 74px;
  justify-content: center;
}

.real-result-inputs input {
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.real-result-inputs span {
  color: #315963;
  font-size: 22px;
  font-weight: 900;
}

.real-result-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.real-result-actions button {
  min-width: 0;
  width: 100%;
}

.real-result-actions .danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.real-admin-layout,
.real-public-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
}

.league-standings-panel,
.league-standings-admin {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.league-team-label,
.league-team-cell {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.league-team-label img,
.league-team-cell img {
  height: 32px;
  object-fit: contain;
  width: 32px;
}

.league-team-label strong,
.league-team-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-standings-table {
  min-width: 520px;
}

.league-standings-table td {
  font-weight: 900;
}

.minigame-create-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.minigame-admin-list {
  display: grid;
  gap: 12px;
}

.minigame-admin-row {
  align-items: center;
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.minigame-admin-row div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.minigame-admin-row strong {
  color: #315963;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.minigame-admin-row span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.minigame-shell {
  display: grid;
  gap: 18px;
}

.minigame-picker {
  align-items: center;
  color: #315963;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  gap: 8px;
  text-transform: uppercase;
}

.minigame-play {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.minigame-clues {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  max-width: 720px;
  padding: 16px;
  text-align: center;
  width: 100%;
}

.minigame-clues span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.minigame-clues strong {
  color: #315963;
  font-size: clamp(20px, 3vw, 30px);
  overflow-wrap: anywhere;
}

.minigame-clues p {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
  margin: 4px 0 0;
  padding-top: 12px;
}

.minigame-answer-guide {
  display: grid;
  gap: 12px;
  justify-items: center;
  max-width: 720px;
  width: 100%;
}

.minigame-answer-guide p {
  color: #315963;
  font-size: 14px;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
}

.minigame-pattern {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: center;
  max-width: 100%;
}

.minigame-pattern-word {
  display: flex;
  gap: 5px;
}

.minigame-pattern-slot {
  background: #ffffff;
  border: 2px dashed #b9c8c5;
  border-radius: 7px;
  display: inline-flex;
  height: 34px;
  width: 34px;
}

.minigame-board {
  display: grid;
  gap: 10px;
  justify-items: center;
  min-height: 190px;
  width: 100%;
}

.minigame-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-width: 100%;
}

.minigame-tile {
  align-items: center;
  background: #eef3f1;
  border: 2px solid var(--line);
  border-radius: 8px;
  color: #315963;
  display: inline-flex;
  font-size: 22px;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  min-width: 48px;
  padding: 0 12px;
}

.minigame-tile-correct {
  background: #2f7d75;
  border-color: #2f7d75;
  color: #ffffff;
}

.minigame-tile-present {
  background: #d8b455;
  border-color: #d8b455;
  color: #203332;
}

.minigame-tile-absent {
  background: #7d8987;
  border-color: #7d8987;
  color: #ffffff;
}

.minigame-guess-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 360px) auto;
  max-width: 540px;
  width: 100%;
}

.minigame-guess-form input {
  text-align: center;
}

.minigame-guess-form button:disabled,
.minigame-guess-form input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.minigame-status {
  color: var(--muted);
  font-weight: 900;
  margin: 0;
  text-align: center;
}

.minitournament-shell {
  display: grid;
  gap: 18px;
}

.minitournament-actions {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.minitournament-form {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.minitournament-form strong,
.minitournament-card span {
  color: #315963;
  font-size: 20px;
  font-weight: 900;
}

.minitournament-form p,
.minitournament-card p {
  color: var(--muted);
  margin: 4px 0 0;
}

.minitournament-form label {
  color: #315963;
  display: grid;
  font-size: 13px;
  font-weight: 900;
  gap: 7px;
}

.minitournament-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.minitournament-card {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 6px;
  padding: 16px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.minitournament-card:hover {
  box-shadow: 0 16px 34px rgba(39, 73, 70, 0.12);
  transform: translateY(-2px);
}

.minitournament-admin {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
}

.minitournament-member-list {
  display: grid;
  gap: 10px;
}

.minitournament-member-row {
  align-items: center;
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.minitournament-member-row span {
  color: #315963;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.minitournament-member-row small {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.profile-card {
  display: grid;
  gap: 18px;
  max-width: 720px;
}

.profile-avatar {
  align-items: center;
  background: #ffffff;
  border: 8px solid #ff5b0a;
  border-radius: 999px;
  display: inline-flex;
  height: 86px;
  justify-content: center;
  width: 86px;
}

.profile-avatar svg {
  height: 44px;
  width: 44px;
}

.profile-avatar img {
  border-radius: 999px;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.profile-card h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1;
  margin: 0;
}

.profile-details {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-details div {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.profile-details dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-details dd {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  overflow-wrap: anywhere;
}

.fan-points-detail {
  background: #fff8dc !important;
  border-color: #e5c65e !important;
}

.fan-points-detail dd {
  color: #71560a;
  font-size: 24px;
}

.avatar-upload-form {
  align-items: end;
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.avatar-upload-form label {
  color: #315963;
  display: grid;
  font-size: 13px;
  font-weight: 900;
  gap: 7px;
}

.prediction-dialog {
  border: 0;
  border-radius: 26px;
  max-width: calc(100vw - 24px);
  padding: 0;
  width: min(940px, calc(100vw - 24px));
}

.prediction-dialog::backdrop {
  background: rgba(5, 8, 8, 0.72);
}

#predictionForm {
  background:
    linear-gradient(rgba(30, 57, 21, 0.52), rgba(20, 36, 24, 0.72)),
    url("../img/prediction-field.png") center / cover;
  color: #ffffff;
  display: grid;
  gap: 22px;
  min-height: 610px;
  overflow: hidden;
  padding: 28px clamp(22px, 5vw, 70px);
  position: relative;
  text-align: center;
}

#predictionForm label,
.auth-card label {
  display: grid;
  font-weight: 800;
  gap: 6px;
}

.prediction-title {
  background: #ffffff;
  border-radius: 0 0 34px 34px;
  justify-self: center;
  margin-top: -28px;
  min-width: min(290px, 80vw);
  padding: 14px 28px 16px;
}

.prediction-title h2 {
  color: #c82127;
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1;
  margin: 0;
}

.prediction-copy {
  align-self: end;
  display: grid;
  gap: 4px;
  margin-top: 18px;
}

.prediction-copy p {
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 900;
  margin: 0;
}

.prediction-match-info {
  display: grid;
  gap: 6px;
  text-transform: uppercase;
}

.prediction-match-info strong {
  color: #f2c500;
  font-size: clamp(34px, 6vw, 42px);
  line-height: 1;
}

.prediction-match-info span {
  color: #ffffff;
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 900;
}

.score-inputs {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto 1fr;
}

.score-inputs > span {
  font-size: 28px;
  font-weight: 900;
  padding-bottom: 6px;
}

.prediction-scoreboard {
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  grid-template-columns: minmax(120px, 1fr) auto auto auto minmax(120px, 1fr);
  justify-items: center;
}

.prediction-team-side {
  align-items: center;
  display: grid;
  gap: 12px;
  justify-items: center;
  min-width: 0;
}

.prediction-team-logo {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
  height: clamp(76px, 10vw, 112px);
  object-fit: contain;
  padding: 10px;
  width: clamp(76px, 10vw, 112px);
}

.prediction-team-name {
  color: #f2c500;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.prediction-goal-control {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 0;
  min-width: 76px;
  overflow: hidden;
}

.prediction-goal-control span {
  color: transparent;
  font-size: 0;
  height: 12px;
}

.prediction-goal-control input {
  background: #ffffff;
  border: 0;
  border-radius: 0;
  color: #25536c;
  font-size: 54px;
  font-weight: 900;
  height: 96px;
  line-height: 1;
  min-height: 96px;
  padding: 0 6px;
  text-align: center;
  width: 76px;
}

.prediction-goal-control input::-webkit-outer-spin-button,
.prediction-goal-control input::-webkit-inner-spin-button {
  margin: 0;
}

.goal-step {
  align-items: center;
  background: #f4f6f5;
  border: 0;
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 100%;
}

.goal-step::before {
  border-color: #8f9695;
  border-style: solid;
  content: "";
  display: block;
  height: 16px;
  width: 16px;
}

.goal-step-up::before {
  border-width: 3px 3px 0 0;
  transform: translateY(4px) rotate(-45deg);
}

.goal-step-down::before {
  border-width: 0 3px 3px 0;
  transform: translateY(-4px) rotate(45deg);
}

.goal-step:hover {
  background: #e8eceb;
}

.prediction-goal-control input:focus {
  border-color: transparent;
  outline: 4px solid rgba(242, 197, 0, 0.35);
}

.prediction-vs {
  color: #ffffff;
  font-size: clamp(28px, 4vw, 34px);
  font-weight: 900;
  padding: 0;
}

.prediction-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

.secondary-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 46px;
  min-width: 190px;
  padding: 10px 22px;
  text-decoration: none;
  text-transform: uppercase;
}

.prediction-actions .primary-button {
  background: #ffffff;
  border-radius: 999px;
  color: #25536c;
  min-height: 46px;
  min-width: 300px;
  text-transform: uppercase;
}

.prediction-actions .primary-button:hover,
.secondary-button:hover {
  background: #f2c500;
  color: #203332;
}

.icon-button {
  background: transparent;
  border: 0;
  cursor: pointer;
}

.close-button {
  color: #ffffff;
  font-size: 34px;
  font-weight: 900;
  position: absolute;
  right: 22px;
  top: 18px;
  z-index: 2;
}

.admin-panel {
  margin: 24px clamp(18px, 4vw, 54px);
}

.teams-admin-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.team-admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.team-admin-card p {
  margin: 4px 0 0;
}

.auth-page {
  background:
    linear-gradient(120deg, rgba(16, 20, 18, 0.96), rgba(16, 20, 18, 0.72)),
    repeating-linear-gradient(135deg, rgba(240, 196, 51, 0.2) 0 2px, transparent 2px 14px);
}

.auth-shell {
  align-items: center;
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  min-height: 100vh;
  padding: clamp(22px, 5vw, 64px);
}

.auth-brand {
  color: #ffffff;
}

.auth-brand h1 {
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.96;
  margin: 28px 0 16px;
  max-width: 740px;
  text-transform: uppercase;
}

.auth-brand p {
  color: #d8dedb;
  font-size: 18px;
  max-width: 560px;
}

.auth-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
}

.auth-card .section-kicker {
  color: var(--accent);
}

.auth-card .primary-button {
  width: 100%;
}

.auth-links {
  color: var(--muted);
  flex-wrap: wrap;
  font-size: 14px;
  justify-content: space-between;
}

.flash-list {
  display: grid;
  gap: 8px;
}

.flash {
  border-radius: 12px;
  margin: 0;
  padding: 10px 12px;
}

.flash-error {
  background: #fdecea;
  color: #8d2f23;
}

.flash-success {
  background: #eaf7ef;
  color: #12613f;
}

.flash-warning {
  background: #fff5d6;
  color: #7a5a00;
}

.reset-link-box {
  background: #f5f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.reset-link-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.reset-link-box a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .brand-row {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .app-nav-row {
    display: none;
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .app-nav-row.is-open {
    display: grid;
  }

  .main-nav {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .main-nav a + a {
    margin-left: 0;
    margin-top: 4px;
  }

  .profile-button {
    align-self: center;
    justify-self: center;
  }

  .layout,
  .auth-shell,
  .home-dashboard {
    grid-template-columns: 1fr;
  }

  .player-whatsapp-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .player-whatsapp-link {
    width: 100%;
  }

  .minitournament-actions {
    grid-template-columns: 1fr;
  }

  .admin-create-form,
  .match-create-form,
  .minigame-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .date-match-row {
    grid-template-columns: minmax(100px, 1fr) auto minmax(100px, 1fr);
  }

  .date-match-detail,
  .match-edit-form {
    grid-column: 1 / -1;
  }

  .match-edit-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .round-settings-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .positions-table-wrap {
    overflow-x: visible;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) {
    border-spacing: 0;
    min-width: 0;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) thead {
    display: none;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) tbody {
    display: grid;
    gap: 10px;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) tr {
    align-items: center;
    background: #f7fbfa;
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    gap: 10px;
    grid-template-columns: 44px minmax(0, 1fr) 82px 72px;
    padding: 10px;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) td {
    background: transparent;
    border: 0;
    padding: 0;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) td:first-child,
  .positions-table:not(.admin-table):not(.league-standings-table) td:last-child {
    border: 0;
    border-radius: 0;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) .position-rank {
    align-items: center;
    background: #315963;
    border-radius: 10px;
    color: #ffffff;
    display: inline-flex;
    font-weight: 900;
    height: 44px;
    justify-content: center;
    width: 44px;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) .position-player {
    color: #315963;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.2;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) .position-exacts,
  .positions-table:not(.admin-table):not(.league-standings-table) .position-points {
    align-items: center;
    color: #315963;
    display: grid;
    font-weight: 900;
    gap: 2px;
    justify-items: center;
    text-align: center;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) .position-exacts span,
  .positions-table:not(.admin-table):not(.league-standings-table) .position-points span {
    color: var(--muted);
    display: block;
    font-size: 10px;
    line-height: 1;
    text-transform: uppercase;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) .position-points strong {
    font-size: 20px;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) .position-action {
    grid-column: 1 / -1;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) .position-action .small-button {
    justify-content: center;
    width: 100%;
  }

  .real-admin-layout,
  .real-public-layout {
    grid-template-columns: 1fr;
  }

  .play-result-row {
    grid-template-columns: 1fr;
  }

  .play-player-heading {
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .site-footer-inner {
    gap: 12px;
  }

  .site-footer span {
    font-size: 13px;
  }

  .site-footer img {
    height: 30px;
  }

  .topbar,
  .section-heading,
  .utility-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .app-nav-row {
    align-items: stretch;
  }

  .admin-link {
    width: 100%;
  }

  .prediction-heading-actions {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }

  .match-card-actions,
  .avatar-upload-form {
    grid-template-columns: 1fr;
  }

  .match-card-actions {
    display: grid;
  }

  .date-group-heading,
  .date-group-heading > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .date-status-list {
    justify-content: flex-start;
  }

  .round-settings-form {
    grid-template-columns: 1fr;
  }

  .brand {
    font-size: clamp(21px, 7vw, 30px);
    gap: 8px;
  }

  .brand-logo {
    height: 48px;
    width: 48px;
  }

  .admin-create-form,
  .match-create-form,
  .minigame-create-form {
    grid-template-columns: 1fr;
  }

  .admin-create-form .primary-button,
  .match-create-form .primary-button,
  .minigame-create-form .primary-button {
    justify-self: stretch;
    width: 100%;
  }

  .minigame-admin-row,
  .minigame-guess-form {
    grid-template-columns: 1fr;
  }

  .minigame-admin-row .danger-button,
  .minigame-guess-form .primary-button {
    width: 100%;
  }

  .minigame-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .round-filter-form {
    justify-content: stretch;
  }

  .round-filter-form label {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) tr {
    grid-template-columns: 38px minmax(0, 1fr) 66px 58px;
    gap: 8px;
    padding: 9px;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) .position-rank {
    border-radius: 9px;
    height: 38px;
    width: 38px;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) .position-player {
    font-size: 14px;
  }

  .positions-table:not(.admin-table):not(.league-standings-table) .position-points strong {
    font-size: 18px;
  }

  .minitournament-member-row {
    grid-template-columns: 1fr;
  }

  .minitournament-member-row .danger-button {
    width: 100%;
  }

  .date-match-row {
    grid-template-columns: 1fr auto 1fr;
  }

  .date-match-team,
  .date-match-team.away {
    align-items: center;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
  }

  .date-match-detail,
  .match-edit-form {
    grid-column: 1 / -1;
    text-align: center;
  }

  .match-edit-form {
    grid-template-columns: 1fr;
  }

  .date-match-row form {
    grid-column: 1 / -1;
  }

  .date-match-row .danger-button,
  .match-edit-form .small-button {
    width: 100%;
  }

  .matches-grid {
    grid-template-columns: 1fr;
  }

  .match-card {
    min-height: auto;
  }

  .match-card-top > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .scoreboard-row {
    gap: 12px;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .home-score-match,
  .home-upcoming-teams {
    grid-template-columns: 1fr;
  }

  .home-final-score {
    justify-content: center;
  }

  .local-team,
  .away-team {
    justify-content: center;
  }

  .away-team {
    flex-direction: row-reverse;
  }

  .team-block strong {
    text-align: center;
  }

  .scoreboard {
    order: 2;
  }

  .away-team {
    order: 3;
  }

  .score-box {
    height: 48px;
    min-width: 54px;
  }

  .prediction-dialog {
    border-radius: 18px;
  }

  #predictionForm {
    min-height: auto;
    gap: 14px;
    padding: 18px 14px 16px;
  }

  .prediction-title {
    margin-top: -18px;
    min-width: min(240px, 78vw);
    padding: 12px 22px 13px;
  }

  .prediction-scoreboard {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .prediction-copy {
    gap: 2px;
    margin-top: 4px;
  }

  .prediction-copy p {
    font-size: 14px;
    line-height: 1.35;
  }

  .prediction-match-info {
    gap: 2px;
  }

  .prediction-match-info strong {
    font-size: 24px;
  }

  .prediction-match-info span {
    font-size: 13px;
  }

  .prediction-team-side {
    gap: 6px;
  }

  .prediction-team-name {
    font-size: 22px;
  }

  .prediction-team-logo {
    border-radius: 12px;
    height: 52px;
    padding: 6px;
    width: 52px;
  }

  .prediction-goal-control {
    display: grid;
    grid-template-columns: 56px 72px 56px;
    justify-content: center;
    min-width: 0;
    width: min(220px, 100%);
  }

  .prediction-goal-control span {
    display: none;
  }

  .prediction-goal-control input {
    font-size: 40px;
    height: 64px;
    min-height: 64px;
    width: 72px;
  }

  .goal-step {
    height: 64px;
    width: 56px;
  }

  .goal-step-up {
    grid-column: 3;
    grid-row: 1;
  }

  .goal-step-down {
    grid-column: 1;
    grid-row: 1;
  }

  .prediction-goal-control input {
    grid-column: 2;
    grid-row: 1;
  }

  .goal-step-up::before {
    transform: translateX(-3px) rotate(45deg);
  }

  .goal-step-down::before {
    transform: translateX(3px) rotate(135deg);
  }

  .prediction-vs {
    font-size: 24px;
  }

  .prediction-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    margin-top: 4px;
  }

  .prediction-actions .primary-button,
  .secondary-button {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 460px) {
  .prediction-vs {
    padding: 0;
  }

  .prediction-dialog {
    max-width: calc(100vw - 12px);
    width: calc(100vw - 12px);
  }

  .prediction-actions {
    grid-template-columns: 1fr;
  }
}
