/* Pro Tourny – Frontend styles */
@import url("pt-toast.css");
@import url("pt-confirm.css");

:root {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --text: #1a2332;
  --text-muted: #5c6b7c;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --green: #059669;
  --green-bg: #d1fae5;
  --purple: #7c3aed;
  --purple-bg: #ede9fe;
  --yellow: #d97706;
  --yellow-bg: #fef3c7;
  --live-red: #dc2626;
  --live-glow: rgba(220, 38, 38, 0.35);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
  --font: "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  /* Shared header / logo (welcome + app shell) */
  --header-logo-size: 60px;
  --header-logo-radius: 14px;
  --footer-logo-size: 56px;
  --header-bar-pad-y: 1.05rem;
  --header-bar-pad-x: 1.5rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Prevent layout blowout on phones / tablets */
img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

.dashboard-body,
.draws-body,
.start-tournament-body,
body.pt-bootstrap {
  overflow-x: hidden;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ----- Header ----- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 6px 28px rgba(15, 23, 42, 0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--header-bar-pad-y) var(--header-bar-pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header--welcome .header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem 0.85rem;
  row-gap: 0.65rem;
}

.header--welcome .header-inner > .logo {
  justify-self: start;
  min-width: 0;
}

.header--welcome .header-inner > .nav {
  justify-self: end;
  min-width: 0;
  overflow: visible;
}

/* Pages with only logo + right actions (e.g. results) — not 3-column welcome nav */
.header--welcome.header--actions-end .header-inner {
  grid-template-columns: minmax(0, 1fr) auto;
}

.header--welcome.header--actions-end .header-inner > .logo {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.header--welcome.header--actions-end .header-inner > .nav {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.header--welcome.header--actions-end .header-inner .auth-buttons {
  justify-content: flex-end;
}

.header--welcome.header--actions-end .header-inner {
  align-items: start;
}

.header--welcome.header--actions-end .header-inner > .nav {
  align-self: start;
}

/* Home — icon button (top-right on circuit / directory pages) */
a.pt-page-home-link.btn.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  line-height: 1;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

a.pt-page-home-link.btn.btn-ghost:hover {
  background: rgba(37, 99, 235, 0.08);
}

a.pt-page-home-link .pt-home-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.welcome-sections-nav-shell {
  min-width: 0;
  justify-self: center;
}

.welcome-sections-scroll-rail {
  display: none;
}

.welcome-header-sections-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  min-width: 0;
}

.welcome-header-section-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.25rem 0;
  border: 0;
  border-bottom: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .welcome-header-section-link {
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
  }

  .welcome-header-section-link:hover {
    color: var(--accent, #2563eb);
    border-bottom-color: rgba(37, 99, 235, 0.35);
  }
}

.welcome-header-section-link:focus-visible {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 3px;
  border-radius: 4px;
}

#welcomeTournamentsSection,
#welcomeAdsSection,
#sponsorsSection,
#welcomeEmployerCtaSection,
#partnersSection,
#welcomeSiteFooter {
  scroll-margin-top: 5.5rem;
}

@media (max-width: 900px) {
  .header--welcome .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
  }

  .header--welcome .header-inner > .logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .header--welcome .header-inner > .nav.welcome-auth-nav {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: auto;
  }

  .welcome-sections-nav-shell {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    max-width: 100%;
    width: 100%;
  }

  .welcome-header-sections-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
    max-width: 100%;
  }

  .welcome-header-sections-nav::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
  }

  .welcome-sections-scroll-rail {
    display: block;
    position: relative;
    height: 22px;
    margin-top: 0.25rem;
    border-radius: 999px;
    cursor: pointer;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    overflow: visible;
  }

  .welcome-sections-scroll-rail::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    border-radius: 999px;
    background: #e0e7ff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
    pointer-events: none;
  }

  .welcome-sections-scroll-rail[hidden] {
    display: none !important;
  }

  .welcome-sections-scroll-thumb {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    min-width: 2.75rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb 0%, #6366f1 52%, #7c3aed 100%);
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.35);
    transition: left 0.1s ease-out, width 0.1s ease-out;
    cursor: grab;
    pointer-events: auto;
  }

  .welcome-sections-scroll-rail.is-dragging .welcome-sections-scroll-thumb {
    cursor: grabbing;
    transition: none;
  }

  .welcome-sections-nav-shell.is-scroll-end .welcome-sections-scroll-thumb {
    opacity: 0.85;
  }

  .welcome-header-section-link {
    font-size: 0.82rem;
  }

  #welcomeTournamentsSection,
  #welcomeAdsSection,
  #partnersSection,
  #welcomeSiteFooter {
    scroll-margin-top: 7.5rem;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.logo-icon {
  width: var(--header-logo-size);
  height: var(--header-logo-size);
  flex-shrink: 0;
  background-color: #fff;
  background-image: url("public/PRO_TOURNY_LOGO.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border-radius: var(--header-logo-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.logo .logo-mark-img {
  width: var(--header-logo-size);
  height: var(--header-logo-size);
  flex-shrink: 0;
  object-fit: contain;
  border-radius: var(--header-logo-radius);
  display: block;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

/* Custom site logo image (injected from site settings) */
.logo .site-logo-header-img,
.dash-logo .site-logo-header-img,
.td-logo-button .site-logo-header-img,
.td-brand-logo.site-logo-header-img {
  height: var(--header-logo-size);
  width: auto;
  max-width: min(200px, 42vw);
  object-fit: contain;
  display: block;
  border-radius: var(--header-logo-radius);
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(15, 23, 42, 0.05);
  background: #fff;
}

.logo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.logo-title {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Welcome header: Host a Tournament dropdown */
.welcome-host-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.45rem 0.95rem;
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 999px;
  background: #fff;
  color: var(--text, #0f172a);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.welcome-host-menu-trigger:hover {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

.welcome-host-menu-trigger:focus-visible {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 2px;
}

.welcome-host-menu-trigger[aria-expanded="true"] {
  background: #f8fafc;
  border-color: rgba(37, 99, 235, 0.5);
}

.welcome-host-menu-caret {
  display: inline-block;
  font-size: 0.62rem;
  line-height: 1;
  color: #64748b;
}

.welcome-host-menu-panel {
  min-width: min(18.5rem, calc(100vw - 2rem));
  padding: 0.55rem;
}

.welcome-host-menu-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.welcome-host-menu-hint-wrap {
  padding: 0.15rem 0.35rem 0.05rem;
}

.welcome-host-menu-hint {
  margin: 0;
  padding: 0.35rem 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
  color: #64748b;
  text-align: center;
}

.welcome-host-menu-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 0.72rem;
  border-radius: 10px;
  text-decoration: none;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  transition: background 0.15s ease, color 0.15s ease;
}

.welcome-host-menu-link:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.welcome-host-menu-link-icon {
  flex: 0 0 auto;
  width: 1.25rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1;
}

.welcome-host-menu-link-text {
  min-width: 0;
}

.welcome-host-menu-divider {
  height: 1px;
  margin: 0.45rem 0.35rem;
  background: rgba(226, 232, 240, 0.95);
}

.welcome-host-menu-auth.auth-buttons {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.45rem !important;
  width: 100%;
}

.welcome-host-menu-auth.auth-buttons .btn {
  width: 100% !important;
  min-height: 42px;
  justify-content: center;
}

.welcome-host-menu-auth .welcome-auth-login-block {
  width: 100%;
}

body.welcome-auth-legacy-mode .welcome-host-menu-links,
body.welcome-auth-legacy-mode .welcome-host-menu-divider {
  display: none !important;
}

body.welcome-host-menu-mode .welcome-auth-menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 320;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 16px 40px rgba(15, 23, 42, 0.14);
}

body.welcome-host-menu-mode .welcome-auth-menu-panel[hidden] {
  display: none !important;
}

body.welcome-host-menu-mode .welcome-auth-menu-panel:not([hidden]) {
  display: block !important;
}

@media (min-width: 901px) {
  body.welcome-auth-legacy-mode .welcome-auth-menu-panel {
    position: static;
    top: auto;
    right: auto;
    z-index: auto;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: block !important;
  }

  body.welcome-auth-legacy-mode .welcome-auth-menu-panel[hidden] {
    display: block !important;
  }

  body.welcome-auth-legacy-mode .welcome-host-menu-trigger {
    display: none !important;
  }

  body.welcome-auth-legacy-mode .welcome-host-menu-auth.auth-buttons {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    gap: 0.45rem !important;
  }

  body.welcome-auth-legacy-mode .welcome-host-menu-auth.auth-buttons .btn {
    width: auto !important;
    min-height: 40px;
  }

  body.welcome-auth-legacy-mode .welcome-host-menu-auth .welcome-auth-login-block {
    width: auto;
  }
}

/* Welcome header: hamburger menu for Log in / Create account (all screen sizes) */
.welcome-auth-menu {
  position: relative;
  overflow: visible;
}

.welcome-menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 12px;
  background: #fff;
  color: var(--text, #0f172a);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.welcome-menu-toggle:hover {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

.welcome-menu-toggle:focus-visible {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 2px;
}

.welcome-menu-toggle[aria-expanded="true"] {
  background: #f8fafc;
  border-color: rgba(37, 99, 235, 0.5);
}

.welcome-menu-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.welcome-menu-toggle[aria-expanded="true"] .welcome-menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.welcome-menu-toggle[aria-expanded="true"] .welcome-menu-bar:nth-child(2) {
  opacity: 0;
}

.welcome-menu-toggle[aria-expanded="true"] .welcome-menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.welcome-auth-menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 320;
  min-width: min(16rem, calc(100vw - 2rem));
  padding: 0.65rem;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 16px 40px rgba(15, 23, 42, 0.14);
}

.welcome-auth-menu-panel:not([hidden]) {
  display: block;
}

.welcome-auth-menu-panel .auth-buttons {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
  flex-wrap: nowrap;
}

.welcome-auth-menu-panel .auth-buttons .btn {
  display: inline-flex !important;
  width: 100%;
  justify-content: center;
  min-height: 44px;
  flex: 0 0 auto;
}

.welcome-auth-login-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.welcome-auth-login-hint {
  margin: 0.4rem 0 0;
  padding: 0.5rem 0.55rem;
  font-size: 0.72rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  text-align: center;
  background: rgba(241, 245, 249, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
}

.welcome-auth-login-hint[hidden] {
  display: none !important;
}

#loginBtn.welcome-auth-item-hidden ~ .welcome-auth-login-hint {
  display: none !important;
}

.welcome-auth-menu-panel #signupBtn.btn-primary {
  background: var(--primary, #2563eb);
  color: #fff;
  border: none;
}

.welcome-auth-menu-panel .auth-buttons .btn.welcome-auth-item-hidden,
#loginBtn.welcome-auth-item-hidden,
#signupBtn.welcome-auth-item-hidden,
#forgotPasswordLink.welcome-auth-item-hidden,
#loginToSignupLink.welcome-auth-item-hidden,
#signupToLoginLink.welcome-auth-item-hidden {
  display: none !important;
}

body.welcome-auth-public-off .header--welcome .welcome-auth-nav,
.header--welcome .welcome-auth-nav.welcome-auth-nav-hidden,
.header--welcome .welcome-auth-menu.welcome-auth-nav-hidden {
  display: none !important;
}

.header--welcome .welcome-auth-nav {
  justify-self: end;
}

/* Welcome desktop: legacy inline Log in / Create account when host menu is off */
@media (min-width: 901px) {
  body.welcome-page:not(.welcome-host-menu-mode) .welcome-menu-toggle {
    display: none !important;
  }

  body.welcome-page:not(.welcome-host-menu-mode) .welcome-auth-menu-panel {
    position: static;
    top: auto;
    right: auto;
    z-index: auto;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: block !important;
  }

  body.welcome-page:not(.welcome-host-menu-mode) .welcome-auth-menu-panel[hidden] {
    display: block !important;
  }

  body.welcome-page:not(.welcome-host-menu-mode) .welcome-auth-menu-panel .auth-buttons {
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    gap: 0.45rem;
    flex-wrap: wrap;
  }

  body.welcome-page:not(.welcome-host-menu-mode) .welcome-auth-menu-panel .auth-buttons .btn {
    width: auto !important;
    min-height: 40px;
    white-space: nowrap;
  }

  body.welcome-page:not(.welcome-host-menu-mode) .welcome-auth-login-block {
    width: auto;
  }

  body.welcome-host-menu-mode .welcome-auth-menu-panel[hidden] {
    display: none !important;
  }

  body.welcome-host-menu-mode .welcome-auth-menu-panel:not([hidden]) {
    display: block !important;
  }

  body.welcome-host-menu-mode .welcome-host-menu-auth.auth-buttons {
    flex-direction: row !important;
    align-items: center;
    justify-content: stretch;
    gap: 0.45rem;
    width: 100%;
  }

  body.welcome-host-menu-mode .welcome-host-menu-auth.auth-buttons .btn {
    flex: 1 1 0;
    width: auto !important;
    min-height: 40px;
  }

  body.welcome-host-menu-mode .welcome-host-menu-auth .welcome-auth-login-block {
    flex: 1 1 0;
    width: auto;
  }
}

@media (max-width: 900px) {
  body.welcome-page:not(.welcome-host-menu-mode) .welcome-menu-toggle {
    display: inline-flex !important;
  }

  body.welcome-page .welcome-host-menu-trigger {
    display: inline-flex !important;
  }

  body.welcome-page:not(.welcome-host-menu-mode) .welcome-auth-menu {
    width: auto;
  }

  body.welcome-page .welcome-auth-nav {
    width: auto;
    justify-self: end;
  }

  body.welcome-page .welcome-auth-menu-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 320;
    min-width: min(16rem, calc(100vw - 2rem));
    padding: 0.65rem;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.8) inset,
      0 16px 40px rgba(15, 23, 42, 0.14);
  }

  body.welcome-page .welcome-auth-menu-panel[hidden] {
    display: none !important;
  }

  body.welcome-page .welcome-auth-menu-panel:not([hidden]) {
    display: block !important;
  }

  body.welcome-page .welcome-auth-menu-panel .auth-buttons {
    flex-direction: column !important;
    align-items: stretch;
    width: 100%;
    gap: 0.5rem;
    flex-wrap: nowrap;
  }

  body.welcome-page .welcome-auth-menu-panel .auth-buttons .btn,
  body.welcome-page .welcome-auth-menu-panel #signupBtn {
    width: 100% !important;
    min-height: 44px;
    justify-content: center;
  }

  body.welcome-page .welcome-auth-login-block {
    width: 100%;
    display: flex;
    flex-direction: column;
  }
}

