/* ==========================================================================
   Bassio's Padel — SOS Checker
   Palette & type per brand spec: Anton (headlines) + Montserrat (text)
   ========================================================================== */

:root {
  --navy: #02325d;
  --blue: #2a80cd;
  --blue-soft: #e6f0ff;
  --gold: #d9c071;
  --gold-light: #eedda9;
  --gold-deep: #b99c45;
  --green: #00bf63;
  --red: #882929;
  --cream: #ede3c5;
  --white: #ffffff;

  --ink: #14212f;
  --muted: #8b8577;

  --navy-grad: linear-gradient(100deg, #02325d 0%, #2a80cd 100%);

  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --col: 46rem;        /* 736px — team / step column   */
  --col-search: 33.25rem; /* 532px — player search column */
  --col-result: 21.75rem; /* 348px — player result column */

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  top: -4rem;
  left: 1rem;
  z-index: 60;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  background: var(--navy);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus-visible { top: 1rem; }

:focus-visible {
  outline: 3px solid rgba(42, 128, 205, 0.55);
  outline-offset: 2px;
}

/* ── Backdrop: white→cream wash + sand grain + one blue wave ───────────── */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(94deg, #ffffff 0%, #fdfbf4 24%, var(--cream) 78%, #e7dcba 100%);
}

.backdrop__grain {
  position: absolute;
  inset: 0;
  background: url("../img/sand-pattern.png") center / cover no-repeat;
  opacity: 0.85;
}

.backdrop__wave {
  position: absolute;
  inset: 0;
  background: url("../img/blue-ground.png") center bottom / cover no-repeat;
}

/* ── Screens ───────────────────────────────────────────────────────────── */

#main { position: relative; }

.screen {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.25rem 4rem;
}

.screen.is-active { animation: screen-in 0.45s var(--ease) both; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.screen--home { justify-content: center; padding-bottom: 3.5rem; }
.screen--sheet { padding-top: 5rem; }

/* ── Home ──────────────────────────────────────────────────────────────── */

.logo-swap {
  position: relative;
  display: block;
  width: clamp(7rem, 13.2vw, 11.25rem);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 1rem;
}

.logo-swap:focus-visible {
  outline: 3px solid rgba(42, 128, 205, 0.55);
  outline-offset: 4px;
}

.logo {
  width: 100%;
  height: auto;
  display: block;
}

.logo--hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease);
}

.logo--base {
  transition: opacity 0.22s var(--ease);
}

/* Gold by default, navy/blue on hover */
.logo-swap:hover .logo--hover,
.logo-swap:focus-visible .logo--hover {
  opacity: 1;
}

.logo-swap:hover .logo--base,
.logo-swap:focus-visible .logo--base {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .logo--hover,
  .logo--base { transition: none; }
}

.welcome {
  margin: 1.15rem 0 0.15rem;
  font-size: clamp(1.15rem, 3.3vw, 2.8rem);
  font-weight: 400;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: #111418;
  text-align: center;
}

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(2.5rem, 6.4vw, 5.45rem);
  line-height: 1;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--navy);
  text-align: center;
}

.home-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  margin-top: 3rem;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 16.3rem;
  padding: 0.95rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--navy-grad);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(2, 50, 93, 0.24);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), filter 0.18s var(--ease);
}

.pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(2, 50, 93, 0.3);
  filter: saturate(1.08);
}

.pill-btn:active { transform: translateY(0); }

.pill-btn__arrow { transition: transform 0.18s var(--ease); }
.pill-btn:hover .pill-btn__arrow { transform: translateX(3px); }