/* Floated to document.body so hero cannot cover Log in / Create account */
.welcome-auth-menu-panel.welcome-auth-menu-panel--floated {
  position: fixed !important;
  z-index: 50000 !important;
  margin: 0;
  background: #fff;
  min-width: min(16rem, calc(100vw - 2rem));
  padding: 0.65rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 16px 40px rgba(15, 23, 42, 0.14);
}

.welcome-auth-menu-panel.welcome-auth-menu-panel--floated .auth-buttons {
  flex-direction: column !important;
  align-items: stretch;
  width: 100%;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.welcome-auth-menu-panel.welcome-auth-menu-panel--floated .auth-buttons .btn,
.welcome-auth-menu-panel.welcome-auth-menu-panel--floated #signupBtn {
  width: 100% !important;
  min-height: 44px;
  justify-content: center;
}

body.welcome-auth-menu-open .welcome-main,
body.welcome-auth-menu-open .welcome-hero {
  z-index: 0;
}

body.welcome-auth-menu-open .header--welcome {
  z-index: 10040;
  isolation: auto;
}

body.welcome-auth-menu-open .welcome-auth-menu-panel--floated {
  z-index: 50000 !important;
}

.btn {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-ghost:hover {
  background: rgba(37, 99, 235, 0.08);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

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

.btn-green {
  color: var(--green);
  border-color: var(--green);
}

.btn-green:hover { background: var(--green-bg); }

.btn.btn-green {
  background: var(--green);
  color: white;
  border: none;
}

.btn-small { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ----- Hero ----- */
.hero {
  position: relative;
  padding: 4rem 1.5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #e0e7ff 0%, #f0f4f8 45%, #fef3c7 100%);
  opacity: 0.9;
}

.hero-content {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 400;
  font-family: Arial, Helvetica, sans-serif;
}

/* Unified top hero info card (headline + intro + trust stats) */
.welcome-top-card {
  max-width: 980px;
  margin: 0.35rem auto 0;
  padding: clamp(1rem, 2.2vw, 1.35rem) clamp(1rem, 3vw, 1.9rem);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: none;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(6px);
  text-align: center;
}

.welcome-top-card #welcomeHeroSubheadline {
  margin: 0 auto 0.9rem;
  max-width: 56rem;
  font-size: 1.05rem;
  line-height: 1.66;
  font-weight: 400 !important;
  letter-spacing: normal;
  color: #475569 !important;
  text-align: left;
  font-family: Arial, Helvetica, sans-serif !important;
  -webkit-text-fill-color: #475569;
  text-shadow: none !important;
}

.welcome-top-card #welcomeHeroSubheadline .welcome-hero-para {
  margin: 0 0 0.72rem;
  font-size: 1.05rem;
  font-weight: 400 !important;
  color: #475569 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  -webkit-text-fill-color: #475569;
  text-shadow: none !important;
  opacity: 1 !important;
}

.welcome-top-card #welcomeHeroSubheadline .welcome-hero-para:last-child {
  margin-bottom: 0;
}

.welcome-top-card #welcomeHeroSubheadline .welcome-hero-para--features,
#welcomeHeroSubheadline .welcome-hero-para--features {
  display: none !important;
}

.welcome-top-card .hero-stats {
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin: 0.2rem 0 0;
}

.welcome-top-card .hero-stats .stat {
  min-height: 44px;
  padding: 0.52rem 1.08rem;
  font-size: 1rem;
  font-weight: 700;
}

.welcome-top-card .hero-stats .stat .stat-icon {
  font-size: 1.02rem;
}

/* Welcome hero — compact layout on phone browsers */
@media (max-width: 640px) {
  body.welcome-page .hero.hero--canvas2 {
    padding: 0.35rem max(0.75rem, env(safe-area-inset-right, 0px)) 0.65rem
      max(0.75rem, env(safe-area-inset-left, 0px));
    min-height: 0;
  }

  body.welcome-page .hero.hero--canvas2 > .hero-content,
  body.welcome-page .hero.hero--canvas2 > .welcome-top-card {
    display: block;
    max-width: 100%;
  }

  body.welcome-page .hero.hero--canvas2 > .hero-content {
    padding: 0;
    margin-bottom: 0.35rem;
  }

  body.welcome-page .hero.hero--canvas2 .hero-title {
    font-size: clamp(1.28rem, 5.2vw, 1.72rem);
    line-height: 1.22;
    margin-bottom: 0.5rem;
  }
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.welcome-bullet-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.welcome-bullet-list li {
  margin: 0 0 0.35rem;
  line-height: 1.35;
  color: var(--text);
}

#welcomeTopContentSection .feature-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(1rem, 2.3vw, 1.5rem) clamp(1rem, 2.4vw, 1.8rem);
  text-align: left;
}

#welcomeTopContentSection #welcomeHeroSubheadline {
  margin: 0 0 0.95rem;
  font-size: 1.05rem;
  line-height: 1.66;
  color: #475569;
  font-weight: 400;
  letter-spacing: normal;
  font-family: Arial, Helvetica, sans-serif;
}

#welcomeTopContentSection .hero-stats {
  justify-content: flex-start;
  gap: 0.65rem;
  margin: 0.2rem 0 1.05rem;
}

#welcomeTopContentSection .hero-stats .stat {
  border-radius: 999px;
  padding: 0.58rem 1.05rem;
  font-size: 1.08rem;
  font-weight: 700;
  border: none !important;
  box-shadow: none !important;
  background: rgba(248, 250, 252, 0.7);
}

#welcomeTopContentSection .hero-stats .stat.stat-green {
  border: none !important;
  box-shadow: none !important;
  background: rgba(16, 185, 129, 0.14);
  color: #065f46;
}

#welcomeTopContentSection .welcome-bullet-list {
  margin: 0.35rem 0 0.85rem;
  padding-left: 0;
  list-style: none;
}

#welcomeTopContentSection .welcome-bullet-list li {
  position: relative;
  padding-left: 1.45rem;
  margin-bottom: 0.62rem;
  color: #0f172a;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.66;
  max-width: 70rem;
}

#welcomeTopContentSection .welcome-bullet-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.03rem;
  font-weight: 800;
  color: #059669;
}

#welcomeTopContentSection .welcome-line-lead {
  font-weight: 800;
  color: #0b3f8a;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-muted);
  box-shadow: var(--shadow);
}

.stat-icon { font-size: 1rem; }

.stat-green {
  color: var(--green);
  border: 1px solid var(--green);
  background: var(--green-bg);
}

.stat-purple {
  color: var(--purple);
  border: 1px solid var(--purple);
  background: var(--purple-bg);
}

/* ----- Welcome page (index only) ----- */
body.welcome-page {
  background: linear-gradient(180deg, #e6edf6 0%, var(--bg) 24%, var(--bg) 100%);
}

/* Hide header auth CTAs until site-settings + applyWelcomeAuthVisibility (registration-off flash). */
body.welcome-page:not(.welcome-auth-ready) .header--welcome .welcome-auth-menu {
  visibility: hidden !important;
}


body.welcome-page .header--welcome {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, 0 10px 36px rgba(15, 23, 42, 0.07);
}

.hero.hero--canvas2 {
  isolation: isolate;
}

.hero.hero--canvas2 .hero-bg {
  z-index: 0;
  opacity: 0.96;
  background: linear-gradient(156deg, #d8e2ff 0%, #eef2f7 40%, #fdf4e4 100%);
}

.hero.hero--canvas2::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.88;
  background:
    radial-gradient(ellipse 88% 58% at 12% -8%, rgba(37, 99, 235, 0.24), transparent 56%),
    radial-gradient(ellipse 72% 52% at 94% 6%, rgba(124, 58, 237, 0.2), transparent 52%),
    radial-gradient(ellipse 58% 48% at 50% 104%, rgba(5, 150, 105, 0.14), transparent 50%),
    conic-gradient(
      from 200deg at 42% 48%,
      rgba(37, 99, 235, 0.06),
      transparent 35%,
      rgba(124, 58, 237, 0.07),
      transparent 70%,
      rgba(5, 150, 105, 0.05),
      transparent 92%
    );
}


.hero.hero--canvas2::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.3;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E");
}


@media (prefers-reduced-motion: reduce) {
  .hero.hero--canvas2::before {
    animation: none;
  }
}

/* ----- Registration flow: mesh canvas + glass (event picker, register, thank you) ----- */
body.registration-canvas-flow {
  position: relative;
  background: linear-gradient(180deg, #ece8fb 0%, #e5eaf4 30%, var(--bg) 62%, var(--bg) 100%);
}

.reg-flow-canvas-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.reg-flow-canvas-bg__mesh {
  position: absolute;
  inset: -42%;
  opacity: 0.94;
  background:
    radial-gradient(ellipse 88% 58% at 12% -8%, rgba(37, 99, 235, 0.22), transparent 56%),
    radial-gradient(ellipse 72% 52% at 94% 6%, rgba(124, 58, 237, 0.18), transparent 52%),
    radial-gradient(ellipse 58% 48% at 50% 104%, rgba(5, 150, 105, 0.12), transparent 50%),
    conic-gradient(
      from 200deg at 42% 48%,
      rgba(37, 99, 235, 0.06),
      transparent 35%,
      rgba(124, 58, 237, 0.07),
      transparent 70%,
      rgba(5, 150, 105, 0.05),
      transparent 92%
    );
  animation: reg-flow-mesh-drift 20s ease-in-out infinite alternate;
}

.reg-flow-canvas-bg__grain {
  position: absolute;
  inset: 0;
  opacity: 0.36;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='rg'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23rg)'/%3E%3C/svg%3E");
}

@keyframes reg-flow-mesh-drift {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  100% {
    transform: translate(2.2%, 3.2%) rotate(4.5deg) scale(1.035);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reg-flow-canvas-bg__mesh {
    animation: none;
  }
}

body.registration-canvas-flow > header,
body.registration-canvas-flow > main {
  position: relative;
  z-index: 1;
}

body.registration-canvas-flow .dash-header {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(109, 40, 217, 0.14);
  box-shadow: 0 4px 28px rgba(99, 102, 241, 0.08);
}

body.registration-canvas-flow .dash-tagline {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(37, 99, 235, 0.14));
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: #5b21b6;
  box-shadow: 0 1px 12px rgba(99, 102, 241, 0.12);
}

body.registration-canvas-flow .dash-section {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 4px 28px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.registration-canvas-flow .dash-table thead {
  background: rgba(241, 245, 249, 0.88);
}

body.registration-canvas-flow .dash-table tbody tr:hover {
  background: rgba(248, 250, 252, 0.92);
}

body.registration-canvas-flow .register-page-main {
  background: transparent;
}

body.registration-canvas-flow .draws-card {
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 4px 26px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.registration-canvas-flow .draws-card-title {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.5));
  border-bottom-color: rgba(99, 102, 241, 0.1);
}

body.registration-canvas-flow .reg-fieldset {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(99, 102, 241, 0.14);
  box-shadow: 0 2px 16px rgba(99, 102, 241, 0.06);
}

body.registration-canvas-flow .thankyou-card {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 8px 40px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(99, 102, 241, 0.08) inset;
}

body.registration-canvas-flow .thankyou-icon {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.25), rgba(37, 99, 235, 0.12));
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #047857;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.2);
}

.hero.hero--canvas2 .hero-content {
  position: relative;
  z-index: 3;
}


body.welcome-page .hero-desc {
  font-weight: 400;
  font-family: Arial, Helvetica, sans-serif;
  text-shadow: none;
}

body.welcome-page .hero-stats .stat:not(.stat-green):not(.stat-purple) {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 22px rgba(15, 23, 42, 0.07);
}

body.welcome-page .hero-stats .stat.stat-green {
  background: rgba(209, 250, 229, 0.88);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  box-shadow: 0 4px 22px rgba(5, 150, 105, 0.08);
}

body.welcome-page .hero-stats .stat.stat-purple {
  background: rgba(237, 233, 254, 0.88);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  box-shadow: 0 4px 22px rgba(124, 58, 237, 0.1);
}








/* ----- Tabs ----- */
.tabs-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.tabs-above {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tabs-above .location-display:empty {
  display: none;
}

.tabs-above .tabs-wrap--center {
  justify-content: flex-end;
}

.location-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.welcome-tournaments-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.welcome-tournaments-search {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.28rem 0.55rem 0.28rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fff;
}

.welcome-tournaments-search-icon {
  font-size: 0.95rem;
  line-height: 1;
  color: #64748b;
  flex-shrink: 0;
}

.welcome-tournaments-search-input {
  width: 8.5rem;
  max-width: 36vw;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text, #0f172a);
  padding: 0.15rem 0;
  outline: none;
}

.welcome-tournaments-search-input::placeholder {
  color: #94a3b8;
}

.welcome-tournaments-search-input::-webkit-search-decoration,
.welcome-tournaments-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.location-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.location-label::before {
  content: none;
}

.location-gmaps-icon,
.location-label .pt-gmaps-pin-icon {
  width: 1.15rem;
  height: 1.15rem;
  max-width: 1.15rem;
  flex-shrink: 0;
  display: block;
}

.location-label-text {
  min-width: 0;
}

.td-venue-pin-icon,
.welcome-venue-gmaps-icon {
  display: block;
}

.tabs-wrap {
  display: flex;
  gap: 0.25rem;
}

.tabs-wrap--center {
  justify-content: center;
}

.tab {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tab:hover {
  background: #f8fafc;
  color: var(--text);
}

.tab-active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.tabs-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  min-height: 120px;
  box-shadow: var(--shadow);
}

body.welcome-page .tabs-content {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(155%);
  -webkit-backdrop-filter: blur(18px) saturate(155%);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.55) inset,
    0 10px 40px rgba(15, 23, 42, 0.08),
    0 0 90px rgba(37, 99, 235, 0.06);
}


body.welcome-page .tabs-above {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}



.tabs-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
}

/* ----- Tournaments table ----- */
.tournaments-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tournaments-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tournaments-table th,
.tournaments-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  background-clip: padding-box;
}

.tournaments-table th {
  font-weight: 600;
  color: var(--text-muted);
  background: #f8fafc;
  vertical-align: bottom;
}

.tournaments-table tbody td {
  vertical-align: top;
  background-color: var(--surface, #fff);
}

.tournaments-table .th-sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: none;
  color: var(--text-muted);
}

.tournaments-table tbody tr:hover td {
  background-color: #f1f5f9;
}

.welcome-tournaments-table-wrap .tournaments-table tbody tr.welcome-tournament-row:hover td {
  background-color: #eff6ff;
  border-bottom-color: #bfdbfe;
}

.welcome-tournament-title-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.welcome-tournament-status {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

.welcome-tournament-status--upcoming {
  background: #dbeafe;
  color: #1d4ed8;
}

.welcome-tournament-status--live {
  background: #fee2e2;
  color: #b91c1c;
}

.welcome-tournament-status--completed {
  background: #f1f5f9;
  color: #475569;
}

.welcome-tournament-sport-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.welcome-tournament-sport-chip--muted {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

/* Web home cards: show event/player icons (numbers stay plain on very small web only) */
body.welcome-page:not(.pt-native-app) .welcome-tournament-stat,
body.welcome-page:not(.pt-native-app) .welcome-tournament-stat-main {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 100%;
}

body.welcome-page:not(.pt-native-app) .welcome-tournament-stat-main {
  flex-direction: row;
  gap: 0.35rem;
}

body.welcome-page:not(.pt-native-app) .welcome-tournament-stat-icon {
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
}

body.welcome-page:not(.pt-native-app) .welcome-tournament-stat-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94a3b8;
}

body.welcome-page:not(.pt-native-app) .welcome-tournament-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

/* Web: plain sport text (no pill) */
body.welcome-page:not(.pt-native-app) .welcome-tournament-sport-chip,
body.welcome-page:not(.pt-native-app) .welcome-tournament-sport-chip--muted {
  display: inline;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}

.location-display-main {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.location-display-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.location-display-main .location-label::before {
  content: none;
}

@media (min-width: 769px) {
  .welcome-tournament-title-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
  }
}

.welcome-tournaments-table-wrap .tournaments-table tbody tr.welcome-tournament-row:hover td:first-child {
  box-shadow: inset 4px 0 0 var(--primary);
}




.tournaments-table .th-action,
.tournaments-table .td-action:not(.td-action-stack) {
  white-space: nowrap;
  width: 1%;
}

.tournaments-table .td-action.td-action-stack {
  white-space: normal;
  vertical-align: top;
  width: auto;
  min-width: 8.5rem;
}

.tournaments-table .td-action-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
}

.tournaments-table .td-action-stack .btn {
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
}

.tournaments-table .th-poster,
.tournaments-table .td-poster {
  min-width: 4.75rem;
  max-width: 7rem;
  text-align: center;
  vertical-align: top;
  border-left: 1px solid #e2e8f0;
}

/* Welcome tournaments table: larger poster thumbnails on web/desktop */
.welcome-tournaments-table-wrap .tournaments-table .th-poster,
.welcome-tournaments-table-wrap .tournaments-table .td-poster {
  min-width: 4.5rem;
  max-width: 5.5rem;
}

.welcome-tournaments-table-wrap .tournament-poster,
.welcome-tournaments-table-wrap .tournament-poster-placeholder {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 10px;
}

.td-poster-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  margin: 0 auto;
  max-width: 7rem;
}

.td-poster-contact {
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
  color: var(--text-muted);
}

.td-poster-contact-line .td-poster-contact-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

.td-poster-contact-line + .td-poster-contact-line {
  margin-top: 0.35rem;
}

.td-poster-contact--empty {
  font-size: 0.8rem;
}

.tournaments-table .td-email-link {
  color: var(--primary);
  text-decoration: none;
  word-break: break-word;
}

.tournaments-table .td-email-link:hover {
  text-decoration: underline;
}

.tournaments-table .th-stat,
.tournaments-table .td-stat {
  text-align: center;
  white-space: nowrap;
  width: 4.5rem;
  font-variant-numeric: tabular-nums;
}

.welcome-tournament-stat {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 100%;
  min-width: 0;
}

.welcome-tournament-stat-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.welcome-tournament-stat-icon {
  width: 1.05rem;
  height: 1.05rem;
  max-width: 1.05rem;
  flex-shrink: 0;
}

/* Home venue + map — global svg { max-width:100% } must not stretch the pin */
.welcome-venue-home-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  min-width: 0;
}

.welcome-venue-home-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #475569;
  line-height: 1.35;
}

.welcome-venue-gmaps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 2.15rem;
  min-height: 2.15rem;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.welcome-venue-gmaps-btn .welcome-venue-gmaps-icon {
  width: 1.2rem;
  height: 1.2rem;
  max-width: 1.2rem;
  flex-shrink: 0;
}

.td-stat--events .welcome-tournament-stat-icon {
  color: #2563eb;
}

.td-stat--players .welcome-tournament-stat-icon {
  color: #6366f1;
}

.welcome-tournament-stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.welcome-tournament-stat-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.15;
}

@media (min-width: 901px) {
  .welcome-tournament-stat-label {
    display: none;
  }

  .welcome-tournament-stat-value {
    font-size: 0.95rem;
  }
}

.tournaments-table .th-phone,
.tournaments-table .td-phone {
  max-width: 9.5rem;
  font-size: 0.88rem;
  word-break: break-word;
}

.tournaments-table .td-phone-link {
  color: var(--primary);
  text-decoration: none;
}

.tournaments-table .td-phone-link:hover {
  text-decoration: underline;
}

.tournaments-table .td-whatsapp-link {
  color: #16a34a;
  text-decoration: none;
  word-break: break-word;
}

.tournaments-table .td-whatsapp-link:hover {
  text-decoration: underline;
}

.tournaments-table .td-venue-cell {
  vertical-align: top;
  max-width: 14rem;
}

.tournaments-table .td-dates-cell {
  min-width: 7.1rem;
  font-variant-numeric: tabular-nums;
}

.tournaments-table .td-date-line {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  line-height: 1.35;
}

.tournaments-table .td-venue-line {
  line-height: 1.35;
}

.tournaments-table .td-venue-line--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
}

.tournaments-table .td-venue-line--inline .td-venue-name {
  font-weight: 500;
}

.tournaments-table .td-venue-line--inline .td-venue-map-link--inline {
  margin-top: 0;
  font-size: 0.84rem;
  white-space: nowrap;
}

.tournaments-table .td-venue-link {
  margin-top: 0.35rem;
  font-size: 0.88rem;
}

.tournaments-table .td-venue-map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.2);
}

@media (max-width: 768px) {
  .tournaments-table .td-venue-map-link,
  .td-subtitle .td-subtitle-venue-link {
    min-height: 44px;
    padding: 0.35rem 0.15rem;
    align-items: center;
  }
}

.tournaments-table .td-venue-map-link:hover {
  text-decoration: underline;
}

.tournaments-table .td-venue-pin {
  display: inline-flex;
  align-items: center;
  font-style: normal;
  line-height: 1;
  vertical-align: middle;
}

.tournaments-table .td-venue-pin-icon {
  width: 1rem;
  height: 1rem;
  max-width: 1rem;
  margin-right: 0.15rem;
}

/* ----- Native app (Flutter WebView): same components as web, safe areas, table layout ----- */
body.pt-native-app {
  padding-top: var(--pt-safe-top, env(safe-area-inset-top, 0px));
  padding-right: var(--pt-safe-right, env(safe-area-inset-right, 0px));
  padding-bottom: var(--pt-safe-bottom, env(safe-area-inset-bottom, 0px));
  padding-left: var(--pt-safe-left, env(safe-area-inset-left, 0px));
}

/* Welcome / public pages use a fixed header with its own safe-area (native-app-mobile.css). */
body.pt-native-app.welcome-page,
body.pt-native-app.pt-public-page,
body.pt-native-app.results-page,
body.pt-native-app.pt-draws-page,
body.pt-native-app.dashboard-body,
body.pt-native-app.td-details-page {
  padding-top: 0;
}

body.pt-native-app .header--welcome .header-inner {
  grid-template-columns: 1fr auto;
  align-items: center;
}

body.pt-native-app .header--welcome .header-inner > .logo {
  grid-column: 1;
  grid-row: 1;
}

body.pt-native-app .header--welcome .header-inner > .nav {
  grid-column: 2;
  grid-row: 1;
}

body.pt-native-app .welcome-sections-nav-shell {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: stretch;
  max-width: 100%;
  width: 100%;
}


body.pt-native-app .tabs-content {
  padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
}