.pill-btn--seasons {
  background: linear-gradient(100deg, #882929 0%, #2a80cd 100%);
}

.admin-link {
  position: absolute;
  bottom: 1.5rem;
  right: 1.75rem;
  color: rgba(20, 33, 47, 0.42);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.auth-links {
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  z-index: 8;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.auth-links a {
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(2, 50, 93, 0.12);
}
.auth-links a:hover { background: #fff; }

.admin-link:hover { color: var(--navy); }

.home-btn {
  position: fixed;
  top: 1.25rem;
  left: 1.5rem;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 12px rgba(2, 50, 93, 0.12);
  text-decoration: none;
  color: inherit;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.85);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

/* On SoS module home: logo goes to site hub. On inner screens: logo returns to module home. */
body[data-screen="home"] #hub-btn {
  opacity: 1;
  visibility: visible;
  transform: none;
}
body:not([data-screen="home"]) #home-btn {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.home-btn:hover { background: var(--white); }

/* ── Gold banner headline ──────────────────────────────────────────────── */

.banner {
  margin: 0;
  padding: 0.42rem 1.6rem 0.58rem;
  border-radius: 0.35rem;
  background: var(--gold);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(1.85rem, 4.6vw, 3.95rem);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  box-shadow: 0 6px 16px rgba(139, 112, 40, 0.16);
}

.banner__lead { color: var(--navy); }
.banner__tail { color: var(--blue); }

/* ── Columns ───────────────────────────────────────────────────────────── */

.col { width: 100%; }

.col--search { max-width: var(--col-search); margin-top: 3.9rem; }
.col--result { max-width: var(--col-result); margin-top: 2.8rem; }
.col--team   { max-width: var(--col); margin-top: 2.1rem; }

.label {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--navy);
}

.label--center { text-align: center; }

.hint {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 400;
  color: #8e887b;
}

.hint--tight {
  margin-top: 0.35rem;
  font-size: 0.88rem;
}

.team-carry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0 0 1.25rem;
  padding: 0.7rem 1rem;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1.5px solid rgba(2, 50, 93, 0.12);
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(2, 50, 93, 0.06);
}

.team-carry strong { font-weight: 700; }

.team-carry__clear {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.team-carry__clear:hover { color: var(--navy); }

.level-limits {
  margin: 0.7rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
}

.slot__label {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-preview {
  margin-top: 1.5rem;
  padding: 0.95rem 1.1rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1.5px solid rgba(2, 50, 93, 0.12);
  box-shadow: 0 6px 16px rgba(2, 50, 93, 0.07);
}

.team-preview__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy);
}

.team-preview__row + .team-preview__row { margin-top: 0.35rem; }

.team-preview__status {
  margin: 0.7rem 0 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.team-preview.is-ok .team-preview__status { color: #0a8f4a; }
.team-preview.is-bad .team-preview__status { color: var(--red); }

.check-hint {
  width: 100%;
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.check-hint.is-ready { color: var(--navy); }

/* ── Search field + suggestions ────────────────────────────────────────── */

.search {
  position: relative;
  margin-top: 1.9rem;
}

.search__input {
  width: 100%;
  height: 2.4rem;
  padding: 0 3rem 0 1rem;
  border: 1.5px solid var(--navy);
  border-radius: 0.5rem;
  background: var(--white);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
  transition: box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}

.search__input::placeholder { color: #a9a294; font-weight: 500;  text-decoration: none !important;}

.search__input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(42, 128, 205, 0.18);
}

.search__input::-webkit-search-cancel-button { display: none; }

.search__icon {
  position: absolute;
  top: 0;
  right: 0.95rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  color: var(--gold-deep);
  pointer-events: none;
}

.search.is-loading .search__icon { animation: pulse 1s ease-in-out infinite; }

@keyframes pulse {
  50% { opacity: 0.35; }
}

.suggestions {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  max-height: 19rem;
  overflow-y: auto;
  padding: 0.55rem;
  border: 1.5px solid var(--navy);
  border-radius: 0.5rem;
  background: var(--white);
  box-shadow: 0 16px 30px rgba(2, 50, 93, 0.14);
}

.suggestions.is-open {
  display: block;
  animation: drop-in 0.2s var(--ease) both;
}

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.suggestion {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 0;
  border-radius: 0.4rem;
  background: linear-gradient(90deg, #ffffff 0%, #f4eeda 100%);
  text-align: left;
  transition: filter 0.15s var(--ease), transform 0.15s var(--ease);
}

.suggestion__sos {
  flex: none;
  margin-left: auto;
  min-width: 2.4rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  background: var(--navy-grad);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1;
  text-align: center;
}

.suggestion + .suggestion { margin-top: 0.5rem; }

.suggestion:hover,
.suggestion.is-active { filter: brightness(0.97); transform: translateX(2px); }

.suggestion.is-disabled { opacity: 0.55; cursor: not-allowed; }
.suggestion.is-disabled:hover { transform: none; }

.suggestion__text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
  flex: 1;
}

.suggestion__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1b4f8a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion__sub {
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 400;
  color: #a39c8e;
}

.suggestion__flag {
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
  color: var(--red);
}

.suggestion-empty {
  padding: 0.9rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
}

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--navy-grad);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ── Player result ─────────────────────────────────────────────────────── */

.name-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.95rem;
  padding: 0.5rem 1rem;
  border-radius: 0.6rem;
  background: var(--white);
  box-shadow: 0 4px 14px rgba(2, 50, 93, 0.09);
}

.name-pill .avatar { width: 1.75rem; height: 1.75rem; }

.name-pill__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.55rem;
}

.name-pill__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1b5fa8;
  text-align: center;
}

.nick-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #eedda9, var(--gold));
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(139, 112, 40, 0.18);
}

.nick-chip--slot {
  font-size: 0.7rem;
  padding: 0.12rem 0.45rem;
}

.nick-chip--soft {
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  box-shadow: none;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.2rem;
}

.score-box {
  display: grid;
  place-items: center;
  height: 6.25rem;
  border-radius: 0.4rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 3.4rem;
  line-height: 1;
  letter-spacing: 0.01em;
}

.score-box--navy {
  background: var(--navy-grad);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(2, 50, 93, 0.22);
}

.score-box--white {
  background: var(--white);
  color: var(--blue);
  box-shadow: 0 4px 14px rgba(2, 50, 93, 0.1);
}

.mini-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 5rem;
}

.mini-btn {
  padding: 0.6rem 0.5rem;
  border: 0;
  border-radius: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.mini-btn:hover { transform: translateY(-2px); }

.mini-btn--navy {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(2, 50, 93, 0.22);
}

.mini-btn--gold {
  background: var(--gold);
  color: #fffaea;
  box-shadow: 0 4px 12px rgba(139, 112, 40, 0.2);
}

/* ── Team steps ────────────────────────────────────────────────────────── */

.step + .step { margin-top: 2.4rem; }

.step.is-locked {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  margin-top: 0;
}

.step:not(.is-locked) { animation: step-in 0.4s var(--ease) both; }

@keyframes step-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

.chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.55rem;
}

.chip {
  height: 2.85rem;
  padding: 0 0.85rem;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  background: var(--white);
  color: var(--gold-deep);
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.16s var(--ease), box-shadow 0.2s var(--ease);
}

.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(139, 112, 40, 0.16);
}

.chip.is-active {
  border-color: transparent;
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 6px 14px rgba(139, 112, 40, 0.22);
}

/* Level picker (custom dropdown — readable on mobile) */

.level-picker {
  position: relative;
  width: min(22rem, 100%);
  margin-top: 1.55rem;
}

.level-picker__trigger {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.35rem 0.42rem 0.35rem 1.15rem;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  background: var(--white);
  color: #9a9384;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.level-picker__trigger:hover {
  box-shadow: 0 6px 14px rgba(2, 50, 93, 0.1);
}

.level-picker__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 0.65rem;
}

.level-picker__chevron {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  transition: transform 0.22s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

.level-picker.is-open .level-picker__chevron {
  transform: rotate(180deg);
}

.level-picker.is-filled .level-picker__trigger {
  border-color: transparent;
  background: var(--navy-grad);
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(2, 50, 93, 0.22);
}

.level-picker.is-filled .level-picker__chevron {
  background: var(--white);
  color: var(--navy);
}

.level-picker.is-open .level-picker__trigger {
  border-color: var(--navy);
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(42, 128, 205, 0.18);
}

.level-picker.is-open .level-picker__chevron {
  background: var(--navy);
  color: var(--white);
}

.level-picker__menu {
  /* In-flow panel: pushes Step III / Check down instead of covering them */
  position: static;
  width: 100%;
  margin: 0.55rem 0 0;
  padding: 0.45rem;
  list-style: none;
  border: 1.5px solid var(--navy);
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 10px 22px rgba(2, 50, 93, 0.12);
  max-height: 16rem;
  overflow-y: auto;
}

.level-picker__menu[hidden] { display: none !important; }

.level-picker.is-open .level-picker__menu {
  display: block;
  animation: drop-in 0.2s var(--ease) both;
}

#level-step {
  position: relative;
  z-index: 2;
}