/* Welcome page: each tournament = card grid on phones / small browsers (not native app) */
@media (max-width: 900px) {
  .welcome-tournaments-table-wrap {
    overflow-x: hidden !important;
    max-width: 100%;
  }

  .welcome-tournaments-table-wrap .tournaments-table {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
  }

  .welcome-tournaments-table-wrap .tournaments-table thead {
    display: none;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody {
    display: block;
    width: 100%;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody tr.welcome-tournament-row {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "poster title title"
      "sport dates dates"
      "venue venue venue"
      ". events players"
      "actions actions actions";
    column-gap: 0.65rem;
    row-gap: 0.4rem;
    width: 100%;
    max-width: 100%;
    margin-bottom: 0.85rem;
    padding: 0.9rem 0.95rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--primary, #2563eb);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface, #fff);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.07);
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td {
    display: block;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box;
    padding: 0 !important;
    border: none !important;
    text-align: left;
    font-size: 0.8125rem;
    line-height: 1.35;
    overflow-wrap: break-word;
    white-space: normal !important;
    color: #1e293b;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(1) {
    grid-area: title;
    align-self: center;
    padding-left: 0.05rem !important;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(2) {
    grid-area: sport;
    text-align: center;
    white-space: nowrap !important;
    overflow-wrap: normal;
    word-break: keep-all;
    text-overflow: ellipsis;
    overflow: hidden;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.25;
    align-self: start;
    color: #0f172a;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(3) {
    grid-area: dates;
    align-self: start;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(4) {
    grid-area: venue;
    margin-top: 0.15rem;
    padding-top: 0.55rem !important;
    border-top: 1px solid #f1f5f9;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(5) {
    grid-area: events;
    align-self: start;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(6) {
    grid-area: players;
    align-self: start;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(7) {
    grid-area: actions;
    margin-top: 0.2rem;
    padding-top: 0.6rem !important;
    border-top: 1px solid #e2e8f0;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td.td-poster {
    display: contents;
  }

  .welcome-tournaments-table-wrap .td-poster-stack {
    display: contents;
  }

  .welcome-tournaments-table-wrap .tournament-poster,
  .welcome-tournaments-table-wrap .tournament-poster-placeholder,
  .welcome-tournaments-table-wrap .tournament-poster-placeholder--rich {
    grid-area: poster;
    width: 5.5rem;
    height: 5.5rem;
    min-height: 5.5rem;
    object-fit: cover;
    border-radius: 10px;
    margin: 0;
    align-self: start;
    justify-self: center;
  }

  .welcome-tournaments-table-wrap .tournament-poster-placeholder,
  .welcome-tournaments-table-wrap .tournament-poster-placeholder--rich {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 0.85rem;
  }

  .welcome-tournaments-table-wrap .td-poster-contact {
    grid-area: phone;
    padding-top: 0.1rem;
    margin-top: 0;
    border-top: none;
    text-align: center;
    align-self: start;
  }

  .welcome-tournaments-table-wrap .td-poster-contact--empty {
    display: none;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td::before {
    display: block;
    content: attr(data-label);
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.18rem;
    line-height: 1.15;
    white-space: nowrap;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(2)::before {
    text-align: center;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(1)::before,
  .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(7)::before,
  .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(8)::before {
    display: none;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td strong {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.28;
    color: #0f172a;
    display: block;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td.td-stat::before {
    display: none;
  }

  .welcome-tournaments-table-wrap .tournaments-table .td-stat {
    text-align: center;
    font-weight: 700;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
  }

  .welcome-tournaments-table-wrap .tournaments-table .welcome-tournament-stat-value {
    font-size: 1.1rem;
  }

  .welcome-tournaments-table-wrap .tournaments-table .welcome-tournament-stat-label {
    font-size: 0.58rem;
  }

  .welcome-tournaments-table-wrap .tournaments-table .td-date-line {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .welcome-tournaments-table-wrap .tournaments-table .td-date-line--range {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: 0.72rem;
    line-height: 1.35;
    word-break: break-word;
  }

  .welcome-tournaments-table-wrap .tournaments-table .td-date-line + .td-date-line {
    margin-top: 0.08rem;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td.td-venue-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    width: 100%;
    min-width: 0;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td.td-venue-cell::before {
    display: block;
    width: 100%;
    margin-bottom: 0.06rem;
  }

  .welcome-tournaments-table-wrap .welcome-venue-home-cell {
    width: 100%;
    justify-content: flex-start;
    gap: 0.45rem;
  }

  .welcome-tournaments-table-wrap .welcome-venue-home-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(2) .welcome-tournament-sport-chip {
    display: inline;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
  }

  .welcome-tournaments-table-wrap .tournaments-table .td-venue-line {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1e293b;
  }

  .welcome-tournaments-table-wrap .tournaments-table .td-venue-line--inline {
    gap: 0.3rem 0.45rem;
  }

  .welcome-tournaments-table-wrap .tournaments-table .td-venue-line--inline .td-venue-map-link--inline {
    min-height: 0;
    padding: 0;
    font-size: 0.74rem;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody td.td-action {
    padding-top: 0.6rem !important;
  }

  .welcome-tournaments-table-wrap .tournaments-table .td-action-stack {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.45rem;
    width: 100%;
  }

  .welcome-tournaments-table-wrap .tournaments-table .td-action-stack .btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    min-height: 40px;
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
    line-height: 1.15;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table .td-action-stack .btn-view:hover,
  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table .td-action-stack .btn-view:active,
  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table .td-action-stack .btn-result:hover,
  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table .td-action-stack .btn-result:active,
  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table .td-action-stack .btn-register:hover,
  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table .td-action-stack .btn-register:active {
    transform: scale(0.98);
  }

  .welcome-tournaments-table-wrap .tournaments-table .td-action-stack .btn-icon {
    font-size: 0.85em;
  }

  .welcome-tournaments-table-wrap .td-poster-contact-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.08rem;
    width: 100%;
    max-width: 4.5rem;
    font-size: 0.62rem;
    line-height: 1.2;
  }

  .welcome-tournaments-table-wrap .td-poster-contact-label {
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
  }

  .welcome-tournaments-table-wrap .td-poster .td-phone-link {
    font-size: 0.58rem;
    line-height: 1.15;
    font-weight: 600;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
  }

  .welcome-tournaments-table-wrap .td-poster .td-whatsapp-link {
    font-size: 0.58rem;
    line-height: 1.15;
    font-weight: 600;
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody tr.welcome-tournament-row:hover {
    border-left-color: #1d4ed8;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
  }

  .welcome-tournaments-table-wrap .tournaments-table tbody tr:hover td {
    background-color: transparent;
  }


}

/* Tournament details — Winners tab */
.td-winners-wrap {
  margin-top: 0.75rem;
}
.td-winners-table .td-winner-event-name {
  font-weight: 600;
}
.td-winners-table .td-winner-note {
  margin-top: 0.25rem;
  font-size: 0.82rem;
}

.td-winners-table .td-winner-cell-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

.td-winners-table .td-podium-photo {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.td-winners-table .td-podium-photo:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

@media (min-width: 768px) {
  .td-winners-table .td-podium-photo {
    max-width: 220px;
  }
}

/* Tournament details — podium lightbox title inside wide modal box */
.td-podium-photo-modal-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  padding-right: 2.5rem;
  color: #0f172a;
}

.welcome-results-photo-modal-box .modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
}

.td-winners-table .td-winner-name {
  font-size: 0.95rem;
  line-height: 1.3;
  word-break: break-word;
}

.tournament-poster {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0 auto;
  cursor: pointer;
}

.tournament-poster-placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.poster-modal-box {
  max-width: min(96vw, 920px);
  max-height: min(90vh, 90dvh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.poster-modal-box .modal-close {
  z-index: 3;
  touch-action: manipulation;
}

.poster-modal-body {
  padding: 1rem 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.poster-modal-body::-webkit-scrollbar {
  width: 8px;
}

.poster-modal-body::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.45);
  border-radius: 4px;
}

.poster-modal-body::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.5);
  border-radius: 4px;
}

.poster-modal-poster-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.poster-modal-body img,
#posterModalImage {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(72vh, 900px);
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

/* Welcome Results + Tournament details Winners: podium / gallery lightbox */
.welcome-results-photo-modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
}

.welcome-results-photo-modal-body {
  padding: 0.75rem 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.welcome-results-photo-modal-body img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(82vh, 82dvh, 900px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

.poster-modal-contact {
  width: 100%;
  max-width: 24rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: center;
}

.poster-modal-contact a {
  color: var(--primary);
  word-break: break-word;
}

.poster-modal-contact a.td-whatsapp-link {
  color: #16a34a;
}

.poster-modal-details {
  min-width: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
}

.poster-modal-details[data-loading="1"] {
  opacity: 0.65;
}

.poster-modal-details-title {
  margin: 0 0 0.55rem;
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
}

.poster-modal-detail-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
  align-items: start;
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.45);
}

.poster-modal-detail-row:last-of-type {
  border-bottom: none;
}

.poster-modal-detail-key {
  font-size: 0.84rem;
  font-weight: 700;
  color: #475569;
  line-height: 1.45;
}

.poster-modal-detail-val {
  font-size: 0.98rem;
  color: #0f172a;
  line-height: 1.55;
  white-space: pre-line;
  word-break: normal;
  overflow-wrap: anywhere;
}

.poster-modal-open-page {
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  .poster-modal-box {
    max-width: min(94vw, 520px);
    max-height: 92vh;
    border-radius: 14px;
  }

  .poster-modal-body {
    padding: 0.75rem 0.85rem 1rem;
    gap: 0.75rem;
    overflow-y: scroll;
    max-height: calc(min(92vh, 92dvh) - 3.75rem);
  }

  .poster-modal-poster-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex-shrink: 0;
  }

  #posterModalImage {
    width: 100%;
    max-width: 100%;
    max-height: min(50vh, 420px);
  }

  .poster-modal-details {
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 0.9rem 0.9rem 1rem;
  }

  .poster-modal-details-title {
    font-size: 1rem;
    margin-bottom: 0.55rem;
  }

  .poster-modal-detail-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding: 0.4rem 0;
  }

  .poster-modal-detail-key {
    font-size: 0.76rem;
    letter-spacing: 0.01em;
    text-transform: none;
  }

  .poster-modal-detail-val {
    font-size: 0.93rem;
    line-height: 1.46;
  }

  .poster-modal-open-page {
    width: 100%;
    text-align: center;
  }
}

.poster-download-btn {
  margin-left: auto;
  margin-right: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.poster-download-btn:hover {
  background: #eff6ff;
  border-color: var(--primary);
}

.btn-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.btn-icon-btn .btn-icon {
  font-size: 1rem;
}

.btn-register {
  background: var(--primary);
  color: white;
  border: none;
}

.btn-register:hover {
  background: var(--primary-hover);
}

.btn-score {
  background: var(--live-red);
  color: white;
  border: none;
}

.btn-score:hover {
  background: #b91c1c;
}

.btn-view,
.btn-result {
  background: #fff;
  color: var(--text, #1a2332);
  border: 1px solid #e2e8f0;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-view:hover,
.btn-view:active,
.btn-result:hover,
.btn-result:active {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.28);
}

.btn-view:focus-visible,
.btn-result:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Welcome web table: all action buttons match table text + row borders */
body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-action-stack .btn-view,
body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-action-stack .btn-result,
body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-action-stack .btn-register {
  background: #fff;
  color: var(--text, #1a2332);
  border: 1px solid #e2e8f0;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: none;
}

body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-action-stack .btn-view:hover,
body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-action-stack .btn-view:active,
body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-action-stack .btn-result:hover,
body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-action-stack .btn-result:active,
body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-action-stack .btn-register:hover,
body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-action-stack .btn-register:active {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.28);
}

body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-action-stack .btn-register:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ----- Pagination ----- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-btns {
  display: flex;
  gap: 0.5rem;
}

.pagination .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ----- CTA Reviews ----- */
.cta-reviews {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: white;
  padding: 3rem 1.5rem;
  text-align: center;
}

.cta-reviews-inner {
  max-width: 560px;
  margin: 0 auto;
}

.cta-reviews h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.cta-reviews p {
  opacity: 0.95;
  margin-bottom: 1.5rem;
}

.btn-cta {
  background: white;
  color: var(--primary);
}

.btn-cta:hover {
  background: #f0f4f8;
  color: var(--primary-hover);
}

.btn-cta .btn-icon {
  margin-right: 0.35rem;
}

/* ----- Reviews section ----- */
.reviews-section {
  padding: 3rem 1.5rem;
  background: linear-gradient(180deg, #e8eef5 0%, #dde5f0 100%);
}


.reviews-section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.reviews-heading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.reviews-heading {
  margin: 0;
  font-size: 1.5rem;
}

.btn-review-add {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--surface);
  color: var(--primary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.btn-review-add:hover {
  background: var(--primary);
  color: white;
}

.reviews-layout {
  display: block;
}

.reviews-carousel {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
}

.reviews-carousel-nav {
  display: none;
  flex: 0 0 auto;
  align-self: center;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.reviews-carousel-nav:hover:not(:disabled) {
  background: #fff;
  transform: scale(1.04);
}

.reviews-carousel-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.reviews-carousel--single .reviews-carousel-nav {
  display: none !important;
}

@media (max-width: 768px) {
  .reviews-carousel-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .reviews-carousel .reviews-list-wrap {
    flex: 1 1 auto;
    min-width: 0;
    scrollbar-width: none;
  }

  .reviews-carousel .reviews-list-wrap::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
  }

  .reviews-grid .review-card {
    min-width: min(280px, calc(100vw - 5.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    max-width: min(320px, calc(100vw - 5.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  }
}

body.welcome-home-v2 .welcome-reviews .reviews-carousel-nav {
  border-color: rgba(191, 219, 254, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

body.welcome-home-v2 .welcome-reviews .reviews-carousel-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.review-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.review-form input,
.review-form select,
.review-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.review-form textarea {
  resize: vertical;
  min-height: 80px;
}

.review-form .form-error {
  margin-bottom: 0.5rem;
}

.review-form .review-email-otp-section {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  background: #f8fafc;
}

.review-form .review-email-otp-section legend {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary, #2563eb);
  padding: 0 0.25rem;
}

.review-form .pt-circuit-reg-otp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.5rem;
}

.review-form .pt-circuit-reg-otp-hint,
.review-form .pt-circuit-reg-otp-resend {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.84rem;
  color: var(--text-muted, #64748b);
}

.review-form .pt-circuit-reg-otp-actions {
  margin-top: 0.5rem;
}

.review-form .pt-circuit-reg-verified-badge {
  margin: 0.5rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.88rem;
  font-weight: 600;
}

.review-form .pt-circuit-reg-otp-entry[hidden] {
  display: none !important;
}

/* Review modal — compact pop-up (all fields retained) */
#reviewModal[aria-hidden="false"] {
  align-items: flex-start;
  padding-top: max(0.65rem, env(safe-area-inset-top, 0px));
  padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
}

#reviewModal .review-modal-box {
  width: min(100%, 360px);
  max-height: min(86dvh, 540px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1.05rem 0.85rem;
  margin: auto;
}

#reviewModal .review-modal-box h2 {
  margin-bottom: 0.65rem;
  font-size: 1.12rem;
  padding-right: 1.65rem;
}

#reviewModal .review-form label {
  font-size: 0.8rem;
  margin-bottom: 0.18rem;
}

#reviewModal .review-form input,
#reviewModal .review-form select,
#reviewModal .review-form textarea {
  padding: 0.38rem 0.55rem;
  font-size: 0.88rem;
  margin-bottom: 0.55rem;
}

#reviewModal .review-form textarea {
  min-height: 4.5rem;
  resize: vertical;
}

#reviewModal .review-form .review-photo-input {
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
}

#reviewModal .review-form .review-email-otp-section {
  margin: 0 0 0.55rem;
  padding: 0.5rem 0.6rem 0.6rem;
}

#reviewModal .review-form .review-email-otp-section legend {
  font-size: 0.7rem;
  margin-bottom: 0.15rem;
}

#reviewModal .review-form .form-hint {
  margin: 0 0 0.35rem;
  font-size: 0.74rem;
  line-height: 1.35;
}

#reviewModal .review-form .pt-circuit-reg-otp-row {
  gap: 0.4rem 0.65rem;
  margin-bottom: 0.4rem;
}

#reviewModal .review-form .pt-circuit-reg-otp-hint,
#reviewModal .review-form .pt-circuit-reg-otp-resend {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.72rem;
  line-height: 1.3;
}

#reviewModal .review-form .review-otp-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: end;
  margin-bottom: 0.15rem;
}

#reviewModal .review-form .review-otp-code-field label {
  margin-bottom: 0.15rem;
}

#reviewModal .review-form .review-otp-code-field input {
  margin-bottom: 0;
}

#reviewModal .review-form .review-otp-code-row .pt-circuit-reg-otp-actions {
  margin: 0;
  padding-bottom: 0.05rem;
}

#reviewModal .review-form .review-otp-code-row .btn {
  min-height: 34px;
  padding: 0.32rem 0.7rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

#reviewModal .review-form .pt-circuit-reg-verified-badge {
  margin: 0.35rem 0 0;
  padding: 0.4rem 0.55rem;
  font-size: 0.8rem;
}

#reviewModal .review-form .form-error {
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
}

#reviewModal .review-form #reviewSubmitBtn {
  min-height: 38px;
  margin-top: 0.15rem;
}

@media (min-width: 520px) {
  #reviewModal[aria-hidden="false"] {
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

@media (max-width: 519px) {
  #reviewModal .review-form input,
  #reviewModal .review-form select,
  #reviewModal .review-form textarea {
    font-size: 16px;
  }
}

.review-photo-input {
  font-size: 0.9rem;
  padding: 0.35rem 0;
}

.reviews-list-wrap {
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.reviews-list-wrap::-webkit-scrollbar {
  height: 6px;
}
.reviews-list-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.reviews-list-wrap::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.25);
  border-radius: 999px;
}

.reviews-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.25rem;
}

.review-card {
  min-width: 260px;
  max-width: 320px;
  flex: 0 0 auto;
  background: var(--surface);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.review-card-photo {
  margin: -1.25rem -1.25rem 0.75rem;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  max-height: 200px;
}

.review-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.review-stars {
  color: var(--yellow);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.review-card p {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  font-style: italic;
}

.review-author {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ----- Welcome: winners showcase (below tournaments table) ----- */
.winners-showcase-section {
  padding: 2rem 0 2.5rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.6) 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}


.winners-showcase-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1.25rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.winners-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

/* Welcome: embedded YouTube videos */
.welcome-videos-section .welcome-section-head {
  text-align: center;
  margin-bottom: 1.25rem;
}

.welcome-videos-section .welcome-section-sub {
  margin: 0.35rem auto 0;
  max-width: 42rem;
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.5;
}

.welcome-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.5rem;
}

.welcome-video-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.welcome-video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.welcome-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.welcome-video-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  text-align: center;
  line-height: 1.4;
}

.welcome-video-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #0f172a;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.welcome-video-open:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.welcome-video-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.welcome-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.45));
  transition: background 0.2s ease;
}

.welcome-video-open:hover .welcome-video-play,
.welcome-video-open:focus-visible .welcome-video-play {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.55));
}

.welcome-video-play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