.level-picker__option {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.level-picker__option + .level-picker__option { margin-top: 0.2rem; }

.level-picker__option:hover,
.level-picker__option.is-active {
  background: linear-gradient(90deg, #f7f1df 0%, #eef5ff 100%);
}

.level-picker__option.is-selected {
  background: var(--navy-grad);
  color: var(--white);
}

.level-picker__empty {
  padding: 0.85rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

/* Player slots */

.slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem;
  margin-top: 1.55rem;
}

.slot { min-width: 0; }

.slot__pick { position: relative; }

.slot__input {
  width: 100%;
  height: 2.85rem;
  padding: 0 7rem 0 1rem;
  border: 1.5px solid var(--navy);
  border-radius: 0.55rem;
  background: var(--white);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
}

.slot__input::placeholder {
  color: #8e887b;
  font-weight: 500;
  text-decoration: none;
}

.slot__input:focus { outline: none; box-shadow: 0 0 0 3px rgba(42, 128, 205, 0.18); }
.slot__input::-webkit-search-cancel-button { display: none; }

.slot__cap {
  position: absolute;
  top: 1.5px;
  right: 1.5px;
  bottom: 1.5px;
  width: 6.2rem;
  border-radius: 0 0.42rem 0.42rem 0;
  background: var(--navy-grad);
  pointer-events: none;
}

.slot__chosen {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 2.85rem;
  padding: 0 0 0 0.75rem;
  border: 1.5px solid var(--navy);
  border-radius: 0.55rem;
  background: var(--white);
  overflow: hidden;
  animation: step-in 0.3s var(--ease) both;
}

.slot__identity {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.2rem 0;
}

.slot__name {
  max-width: 100%;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot__sos {
  flex: none;
  display: grid;
  place-items: center;
  align-self: stretch;
  width: 6.2rem;
  margin: -1.5px -1.5px -1.5px 0;
  background: var(--navy-grad);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.slot__reset {
  margin-top: 0.55rem;
  padding: 0;
  border: 0;
  background: none;
  color: #8e887b;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.slot__reset:hover { color: var(--navy); }

.check-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 3.4rem;
}

.pill-btn--check {
  position: relative;
  min-width: 11.9rem;
  padding: 0.78rem 1.5rem;
}

.pill-btn--check:disabled {
  opacity: 0.4;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.3);
}

.pill-btn__spinner {
  position: absolute;
  width: 1.15rem;
  height: 1.15rem;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.7s linear infinite;
}

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

.pill-btn--check.is-busy .pill-btn__label { opacity: 0; }
.pill-btn--check.is-busy .pill-btn__spinner { opacity: 1; }

/* ── Verdict pop-up ────────────────────────────────────────────────────── */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 2.5rem 1.25rem;
  background: rgba(10, 10, 10, 0.86);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  overflow-y: auto;
}

.overlay.is-open { opacity: 1; }

.overlay--about .about-card {
  position: relative;
  width: min(28rem, 100%);
  padding: 1.6rem 1.5rem 1.45rem;
  border-radius: 1.35rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7f1df 100%);
  border: 3px solid var(--navy);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.4);
  text-align: left;
  transform: scale(0.94);
  transition: transform 0.3s var(--ease);
}

.overlay--about.is-open .about-card { transform: none; }

.about-card__logo {
  display: block;
  width: 3.5rem;
  height: auto;
  margin: 0 auto 0.65rem;
}

.about-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  color: var(--navy);
}

.about-card__lead {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(20, 33, 47, 0.78);
  line-height: 1.45;
}

.about-card__steps {
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.about-card__steps li {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  background: rgba(2, 50, 93, 0.06);
  border-left: 4px solid var(--gold);
}

.about-card__steps strong {
  color: var(--navy);
  font-size: 0.92rem;
}

.about-card__steps span {
  color: rgba(20, 33, 47, 0.72);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
}

.about-card__note {
  margin: 0.95rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}

.about-card__cta {
  display: flex;
  width: 100%;
  margin-top: 1.15rem;
  min-width: 0;
}

.verdict {
  position: relative;
  width: min(27.8rem, 100%);
  padding: 1.55rem 3.1rem 2.2rem;
  border: 5px solid var(--white);
  border-radius: 1.75rem;
  text-align: center;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
  transform: scale(0.92);
  transition: transform 0.3s var(--ease);
}

.overlay.is-open .verdict { transform: none; }

.verdict--approved { background: var(--green); }
.verdict--denied   { background: var(--red); }

.verdict__icon {
  width: 7.8rem;
  height: 3.15rem;
  margin: 0 auto 0.6rem;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.verdict--approved .verdict__icon { background-image: url("../img/icon-check.png"); }
.verdict--denied .verdict__icon {
  width: 4.4rem;
  background-image: url("../img/icon-x.png");
}

.verdict__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.verdict__level {
  margin: 1rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--white);
}

.verdict__players {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.verdict__players li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
}

.verdict__players li.is-over {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.18);
}