/* Tournament gallery — swipeable carousel (touch + prev/next) */
#welcomeAdsGrid.welcome-gallery-carousel {
  display: block;
  position: relative;
  padding: 0.2rem 2.75rem 2.25rem;
  max-width: 100%;
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  border-radius: 16px;
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-viewport::-webkit-scrollbar {
  display: none;
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-track {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  width: max-content;
  padding: 0.15rem 0.35rem;
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-card {
  flex: 0 0 min(420px, calc(100vw - 5.5rem));
  min-width: min(420px, calc(100vw - 5.5rem));
  max-width: min(420px, calc(100vw - 5.5rem));
  scroll-snap-align: center;
  scroll-snap-stop: always;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-card .winner-showcase-photo-wrap {
  width: 100%;
  height: 350px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #f1f5f9;
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-photo-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: #f1f5f9;
  cursor: zoom-in;
  position: relative;
  text-align: left;
  font: inherit;
  color: inherit;
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-photo-open:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-photo-open .winner-showcase-photo {
  transition: transform 0.25s ease;
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-photo-open:hover .winner-showcase-photo {
  transform: scale(1.02);
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-photo-hint {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-photo-open:hover .welcome-gallery-photo-hint,
#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-photo-open:focus-visible .welcome-gallery-photo-hint {
  opacity: 1;
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-card .winner-showcase-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-card .winner-showcase-event {
  margin: 0.75rem 0.9rem 0.28rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

#welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-card .winner-showcase-meta {
  margin: 0 0.9rem 0.9rem;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.4;
}

.welcome-gallery-nav {
  position: absolute;
  top: calc(175px - 1.35rem);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-size: 1.65rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  transition: background 0.15s ease, transform 0.15s ease;
}

.welcome-gallery-nav:hover:not(:disabled) {
  background: #fff;
  transform: scale(1.04);
}

.welcome-gallery-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.welcome-gallery-prev {
  left: 0.15rem;
}

.welcome-gallery-next {
  right: 0.15rem;
}

.welcome-gallery-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1rem;
  padding: 0 0.5rem;
}

.welcome-gallery-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.welcome-gallery-dot.is-active {
  background: var(--accent, #2563eb);
  transform: scale(1.25);
}

.welcome-gallery-carousel--single .welcome-gallery-nav,
.welcome-gallery-carousel--single .welcome-gallery-dots {
  display: none;
}

.welcome-gallery-carousel--single {
  padding-left: 0;
  padding-right: 0;
}

.winner-showcase-card {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}


.winner-showcase-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.winner-showcase-card-sub {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0 0 0.65rem;
  line-height: 1.45;
}

.winner-showcase-score {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e40af;
  margin: 0 0 1rem;
}


.winner-showcase-podium {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

@media (min-width: 520px) {
  .winner-showcase-podium {
    grid-template-columns: repeat(4, 1fr);
  }
}

.winner-place {
  text-align: center;
  min-width: 0;
}

.winner-place-rank {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.winner-place-photo {
  width: 100%;
  aspect-ratio: 1;
  max-width: 120px;
  margin: 0 auto 0.4rem;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
}

.winner-place-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ----- Welcome: organiser-uploaded results (dashboard Winners tab photos) ----- */
.welcome-organiser-results {
  padding: 2rem 0 2.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.92) 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}


.welcome-organiser-results-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.welcome-organiser-results-hint {
  text-align: center;
  font-size: 0.88rem;
  margin: 0 0 1.5rem;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.organiser-results-tournament {
  margin-bottom: 2rem;
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  scroll-margin-top: 5rem;
}

.organiser-results-tournament.is-highlighted {
  outline: 2px solid #4f46e5;
  outline-offset: 3px;
  box-shadow: 0 12px 36px rgba(79, 70, 229, 0.15);
}

.organiser-results-tournament-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  color: #111827;
}

.organiser-results-tournament-sport {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 1.25rem;
}

.organiser-results-event {
  margin-bottom: 1.35rem;
}

.organiser-results-event:last-child {
  margin-bottom: 0;
}

.organiser-results-event-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.organiser-results-podium {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

@media (min-width: 520px) {
  .organiser-results-podium {
    grid-template-columns: repeat(4, 1fr);
  }
}

.organiser-results-podium .winner-place-photo {
  max-width: min(100%, 200px);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.organiser-results-podium .winner-place-photo:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.organiser-results-podium .winner-place-photo img {
  cursor: pointer;
}

@media (min-width: 768px) {
  .organiser-results-podium .winner-place-photo {
    max-width: min(100%, 240px);
  }
}

.organiser-results-podium .winner-place-name {
  display: block;
  margin-top: 0.35rem;
  min-height: 1.2em;
}

.winner-place-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.35;
  word-break: break-word;
}

.winner-place--champion .winner-place-rank {
  color: #b45309;
}

.winner-place--champion .winner-place-photo {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.45);
}

/* ----- Features ----- */
.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Welcome page: Bootstrap row/cols replace the features grid */
.pt-bootstrap .features {
  display: block;
  max-width: none;
  margin: 0;
  padding: 2rem 0 4rem;
}

.pt-bootstrap .features .row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

.pt-bootstrap .header-inner.container-xl {
  max-width: 1200px;
}

.pt-bootstrap .reviews-section-inner.container-xl,
.pt-bootstrap .partners-inner.container-xl {
  max-width: 1200px;
}

.pt-bootstrap .footer-inner.container-xl {
  max-width: 1200px;
}

.pt-bootstrap.calc-body .header-inner.container-xl {
  max-width: 1200px;
}

/* ----- Standalone draw calculator page (calculator.html) ----- */
.calc-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 12% 0%, #e0f2fe 0, #f8fafc 42%, #eef2ff 100%);
}

.calc-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1.25rem, 3vw, 2.25rem) clamp(0.75rem, 2vw, 1.5rem) 2.5rem;
}

.calc-shell {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: stretch;
  gap: clamp(1.25rem, 2.5vw, 1.85rem);
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(148, 163, 184, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: clamp(1.35rem, 2.5vw, 1.85rem);
}

@media (max-width: 860px) {
  .calc-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .calc-main {
    padding: 1rem 0.65rem 1.75rem;
  }
  .calc-shell {
    padding: 1.15rem;
    border-radius: 16px;
  }
}

.calc-left-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.calc-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.calc-title {
  font-size: clamp(1.2rem, 2.8vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.calc-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 36ch;
}

.calc-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #e0f2fe, #eef2ff);
  color: #0369a1;
  border: 1px solid rgba(125, 211, 252, 0.85);
  white-space: nowrap;
  align-self: flex-start;
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  margin-top: 0.35rem;
}

.calc-field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.calc-radio-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.calc-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.calc-radio:hover {
  border-color: rgba(37, 99, 235, 0.45);
  background: #fff;
}

.calc-radio:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.65);
  background: rgba(239, 246, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.calc-radio input {
  accent-color: var(--primary);
  margin: 0;
}

.calc-input {
  width: 100%;
  padding: 0.58rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.85);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.calc-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.calc-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

.calc-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 520px) {
  .calc-two-col {
    grid-template-columns: 1fr;
  }
}

.calc-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.calc-btn-primary {
  padding: 0.58rem 1.25rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(180deg, #3b82f6, var(--primary));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.32);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}

.calc-btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.38);
}

.calc-btn-primary:active {
  transform: translateY(1px);
}

.calc-btn-subtle {
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.55);
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.calc-btn-subtle:hover {
  background: #e0e7ff;
  border-color: rgba(99, 102, 241, 0.65);
}

.calc-error {
  font-size: 0.82rem;
  color: var(--live-red);
  min-height: 1.15em;
  margin-top: 0.15rem;
}

.calc-right {
  background: linear-gradient(165deg, #dbeafe 0%, #eff6ff 38%, #ffffff 92%);
  border-radius: 16px;
  padding: 1.3rem 1.45rem;
  border: 1px dashed rgba(100, 116, 139, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: min(320px, 50vh);
  max-height: min(480px, 58vh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.calc-right h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.calc-right-section {
  font-size: 0.86rem;
  color: #111827;
  line-height: 1.45;
}

.calc-right-section ul {
  margin: 0.45rem 0 0.15rem;
  padding-left: 1.15rem;
}

.calc-right-section li {
  margin: 0.18rem 0;
}

.calc-right-muted {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.calc-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(5, 150, 105, 0.1);
  color: #047857;
  vertical-align: middle;
}

.pt-bootstrap .hero-content.container-xl {
  max-width: 1080px;
}

.pt-bootstrap .tabs-section {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}



.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-icon-blue { background: #dbeafe; color: var(--primary); }
.feature-icon-green { background: var(--green-bg); color: var(--green); }
.feature-icon-yellow { background: var(--yellow-bg); color: var(--yellow); }

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.feature-card ul {
  list-style: none;
  margin-bottom: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.feature-card li {
  font-size: 0.9rem;
  padding: 0.25rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.feature-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
}

.feature-actions .btn {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

/* ----- Partners (welcome screen) ----- */
.partners-section {
  padding: 2.25rem 1.5rem 3rem;
  background: #f9fafb;
}

.partners-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.partners-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.partners-heading {
  margin: 0;
  font-size: 1.35rem;
}

.partners-subtitle {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
  --partner-photo-size: 240px;
}

.partner-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0 0 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}


.partner-photo {
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 4 / 3;
  border-radius: 0;
  flex-shrink: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.partner-photo--img {
  background: #f1f5f9;
}

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

/* Partner multi-photo carousel (welcome page) */
.partner-carousel {
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  background: #f1f5f9;
}

.partner-carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.partner-carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.65s ease;
  pointer-events: none;
}

.partner-carousel-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.partner-location {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.partner-address {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #64748b;
  white-space: pre-line;
  word-break: break-word;
}

.partner-photo--ph.partner-photo--1 {
  background-image: linear-gradient(135deg, #f97316, #ea580c);
}
.partner-photo--ph.partner-photo--2 {
  background-image: linear-gradient(135deg, #22c55e, #16a34a);
}
.partner-photo--ph.partner-photo--3 {
  background-image: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.partner-meta {
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  width: 100%;
  align-self: stretch;
}

.partner-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.partner-note {
  font-size: 0.82rem;
  color: #4b5563;
}

.partner-details {
  margin-top: 0.5rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #64748b;
  white-space: pre-line;
  word-break: break-word;
}

@media (max-width: 520px) {
  .partners-grid {
    --partner-photo-size: min(88vw, 320px);
  }
  .partner-photo,
  .partner-carousel {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    max-width: none;
    aspect-ratio: 4 / 3;
  }
}

/* ----- Footer (welcome + global) ----- */
.footer {
  margin-top: auto;
  position: relative;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #172033 100%);
  color: #e2e8f0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.35);
}

body.welcome-page .footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.45), rgba(99, 102, 241, 0.5), transparent);
  opacity: 0.85;
  pointer-events: none;
}


.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 1.5rem;
}

.footer-inner-top {
  padding-bottom: 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  align-items: flex-start;
}

.footer-inner-bottom {
  padding-top: 1.25rem;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex: 1 1 220px;
}

.footer-brand .logo-icon {
  flex-shrink: 0;
  width: var(--footer-logo-size);
  height: var(--footer-logo-size);
  min-width: var(--footer-logo-size);
  min-height: var(--footer-logo-size);
  /* background-color: #fff; */
  background-image: url("public/PRO_TOURNY_LOGO.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 78%;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.35);
}

.footer-brand .logo-mark-img {
  flex-shrink: 0;
  width: var(--footer-logo-size);
  height: var(--footer-logo-size);
  min-width: var(--footer-logo-size);
  min-height: var(--footer-logo-size);
  object-fit: contain;
  border-radius: 14px;
  display: block;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.35);
}

.footer-brand .site-logo-header-img {
  flex-shrink: 0;
  display: block;
  width: auto;
  height: var(--footer-logo-size);
  min-height: var(--footer-logo-size);
  max-height: 72px;
  max-width: min(200px, 42vw);
  object-fit: contain;
  padding: 6px;
  border-radius: 14px;
  /* background: rgba(255, 255, 255, 0.97); */
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 10px 28px rgba(0, 0, 0, 0.35);
}

.footer-brand > div:last-child {
  min-width: 0;
}

.footer-brand strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
  line-height: 1.25;
}

.footer-brand p {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #94a3b8;
  max-width: 22rem;
}

.footer-links {
  display: flex;
  gap: 2.25rem;
  flex-wrap: wrap;
}

.footer-links div {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 8.5rem;
}

.footer-links strong {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.footer-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease, transform 0.15s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copyright {
  font-size: 0.88rem;
  color: #94a3b8;
  letter-spacing: 0.01em;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.footer-legal a {
  color: #cbd5e1;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-legal a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

.footer-sep {
  color: #475569;
  user-select: none;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.footer-social-text {
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.4;
  max-width: 14rem;
}

.footer-social-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.footer-icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.footer-icon svg {
  flex-shrink: 0;
}

.footer-icon--whatsapp:hover {
  color: #fff;
  background: rgba(37, 211, 102, 0.22);
  border-color: rgba(37, 211, 102, 0.45);
}





/* ----- Modals ----- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

/* Terms & Privacy: must stack above login/signup/forgot/OTP (those modals follow later in DOM with the same z-index:200) */
#termsModal,
#privacyModal {
  z-index: 420;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.modal-box {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

/* Poster lightbox must beat generic .modal-box max-width (400px). */
.modal-box.poster-modal-box {
  max-width: min(96vw, 920px);
  max-height: min(90vh, 90dvh);
  padding: 0.65rem 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Gallery / podium photo lightbox — must beat generic .modal-box max-width (400px). */
.modal-box.welcome-results-photo-modal-box {
  max-width: min(96vw, 960px);
  width: 100%;
  max-height: min(94vh, 94dvh);
  padding: 0.5rem 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.modal-box.welcome-results-photo-modal-box .modal-header {
  flex-shrink: 0;
  padding-right: 2.5rem;
}

.modal-box.welcome-results-photo-modal-box .modal-header h2 {
  font-size: 1rem;
  margin: 0;
}

.modal-box.welcome-results-photo-modal-box .welcome-results-photo-modal-body img {
  max-width: 100%;
  max-height: min(calc(94vh - 3.5rem), calc(94dvh - 3.5rem), 920px);
}

/* ----- Auth modals — Canvas 2 (glass, aurora mesh, grain) ----- */
.modal--canvas2 .modal-backdrop {
  background: linear-gradient(
    155deg,
    rgba(15, 23, 42, 0.72) 0%,
    rgba(49, 46, 129, 0.55) 42%,
    rgba(13, 148, 136, 0.38) 100%
  );
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
}

.modal-auth-canvas {
  isolation: isolate;
  overflow: hidden;
  padding: 1.65rem 1.75rem 1.55rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.65) inset,
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 28px 56px -16px rgba(15, 23, 42, 0.32),
    0 0 100px -24px rgba(37, 99, 235, 0.38);
}

.modal-auth-canvas::before {
  content: "";
  position: absolute;
  inset: -45%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72% 58% at 18% 12%, rgba(37, 99, 235, 0.28), transparent 58%),
    radial-gradient(ellipse 68% 52% at 88% 8%, rgba(124, 58, 237, 0.22), transparent 52%),
    radial-gradient(ellipse 55% 48% at 52% 102%, rgba(5, 150, 105, 0.2), transparent 50%),
    conic-gradient(from 210deg at 50% 50%, rgba(37, 99, 235, 0.06), transparent 28%, rgba(124, 58, 237, 0.07), transparent 62%, rgba(5, 150, 105, 0.05), transparent 88%);
  animation: modal-canvas2-drift 16s ease-in-out infinite alternate;
}

.modal-auth-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
}

@keyframes modal-canvas2-drift {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  100% {
    transform: translate(3%, 4%) rotate(4deg) scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-auth-canvas::before {
    animation: none;
  }
}

.modal-auth-canvas > *:not(.modal-close) {
  position: relative;
  z-index: 1;
}

.modal-auth-canvas .modal-close {
  position: absolute;
  z-index: 20;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  color: rgba(30, 41, 59, 0.65);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.modal-auth-canvas .modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
}

.modal-auth-canvas > h2 {
  margin-bottom: 1.2rem;
  padding-right: 2.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
  background: linear-gradient(110deg, #0f172a 0%, var(--primary) 42%, #6366f1 72%, #6d28d9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modal-auth-canvas .modal-desc {
  color: rgba(51, 65, 85, 0.92);
}

.modal-auth-canvas .fp-phone-summary,
.modal-auth-canvas .fp-email-summary {
  margin: 0 0 0.85rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.22);
  font-weight: 600;
  font-size: 0.88rem;
  color: rgba(30, 41, 59, 0.95);
}

.modal-auth-canvas #fpResendSuccess:not([hidden]) {
  color: #047857;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.modal-auth-canvas .auth-form label {
  color: rgba(30, 41, 59, 0.88);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}

.modal-auth-canvas .auth-form input,
.modal-auth-canvas .auth-form select {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 11px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.modal-auth-canvas .auth-form input:focus,
.modal-auth-canvas .auth-form select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.14),
    0 8px 22px rgba(37, 99, 235, 0.1);
}

.modal-auth-canvas .auth-form .auth-radio-option {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.modal-auth-canvas .auth-form .auth-radio-option:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(239, 246, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.modal-auth-canvas .auth-form .btn-primary.btn-block {
  margin-top: 0.35rem;
  padding: 0.62rem 1rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 52%, #7c3aed 100%);
  box-shadow:
    0 4px 18px rgba(37, 99, 235, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.28) inset;
  transition: filter 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.modal-auth-canvas .auth-form .btn-primary.btn-block:hover {
  filter: brightness(1.06);
  box-shadow:
    0 6px 24px rgba(37, 99, 235, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset;
}

.modal-auth-canvas .auth-form .btn-primary.btn-block:active {
  transform: translateY(1px);
}

.modal-auth-canvas .auth-form-footer {
  color: rgba(71, 85, 105, 0.95);
}

.modal-auth-canvas .auth-form-footer a {
  font-weight: 600;
}

.modal-auth-canvas .password-toggle {
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.55);
}

.signup-modal-box {
  width: 100%;
  max-width: min(440px, calc(100vw - 1.5rem));
  padding: 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  max-height: min(92dvh, 720px);
  min-height: 0;
}

.signup-modal-box.modal-auth-canvas {
  padding: 1.2rem 1.3rem 1rem;
}

.signup-modal-box h2 {
  flex: 0 0 auto;
  margin-bottom: 0.55rem;
}

/* Scroll long signup form; keep title + footer visible */
.signup-modal-box > #signupForm.auth-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
  margin-right: -0.15rem;
}

.signup-modal-box > .auth-form-footer {
  flex: 0 0 auto;
  margin-top: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.signup-modal-box .auth-form label {
  font-size: 0.84rem;
  margin-bottom: 0.16rem;
}

.signup-modal-box .auth-form input,
.signup-modal-box .auth-form select {
  padding: 0.46rem 0.6rem;
  font-size: 0.9rem;
  margin-bottom: 0.55rem;
}

.signup-modal-box .auth-form .password-input-wrap {
  margin-bottom: 0.55rem;
}

.signup-modal-box .auth-form .btn-block {
  margin-top: 0.12rem;
  padding: 0.46rem 0.72rem;
}

.signup-modal-box .signup-gender-label {
  display: block;
  margin-bottom: 0.28rem;
}

.signup-modal-box .auth-form .auth-radio-group--signup-gender {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  width: 100%;
  margin: 0 0 0.55rem;
}

.signup-modal-box .auth-form .auth-radio-group--signup-gender .auth-radio-option {
  flex: none;
  min-width: 0;
  width: 100%;
  margin: 0;
  justify-content: center;
  padding: 0.44rem 0.3rem;
  gap: 0.28rem;
  cursor: pointer;
  touch-action: manipulation;
}

.signup-modal-box .auth-form .auth-radio-group--signup-gender .auth-radio-option span {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.signup-modal-box .auth-form .auth-radio-group--signup-gender .auth-radio-option input[type="radio"] {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--primary, #2563eb);
}

.signup-modal-box .auth-form-footer {
  margin-top: 0.55rem;
  font-size: 0.84rem;
}

.signup-modal-box .auth-consent-block {
  margin-top: 0.35rem;
  margin-bottom: 0.15rem;
}

.signup-modal-box .auth-consent-option-text {
  line-height: 1.45;
}

.signup-modal-box .auth-inline-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--primary, #2563eb);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  vertical-align: baseline;
}

.signup-modal-box .auth-inline-link:hover {
  color: #1d4ed8;
}

.signup-modal-box .auth-inline-link:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
  border-radius: 2px;
}

.signup-legal-panel {
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.signup-legal-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.signup-legal-panel-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.signup-legal-panel-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(30, 41, 59, 0.75);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.signup-legal-panel-close:hover {
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

.signup-legal-panel-body {
  max-height: min(28vh, 220px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #334155;
}

.signup-legal-panel-body p {
  margin: 0 0 0.65rem;
}

.signup-legal-panel-body p:last-child {
  margin-bottom: 0;
}

.signup-modal-box .auth-form .btn-block {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-bottom: 0.25rem;
  box-shadow: 0 -8px 16px rgba(255, 255, 255, 0.85);
}

/* Create account: country code + national number on one row */
.signup-phone-field {
  margin-bottom: 0.55rem;
}

.signup-phone-row {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
}

.signup-modal-box .auth-form .signup-phone-row input,
.signup-modal-box .auth-form .signup-phone-row select {
  margin-bottom: 0;
}

.signup-country-code {
  flex: 0 0 auto;
  min-width: 3.4rem;
  max-width: 23%;
  width: auto;
  cursor: pointer;
  font-size: 0.78rem;
  padding-left: 0.35rem;
  padding-right: 1.15rem;
}

.signup-phone-row #signupPhone {
  flex: 1;
  min-width: 0;
  width: auto;
}

/* ----- Login modal: Email vs Mobile + unified phone bar ----- */
.login-modal-box {
  max-width: 420px;
}

.login-method-legend {
  margin: 0 0 0.4rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(30, 41, 59, 0.88);
}

.login-method-switch {
  display: flex;
  width: 100%;
  gap: 0;
  margin-bottom: 0.7rem;
  padding: 3px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.login-method-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.48rem 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  color: rgba(51, 65, 85, 0.88);
  border-radius: 9px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.login-method-tab.is-active {
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.login-method-tab:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.login-method-panel {
  margin-bottom: 0.85rem;
}

.login-method-panel[hidden] {
  display: none !important;
}

/* One visual field: country code + national (login mobile only) */
.login-phone-row--unified {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 11px;
  overflow: hidden;
  gap: 0 !important;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.login-modal-box .auth-form .login-phone-row--unified select.signup-country-code,
.login-modal-box .auth-form .login-phone-row--unified input,
.modal-auth-canvas .auth-form .login-phone-row--unified select.signup-country-code,
.modal-auth-canvas .auth-form .login-phone-row--unified input {
  margin-bottom: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-height: 2.65rem;
  align-self: stretch;
  line-height: 1.35;
}

.login-modal-box .auth-form .login-phone-row--unified .signup-country-code,
.modal-auth-canvas .auth-form .login-phone-row--unified .signup-country-code {
  min-width: 3.25rem;
  max-width: 28%;
  width: auto;
  border-right: 1px solid rgba(15, 23, 42, 0.1) !important;
  font-size: 0.78rem;
  padding-left: 0.35rem;
  padding-right: 1rem;
}

/* Forgot password & other auth modals without .login-modal-box: custom select chevron inside unified bar */
.modal-auth-canvas:not(.login-modal-box) .auth-form .login-phone-row--unified .signup-country-code {
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(51, 65, 85, 0.65) 50%),
    linear-gradient(135deg, rgba(51, 65, 85, 0.65) 50%, transparent 50%);
  background-position: calc(100% - 10px) 50%, calc(100% - 6px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  background-color: transparent;
}

.login-modal-box .auth-form .login-phone-row--unified input:focus,
.login-modal-box .auth-form .login-phone-row--unified .signup-country-code:focus,
.modal-auth-canvas .auth-form .login-phone-row--unified input:focus,
.modal-auth-canvas .auth-form .login-phone-row--unified .signup-country-code:focus {
  outline: none;
  box-shadow: none !important;
}

.login-phone-row--unified:focus-within {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.14),
    0 1px 2px rgba(15, 23, 42, 0.04);
}

.modal-auth-canvas .auth-consent-block {
  margin: 0.75rem 0 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.modal-auth-canvas .auth-consent-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #334155;
  cursor: pointer;
}

.modal-auth-canvas .auth-consent-option input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: auto;
}

.auth-inline-link {
  color: #4f46e5;
  text-decoration: underline;
  font-weight: 500;
}

.auth-inline-link:hover {
  color: #4338ca;
}

.modal-box-text {
  max-width: 560px;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
}

.modal-body-text {
  padding: 0 1.75rem 1.75rem;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
}

/* Draw calculator — shared summary (modal + standalone output) */
.draw-calc-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (max-width: 380px) {
  .draw-calc-summary-grid {
    grid-template-columns: 1fr;
  }
}

.draw-calc-divider {
  height: 0;
  margin: 0.75rem 0;
  border: none;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.draw-calc-section-title {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.draw-calc-round-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.draw-calc-round-list li {
  margin: 0.2rem 0;
}

.draw-calc-pill {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: #047857;
  background: rgba(5, 150, 105, 0.12);
  vertical-align: middle;
}

/* Draw calculator modal (welcome page) */
#drawCalcModal.modal {
  align-items: center;
  justify-content: center;
}

#drawCalcModal .draw-calc-modal.modal-box-text {
  display: flex;
  flex-direction: column;
  max-width: min(520px, calc(100vw - 1.5rem));
  width: 100%;
  height: min(88dvh, calc(100dvh - 2rem));
  max-height: min(88dvh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 2rem));
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.75) inset,
    0 24px 56px rgba(15, 23, 42, 0.18);
}

#drawCalcModal .draw-calc-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 1.15rem 1.35rem 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.65), rgba(255, 255, 255, 0.5));
}

#drawCalcModal .draw-calc-modal__titles {
  min-width: 0;
  padding-right: 0.5rem;
}

#drawCalcModal .draw-calc-modal__header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

#drawCalcModal .draw-calc-modal__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
  max-width: 32ch;
}

#drawCalcModal .draw-calc-modal__close.modal-close {
  position: static;
  flex-shrink: 0;
  margin: 0;
  align-self: flex-start;
}

#drawCalcModal .draw-calc-modal__body.modal-body-text {
  padding: 1rem 1.35rem max(1.35rem, env(safe-area-inset-bottom, 0px));
  white-space: normal;
  overflow-x: hidden;
  overflow-y: scroll;
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.55;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.55) rgba(241, 245, 249, 0.9);
}

#drawCalcModal .draw-calc-modal__body.modal-body-text::-webkit-scrollbar {
  width: 6px;
}

#drawCalcModal .draw-calc-modal__body.modal-body-text::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.95);
  border-radius: 999px;
  margin: 4px 0;
}

#drawCalcModal .draw-calc-modal__body.modal-body-text::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.45);
  border-radius: 999px;
}

#drawCalcModal .draw-calc-modal__body.modal-body-text::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 85, 105, 0.65);
}

@media (max-width: 768px) {
  #drawCalcModal.modal {
    align-items: center;
    padding: max(0.75rem, env(safe-area-inset-top, 0px)) max(0.75rem, env(safe-area-inset-right, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px)) max(0.75rem, env(safe-area-inset-left, 0px));
  }

  #drawCalcModal .draw-calc-modal.modal-box-text {
    width: 100%;
    max-width: 100%;
    height: min(92dvh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.5rem));
    max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.5rem));
  }

  #drawCalcModal .draw-calc-modal__body.modal-body-text {
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
}

body.pt-native-app #drawCalcModal.modal {
  z-index: 10050;
  padding: max(0.65rem, env(safe-area-inset-top, 0px)) max(0.65rem, env(safe-area-inset-right, 0px))
    max(0.65rem, env(safe-area-inset-bottom, 0px)) max(0.65rem, env(safe-area-inset-left, 0px));
}

body.pt-native-app #drawCalcModal .draw-calc-modal.modal-box-text {
  height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.25rem);
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.25rem);
}

body.pt-native-app #drawCalcModal .draw-calc-modal__body.modal-body-text {
  overflow-y: scroll !important;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(4.5rem, calc(env(safe-area-inset-bottom, 0px) + 3.5rem));
}

body.pt-native-app #drawCalcModal.draw-calc-modal--has-results .draw-calc-modal__body.modal-body-text {
  padding-bottom: max(5rem, calc(env(safe-area-inset-bottom, 0px) + 4rem));
}

#drawCalcModal .draw-calc-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#drawCalcModal .draw-calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

#drawCalcModal .draw-calc-field--tight {
  gap: 0.25rem;
}

#drawCalcModal .draw-calc-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

#drawCalcModal .draw-calc-radio-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem;
}

#drawCalcModal .draw-calc-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: #f8fafc;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

#drawCalcModal .draw-calc-radio:hover {
  border-color: rgba(37, 99, 235, 0.45);
  background: #fff;
}

#drawCalcModal .draw-calc-radio:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.65);
  background: rgba(239, 246, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1);
}

#drawCalcModal .draw-calc-radio input {
  accent-color: var(--primary);
  margin: 0;
}

#drawCalcModal .draw-calc-input {
  width: 100%;
  padding: 0.52rem 0.72rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.14);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

#drawCalcModal .draw-calc-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#drawCalcModal .draw-calc-hint {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--text-muted);
}

#drawCalcModal .draw-calc-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
}

@media (max-width: 400px) {
  #drawCalcModal .draw-calc-two-col {
    grid-template-columns: 1fr;
  }
}

#drawCalcModal .draw-calc-actions {
  margin-top: 0.15rem;
}

#drawCalcModal .draw-calc-submit.btn {
  width: 100%;
  margin: 0;
  padding: 0.58rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}

#drawCalcModal .draw-calc-error {
  margin: 0;
  min-height: 1.1em;
  font-size: 0.82rem;
  color: var(--live-red);
}

#drawCalcModal .draw-calc-results {
  margin: 0;
  padding: 0.65rem 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
  max-height: none;
  overflow: visible;
  flex-shrink: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: normal;
}

#drawCalcModal .draw-calc-results:empty {
  display: none;
}

.auth-form-footer {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.auth-form-footer a {
  color: var(--primary);
  text-decoration: none;
}

.auth-form-footer a:hover {
  text-decoration: underline;
}

.modal-box h2 {
  margin-bottom: 1.25rem;
  font-size: 1.35rem;
  padding-right: 2rem;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.auth-form .required {
  color: var(--live-red);
}

.auth-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.auth-form input,
.auth-form select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.auth-form select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 1.1rem;
  padding-right: 2.25rem;
  cursor: pointer;
}

.auth-form .auth-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0 0 1rem;
}

.auth-form .auth-radio-option {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 500;
  margin: 0;
}

.auth-form .auth-radio-option input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
}

.auth-form .password-input-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.auth-form .password-input-wrap input {
  padding-right: 2.75rem;
  margin-bottom: 0;
}

.auth-form .password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 1.15rem;
}

.auth-form .password-toggle:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-error {
  color: var(--live-red);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  min-height: 1.2em;
}

.auth-form .form-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.35;
  margin: -0.35rem 0 0.5rem;
}

.auth-form .form-field-error {
  color: var(--live-red);
  font-size: 0.82rem;
  line-height: 1.35;
  margin: 0.2rem 0 0.45rem;
}

.auth-form .form-field-error[hidden] {
  display: none;
}

.modal-auth-canvas .auth-form input[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.18);
}

.auth-form .btn-block {
  margin-top: 0.5rem;
}

/* ----- Responsive: iPad, tablet, phone, small phone ----- */