.verdict__player-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  flex: 1;
}

.verdict__player-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verdict__rules {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.verdict__rule {
  padding: 0.4rem 0.65rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
}

.verdict__rule.is-fail {
  background: rgba(0, 0, 0, 0.22);
}

.verdict__players strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
}

.verdict__limits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.1rem;
  margin-top: 1.25rem;
}

.verdict__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.verdict__action {
  padding: 0.55rem 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
}

.verdict__action--solid {
  border-color: transparent;
  background: var(--gold);
  color: var(--navy);
}

.verdict__action:hover { filter: brightness(1.06); }

.stat {
  border: 2.5px solid var(--white);
  border-radius: 0.65rem;
  overflow: hidden;
}

.stat__head {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.65rem 0.35rem 0.7rem;
  background: var(--white);
  line-height: 1.1;
}

.stat__label {
  font-size: 1.18rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stat__sub {
  font-size: 0.94rem;
  font-weight: 600;
  text-transform: uppercase;
}

.verdict--approved .stat__label { color: #00a552; }
.verdict--approved .stat__sub   { color: #2ecc7d; }
.verdict--denied .stat__label   { color: var(--red); }
.verdict--denied .stat__sub     { color: #a85454; }

.stat__value {
  padding: 0.75rem 0.25rem 0.95rem;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--white);
}

.reason {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 8.45rem;
  margin-top: 2.2rem;
  border: 2.5px solid var(--white);
  border-radius: 0.65rem;
  overflow: hidden;
}

.reason__label {
  display: grid;
  place-items: center;
  padding: 0.85rem 0.5rem;
  background: var(--white);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.verdict--approved .reason__label { color: #00a552; }
.verdict--denied .reason__label   { color: var(--red); }

.reason__value {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 4.1rem;
  line-height: 1;
  color: var(--white);
}

.verdict__close {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1;
  transform: translate(-50%, 50%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}

.verdict__close:hover {
  background: var(--gold-deep);
  transform: translate(-50%, 50%) scale(1.08);
}

/* ── Toast ─────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.75rem;
  z-index: 70;
  max-width: min(26rem, calc(100% - 2rem));
  padding: 0.75rem 1.15rem;
  border-radius: 0.6rem;
  background: var(--navy);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 14px 30px rgba(2, 50, 93, 0.3);
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 52rem) {
  .screen--sheet { padding-top: 3.25rem; }
  .col { margin-top: 2.25rem; }
  .slots { grid-template-columns: 1fr; gap: 1.35rem; }
  .level-picker { width: 100%; }
  .chips { grid-template-columns: 1fr; gap: 0.7rem; }
  .chip { height: 2.75rem; }
  .step + .step { margin-top: 1.5rem; }
  .check-row { margin-top: 2rem; }
  .mini-actions { margin-top: 2.25rem; }
}

@media (max-width: 30rem) {
  .home-actions { gap: 1.1rem; margin-top: 2.25rem; }
  .pill-btn { min-width: 14.5rem; }
  .score-box { height: 5.25rem; font-size: 2.75rem; }
  .mini-actions { grid-template-columns: 1fr; gap: 0.7rem; }

  .verdict { padding: 1.35rem 1.5rem 2rem; }
  .verdict__title { font-size: 2.35rem; }
  .verdict__limits { gap: 1.5rem; }
  .verdict__actions { grid-template-columns: 1fr; }
  .stat__label { font-size: 1.02rem; }
  .stat__value { font-size: 2.5rem; }
  .reason { min-height: 7rem; }
  .reason__label { font-size: 1.25rem; }
  .reason__value { font-size: 3.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