/* Tablet / iPad portrait and below */
@media (max-width: 1024px) {
  :root {
    --header-bar-pad-x: 1.1rem;
  }
  .header-inner,
  .tabs-section,
  .footer-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .tabs-above .location-display {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  :root {
    --header-bar-pad-y: 0.85rem;
    --header-logo-size: 54px;
  }
  .header-inner {
    flex-wrap: wrap;
    padding: var(--header-bar-pad-y) 1rem;
    align-items: center;
    row-gap: 0.65rem;
  }
  /* Full-width bar under logo so Log in / Create account stay right-aligned on phones */
  .header-inner .logo {
    flex: 1 1 auto;
    min-width: 0;
  }
  .header-inner .nav {
    flex: 1 1 100%;
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .header--welcome.header--actions-end .header-inner > .nav {
    flex: 0 0 auto;
    width: auto;
    max-width: 55%;
    justify-content: flex-end;
  }
  body.welcome-page .header-inner .welcome-auth-nav {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none;
    justify-content: flex-end;
  }

  body.welcome-page .welcome-auth-menu-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: auto;
    z-index: 320;
    max-width: min(16rem, calc(100vw - 2rem));
  }

  .header-inner .auth-buttons {
    justify-content: stretch;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
  body.welcome-page .header-inner .auth-buttons {
    justify-content: stretch;
  }
  .logo-title {
    font-size: 1rem;
  }
  .logo-subtitle {
    font-size: 0.75rem;
  }
  .hero {
    padding: 2rem 1rem;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .hero-desc {
    font-size: 0.95rem;
  }
  .hero-stats {
    gap: 0.5rem;
  }
  .stat {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }
  .tabs-section {
    padding: 0 1rem 2rem;
  }
  .tabs-wrap {
    flex-wrap: wrap;
  }
  .tabs-content {
    padding: 1rem;
  }
  .tournaments-table {
    font-size: 0.85rem;
  }
  .tournaments-table th,
  .tournaments-table td {
    padding: 0.5rem 0.6rem;
  }
  .tournament-poster {
    width: 24px;
    height: 24px;
  }
  .welcome-tournaments-table-wrap .tournament-poster,
  .welcome-tournaments-table-wrap .tournament-poster-placeholder {
    width: 3.25rem;
    height: 3.25rem;
  }
  .btn-icon-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }
  .pagination {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .features {
    padding: 1.5rem 1rem 3rem;
    grid-template-columns: 1fr;
  }
  .feature-card {
    padding: 1.25rem;
  }
  .reviews-section {
    padding: 2rem 1rem;
  }
  .reviews-layout {
    grid-template-columns: 1fr;
  }
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    padding: 0.85rem 0.85rem 0.7rem;
    gap: 0.55rem;
  }
  .footer-inner-top {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem 1rem;
    padding-bottom: 0.65rem;
  }
  .footer-brand {
    flex: 1 1 100%;
    gap: 0.6rem;
  }
  .footer-brand .logo-mark-img {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .footer-brand strong {
    font-size: 1rem;
  }
  .footer-brand p {
    font-size: 0.74rem;
    line-height: 1.35;
    margin-top: 0.1rem;
  }
  .footer-links {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.85rem;
  }
  .footer-links strong {
    font-size: 0.68rem;
    margin-bottom: 0.15rem;
  }
  .footer-links a {
    font-size: 0.78rem;
    line-height: 1.35;
  }
  .footer-inner-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.45rem;
    padding-top: 0.55rem;
  }
  .footer-copyright {
    font-size: 0.72rem;
    line-height: 1.35;
  }
  .footer-legal {
    font-size: 0.72rem;
  }
  .footer-social {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.5rem;
  }
  .footer-social-text {
    flex: none;
    width: 100%;
    font-size: 0.72rem;
    line-height: 1.3;
    max-width: none;
    text-align: center;
  }
  .footer-social-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 0.4rem;
  }
  .footer-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }
  .footer-icon svg {
    width: 17px;
    height: 17px;
  }
  .modal {
    padding: max(0.5rem, env(safe-area-inset-top, 0px)) 0.65rem
      max(0.5rem, env(safe-area-inset-bottom, 0px));
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-box {
    margin: auto;
    max-width: 100%;
    flex-shrink: 0;
  }

  /* Tournament gallery / podium — near full-screen on phones */
  #welcomeResultsPhotoModal.modal[aria-hidden="false"] {
    padding: 0;
    align-items: stretch;
  }

  #welcomeResultsPhotoModal .modal-backdrop {
    background: rgba(0, 0, 0, 0.88);
  }

  #welcomeResultsPhotoModal .modal-box.welcome-results-photo-modal-box {
    max-width: 100%;
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding: max(0.35rem, env(safe-area-inset-top, 0px)) max(0.35rem, env(safe-area-inset-right, 0px))
      max(0.35rem, env(safe-area-inset-bottom, 0px)) max(0.35rem, env(safe-area-inset-left, 0px));
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    box-shadow: none;
  }

  #welcomeResultsPhotoModal .modal-box.welcome-results-photo-modal-box .modal-header h2 {
    color: #f8fafc;
    font-size: 0.92rem;
  }

  #welcomeResultsPhotoModal .welcome-results-photo-modal-box .modal-close {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    width: 2.25rem;
    height: 2.25rem;
    line-height: 2.25rem;
    text-align: center;
  }

  #welcomeResultsPhotoModal .welcome-results-photo-modal-body {
    flex: 1 1 auto;
    padding: 0.25rem 0.35rem 0.5rem;
  }

  #welcomeResultsPhotoModal .welcome-results-photo-modal-body img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(
      100dvh - 3rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
    );
    border-radius: 6px;
    box-shadow: none;
  }

  .modal-auth-canvas {
    border-radius: 16px;
    padding: 1.4rem 1.3rem 1.3rem;
  }
  #signupModal[aria-hidden="false"] {
    align-items: center;
    padding-top: max(0.65rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
  }
  .signup-modal-box.modal-auth-canvas {
    padding: 1rem 1.05rem 0.85rem;
    max-height: min(90dvh, 680px);
    width: min(440px, calc(100vw - 1.25rem));
  }
  .signup-modal-box > #signupForm.auth-form {
    padding-right: 0.2rem;
  }
  .signup-modal-box .auth-form .auth-radio-group--signup-gender {
    gap: 0.32rem;
  }

  .signup-modal-box .auth-form .auth-radio-group--signup-gender .auth-radio-option {
    padding: 0.4rem 0.2rem;
  }

  .signup-modal-box .auth-form .auth-radio-group--signup-gender .auth-radio-option span {
    font-size: 0.76rem;
  }

  .signup-country-code {
    max-width: 32%;
    min-width: 4.5rem;
  }
}

/* Large phone / small tablet */
@media (max-width: 600px) {
  :root {
    --header-logo-size: 48px;
  }
  .auth-buttons {
    gap: 0.4rem;
  }
  .btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
  }
  .location-label {
    font-size: 0.85rem;
  }
  .tournaments-table .th-poster,
  .tournaments-table .td-poster {
    min-width: 3.75rem;
    max-width: 5.75rem;
  }
  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
  }
  .footer-social-text {
    font-size: 0.85rem;
    text-align: center;
  }
}

/* Phone portrait (iPhone, Android) */
@media (max-width: 480px) {
  :root {
    --header-logo-size: 44px;
    --header-bar-pad-y: 0.65rem;
  }
  .header-inner {
    padding: var(--header-bar-pad-y) 0.75rem;
    flex-direction: column;
    align-items: stretch;
  }
  .header-inner .logo {
    flex: 0 0 auto;
    width: 100%;
  }
  .header-inner .nav {
    flex: 0 0 auto;
    width: 100%;
    justify-content: flex-end;
  }
  body.welcome-page .header-inner .nav {
    justify-content: flex-start;
  }
  .logo-text {
    max-width: 160px;
  }
  .logo-title {
    font-size: 0.95rem;
  }
  .hero {
    padding: 1.5rem 0.75rem;
  }
  .hero-title {
    font-size: 1.35rem;
  }
  .hero-stats {
    flex-direction: column;
  }
  .stat {
    width: 100%;
    justify-content: center;
  }
  .tabs-section {
    padding: 0 0.75rem 1.5rem;
  }
  .tab {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  .tournaments-table-wrap:not(.welcome-tournaments-table-wrap) .tournaments-table {
    font-size: 0.8rem;
    min-width: 520px;
  }
  .welcome-tournaments-table-wrap .tournaments-table {
    font-size: 0.8rem;
    min-width: 0;
  }
  .tournaments-table th,
  .tournaments-table td {
    padding: 0.4rem 0.5rem;
  }
  .pagination-info {
    font-size: 0.8rem;
  }
  .features {
    padding: 1.25rem 0.75rem 2.5rem;
  }
  .feature-card h3 {
    font-size: 1.05rem;
  }
  .feature-card p,
  .feature-card li {
    font-size: 0.85rem;
  }
  .footer-copyright,
  .footer-legal,
  .footer-social-text {
    font-size: 0.85rem;
  }
  .footer-social-icons {
    justify-content: center;
  }
  .modal-box {
    padding: 1.25rem;
  }
  .modal-box h2 {
    font-size: 1.2rem;
  }
  .auth-form input {
    font-size: 16px; /* prevents zoom on focus on iOS */
  }
  .signup-modal-box.modal-auth-canvas {
    max-height: min(88dvh, 640px);
  }

  .signup-modal-box .auth-form .auth-radio-group--signup-gender .auth-radio-option span {
    font-size: 0.72rem;
  }
  .signup-modal-box .auth-form .form-hint {
    font-size: 0.78rem;
    line-height: 1.35;
  }
  .signup-modal-box .auth-consent-block {
    margin-top: 0.25rem;
  }
  .signup-modal-box .auth-consent-option {
    font-size: 0.82rem;
    line-height: 1.4;
  }
}

/* Small phone (e.g. iPhone SE, narrow Android) */
@media (max-width: 360px) {
  .header-inner .auth-buttons {
    width: 100%;
    justify-content: flex-end;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .header-inner .auth-buttons .btn {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
  }
  .hero-title {
    font-size: 1.2rem;
  }
  .footer-inner {
    gap: 1rem;
  }
}

/* ----- Floating help chat (welcome page) ----- */
.help-chat-root {
  position: relative;
  z-index: 260;
}

.help-chat-fab {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 55%, #6d28d9 100%);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.help-chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.help-chat-fab__icon {
  font-size: 1.15rem;
  line-height: 1;
}

.help-chat-panel {
  position: fixed;
  bottom: 4.75rem;
  right: 1.25rem;
  width: min(100vw - 2rem, 340px);
  max-height: min(78vh, 520px);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.help-chat-panel[hidden] {
  display: none !important;
}

.help-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(109, 40, 217, 0.08));
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.help-chat-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.help-chat-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-chat-close:hover {
  color: var(--text);
  background: #fff;
}

.help-chat-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.help-chat-lead {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.help-chat-choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.15s, background 0.15s;
}

.help-chat-choice-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  font-size: 1.1rem;
  line-height: 1;
}

.help-chat-choice-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.help-chat-choice--whatsapp .help-chat-choice-icon {
  background: rgba(37, 211, 102, 0.14);
}

.help-chat-choice--whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.45);
  background: rgba(37, 211, 102, 0.08);
}

.help-chat-choice--email .help-chat-choice-icon {
  background: rgba(37, 99, 235, 0.12);
}

.help-chat-choice--email:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: #eff6ff;
}

.help-chat-choice:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: #eff6ff;
}

.help-chat-choice strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.help-chat-choice-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.help-chat-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  margin-top: 0.5rem;
}

.help-chat-label:first-of-type {
  margin-top: 0;
}

.help-chat-optional {
  font-weight: 400;
  opacity: 0.85;
}

.help-chat-input,
.help-chat-textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.9rem;
}

.help-chat-textarea {
  resize: vertical;
  min-height: 3.5rem;
}

.help-chat-error {
  color: var(--live-red);
  font-size: 0.82rem;
  margin: 0.5rem 0 0;
  min-height: 1.2em;
}

.help-chat-submit {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 11px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #6d28d9);
}

.help-chat-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.help-chat-back {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.4rem;
  border: none;
  background: none;
  font-size: 0.85rem;
  color: var(--primary);
  cursor: pointer;
  font-family: var(--font);
}

.help-chat-thanks {
  text-align: center;
}

.help-chat-success-icon {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  color: var(--green);
}

.help-chat-thanks-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

.help-chat-thanks-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.help-chat-done {
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  background: #fff;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 640px) {
  .help-chat-fab {
    bottom: calc(2.75rem + env(safe-area-inset-bottom, 0px));
    right: max(1rem, env(safe-area-inset-right, 0px));
    padding: 0.5rem 0.85rem;
  }

  .help-chat-panel {
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    width: auto;
    bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
    max-height: 70vh;
  }
}

@media (max-width: 480px) {
  .help-chat-fab {
    bottom: calc(2.75rem + env(safe-area-inset-bottom, 0px));
    right: max(1rem, env(safe-area-inset-right, 0px));
    padding: 0.5rem 0.85rem;
  }
  .help-chat-panel {
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    width: auto;
    bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
    max-height: 70vh;
  }
}

@media (max-width: 640px) {
  .welcome-top-card {
    margin-top: 0.15rem;
    padding: 0.95rem 0.88rem;
    border-radius: 14px;
  }

  .welcome-top-card #welcomeHeroSubheadline {
    font-size: 0.95rem;
    line-height: 1.48;
    font-weight: 400 !important;
    font-family: Arial, Helvetica, sans-serif !important;
  }

  .welcome-top-card #welcomeHeroSubheadline .welcome-hero-para {
    font-size: 0.95rem;
    font-weight: 400 !important;
    font-family: Arial, Helvetica, sans-serif !important;
  }

  .welcome-top-card .hero-stats {
    gap: 0.55rem;
  }

  .welcome-top-card .hero-stats .stat {
    width: 100%;
    justify-content: center;
  }

  #welcomeAdsGrid.welcome-gallery-carousel {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 2rem;
  }

  #welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-card {
    flex: 0 0 calc(100vw - 2.5rem);
    min-width: calc(100vw - 2.5rem);
    max-width: calc(100vw - 2.5rem);
  }

  #welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-card .winner-showcase-photo-wrap {
    height: 280px;
  }

  .welcome-gallery-nav {
    top: calc(140px - 1.25rem);
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.45rem;
  }

  .welcome-gallery-prev {
    left: 0.35rem;
  }

  .welcome-gallery-next {
    right: 0.35rem;
  }
}

body.pt-native-app #welcomeAdsGrid.welcome-gallery-carousel .welcome-gallery-card {
  flex: 0 0 calc(100vw - 2.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  min-width: calc(100vw - 2.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  max-width: calc(100vw - 2.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
}
