:root {
  --bg-base: #03112b;
  --bg-deep: #020b1f;
  --panel: rgba(7, 24, 53, 0.9);
  --panel-border: rgba(90, 224, 252, 0.18);
  --text-primary: #e9fcff;
  --text-muted: rgba(193, 243, 252, 0.86);
  --accent: #37e8ff;
  --accent-strong: #17cdea;
  --chip-bg: rgba(46, 104, 163, 0.22);
  --chip-border: rgba(116, 211, 240, 0.2);
  --danger: rgba(255, 101, 118, 0.5);
  --shadow-lg: 0 20px 44px rgba(1, 8, 20, 0.34);
  --shadow-md: 0 14px 28px rgba(1, 8, 20, 0.24);
  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 20px;
  --radius-sm: 18px;
  color: var(--text-primary);
  background: var(--bg-base);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "SF Pro Display",
    "Helvetica Neue",
    Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  min-height: 100%;
}

html,
body {
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text-primary);
  background:
    radial-gradient(960px 520px at 14% -6%, rgba(27, 124, 255, 0.22), transparent 56%),
    radial-gradient(840px 440px at 100% 0%, rgba(16, 220, 255, 0.14), transparent 54%),
    linear-gradient(180deg, #041533 0%, #03122e 44%, var(--bg-deep) 100%);
}

a {
  color: inherit;
}

.app-shell {
  position: relative;
  width: min(100%, 880px);
  min-height: 100dvh;
  margin: 0 auto;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-right: max(14px, env(safe-area-inset-right));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  padding-left: max(14px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(58, 240, 255, 0.03), transparent 24%),
    radial-gradient(circle at top right, rgba(58, 240, 255, 0.04), transparent 30%);
}

@supports (-webkit-touch-callout: none) {
  .app-shell::before {
    position: absolute;
  }
}

.app-main {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 8px 0 10px;
}

.app-tools,
.policy-top-actions {
  display: flex;
  justify-content: flex-end;
}

.screen {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  padding: clamp(18px, 4.4vw, 28px);
  background: linear-gradient(180deg, rgba(10, 29, 59, 0.94), rgba(4, 18, 40, 0.9));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg), inset 0 1px rgba(255, 255, 255, 0.08);
  animation: iosScreenIn 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.045),
    transparent 22%,
    transparent 78%,
    rgba(0, 0, 0, 0.08)
  );
}

.screen > * {
  position: relative;
  z-index: 1;
}

.screen:not(.results-screen):not(.policy-page),
.loading-screen {
  width: min(100%, 560px);
  margin: 0 auto;
}

.site-kicker,
.policy-eyebrow {
  margin: 0 0 6px;
  color: rgba(140, 230, 245, 0.82);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav,
.policy-quick-links,
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-nav-link,
.policy-link,
.results-back-btn,
.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition:
    transform 120ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.site-nav-link,
.policy-link {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(91, 223, 246, 0.22);
  color: rgba(230, 250, 255, 0.92);
  text-decoration: none;
  background: rgba(16, 57, 98, 0.3);
}

.site-nav-link:hover,
.policy-link:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 238, 255, 0.48);
  background: rgba(22, 95, 133, 0.42);
}

.policy-link.active {
  border-color: rgba(110, 238, 255, 0.64);
  background: rgba(23, 205, 234, 0.16);
}

.lang-switcher {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(91, 223, 246, 0.22);
  background: rgba(10, 43, 79, 0.56);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lang-switcher-btn {
  min-width: 38px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(213, 249, 255, 0.86);
  background: transparent;
}

.lang-switcher-btn.active {
  color: #03233a;
  border-color: rgba(112, 237, 255, 0.5);
  background: linear-gradient(180deg, rgba(56, 235, 255, 0.95), rgba(17, 205, 234, 0.95));
}

.lang-switcher-btn:focus-visible,
.results-back-btn:focus-visible,
input:focus-visible,
.primary-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(76, 209, 255, 0.18);
}

.hero-title {
  margin: 0 0 10px;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "Helvetica Neue",
    sans-serif;
  font-size: clamp(34px, 9vw, 56px);
  line-height: 0.94;
  letter-spacing: -0.05em;
  color: #81f6ff;
  text-wrap: balance;
}

.hero-subtitle {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: clamp(16px, 4.1vw, 21px);
  line-height: 1.42;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(176, 236, 246, 0.92);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

input {
  width: 100%;
  min-height: 56px;
  margin-bottom: 14px;
  padding: 0 18px;
  border: 1px solid rgba(122, 231, 252, 0.24);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1.2;
  background: linear-gradient(180deg, rgba(10, 28, 57, 0.96), rgba(6, 18, 39, 0.92));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 8px 16px rgba(1, 8, 20, 0.16);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

input::placeholder {
  color: rgba(162, 229, 243, 0.42);
}

input:focus {
  border-color: rgba(110, 238, 255, 0.86);
  box-shadow:
    0 0 0 4px rgba(76, 209, 255, 0.18),
    0 12px 24px rgba(1, 8, 20, 0.18);
}

.primary-btn,
.boot-fallback-btn {
  width: 100%;
  min-height: 54px;
  margin: 18px 0 2px;
  padding: 0 18px;
  border: none;
  border-radius: var(--radius-sm);
  color: #022035;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #45eeff, #17cdea 78%);
  box-shadow: 0 14px 28px rgba(19, 206, 235, 0.28), inset 0 1px rgba(255, 255, 255, 0.35);
}

.primary-btn:hover,
.boot-fallback-btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.02) brightness(1.02);
}

.primary-btn:active,
.boot-fallback-btn:active {
  transform: translateY(1px) scale(0.995);
  box-shadow: 0 8px 18px rgba(19, 206, 235, 0.22), inset 0 1px rgba(255, 255, 255, 0.24);
}

.summary-pill,
.results-summary-pill,
.elapsed-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(81, 213, 255, 0.26);
  border-radius: 999px;
  background: rgba(24, 89, 129, 0.36);
  color: rgba(218, 250, 255, 0.94);
  font-size: 15px;
  font-weight: 600;
}

.results-screen {
  padding-top: 14px;
}

.results-sticky {
  position: sticky;
  top: calc(env(safe-area-inset-top) + 10px);
  z-index: 6;
  margin: -2px -2px 14px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(110, 238, 255, 0.18);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(6, 23, 48, 0.96), rgba(4, 16, 35, 0.88));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 16px 32px rgba(1, 8, 20, 0.28), inset 0 1px rgba(255, 255, 255, 0.08);
}

.results-back-btn,
.policy-top-back-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(118, 232, 252, 0.24);
  border-radius: 14px;
  color: rgba(230, 251, 255, 0.92);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: rgba(17, 66, 102, 0.48);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.results-back-btn:hover,
.policy-top-back-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(118, 232, 252, 0.46);
  background: rgba(18, 80, 122, 0.58);
}

.results-title {
  margin-top: 14px;
  margin-bottom: 4px;
  font-size: clamp(34px, 8vw, 46px);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.results-player-name {
  margin-bottom: 12px;
  color: rgba(214, 248, 255, 0.9);
  font-size: clamp(16px, 4.3vw, 20px);
}

.cards,
.results-cards,
.policy-stack {
  display: grid;
  gap: 14px;
}

.results-cards {
  margin-top: 2px;
}

.card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 14px;
  animation: iosCardIn 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.card.dark {
  border: 1px solid rgba(120, 230, 252, 0.16);
  background: linear-gradient(180deg, rgba(8, 24, 53, 0.96), rgba(5, 17, 38, 0.92));
  box-shadow: 0 18px 34px rgba(1, 7, 20, 0.28), inset 0 1px rgba(255, 255, 255, 0.07);
}

.card-clickable {
  cursor: pointer;
}

.tournament-gradient-header {
  position: relative;
  margin: 0 0 12px;
  padding: 16px 16px 15px;
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

.tournament-gradient-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 12, 30, 0.3), rgba(0, 10, 24, 0.08));
}

.tournament-title,
.tournament-location,
.tournament-date {
  position: relative;
  z-index: 1;
}

.tournament-title {
  margin: 0 0 4px;
  color: #ffffff;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "Helvetica Neue",
    sans-serif;
  font-size: clamp(25px, 6.2vw, 34px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 10px rgba(0, 13, 30, 0.74);
}

.tournament-location {
  margin: 0 0 8px;
  color: rgba(239, 253, 255, 0.96);
  font-size: clamp(15px, 4vw, 19px);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.tournament-date {
  margin: 0;
  color: rgba(219, 248, 255, 0.92);
  font-size: clamp(13px, 3.25vw, 16px);
  font-weight: 600;
}

.tournament-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  color: rgba(220, 249, 255, 0.92);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: var(--chip-bg);
}

.meta-chip.accent {
  color: #b7f7ff;
  background: rgba(22, 149, 175, 0.34);
}

.draw-board-block {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid rgba(136, 241, 255, 0.08);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(6, 21, 45, 0.78), rgba(3, 12, 27, 0.72));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.draw-board-block p {
  margin: 0;
  color: #e7fdff;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "Helvetica Neue",
    sans-serif;
  font-size: clamp(20px, 5.2vw, 29px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.draw-board-block p + p {
  margin-top: 8px;
}

.draws-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.draw-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(136, 241, 255, 0.08);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(6, 21, 45, 0.78), rgba(3, 12, 27, 0.72));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.draw-entry-title,
.draw-entry-subtitle {
  margin: 0;
}

.draw-entry-title {
  color: #e7fdff;
  font-size: clamp(18px, 4.8vw, 25px);
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.draw-entry-subtitle {
  margin-top: 5px;
  color: rgba(193, 243, 252, 0.72);
  font-size: clamp(13px, 3.4vw, 16px);
  line-height: 1.2;
  font-weight: 550;
}

.draw-entry-number {
  min-width: 76px;
  display: grid;
  justify-items: end;
  gap: 3px;
  color: #ffd27a;
}

.draw-entry-number span {
  font-size: clamp(28px, 7.2vw, 42px);
  line-height: 0.95;
  font-weight: 750;
  letter-spacing: 0;
}

.draw-entry-number small {
  color: rgba(255, 226, 166, 0.72);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

.draw-board-main {
  background: linear-gradient(90deg, #092c5d, #17698c, #092c5d);
}

.draw-board-jr-main {
  background: linear-gradient(90deg, #352471, #6c49ba, #352471);
}

.draw-board-qual {
  background: linear-gradient(90deg, #54380d, #b77e1c, #54380d);
}

.draw-board-alt {
  background: linear-gradient(90deg, #2a3563, #4f66b0, #2a3563);
}

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.spinner-glow {
  width: clamp(88px, 26vw, 130px);
  height: clamp(88px, 26vw, 130px);
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(29, 226, 255, 0.35), rgba(29, 226, 255, 0.08));
  box-shadow: 0 16px 36px rgba(18, 199, 231, 0.16), inset 0 1px rgba(255, 255, 255, 0.06);
}

.spinner {
  width: clamp(34px, 12vw, 48px);
  height: clamp(34px, 12vw, 48px);
  border: 5px solid rgba(29, 226, 255, 0.24);
  border-top-color: #1de2ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.status-list {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding-left: 0;
  list-style: none;
  color: rgba(197, 246, 255, 0.86);
  font-size: 15px;
}

.status-list li {
  position: relative;
  padding-left: 20px;
}

.status-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35ecff;
  box-shadow: 0 0 12px rgba(53, 236, 255, 0.72);
}

.empty-state,
.error-state,
.policy-notice,
.policy-footer-note,
.policy-section,
.boot-fallback-card {
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.empty-state {
  margin-bottom: 10px;
  border: 1px dashed rgba(129, 223, 243, 0.34);
  color: rgba(193, 243, 252, 0.86);
  font-size: 15px;
  line-height: 1.45;
}

.error-state {
  margin-bottom: 10px;
  border: 1px solid var(--danger);
  color: #ffd8de;
  font-size: 15px;
  line-height: 1.45;
  background: rgba(190, 44, 68, 0.18);
}

.policy-page {
  display: grid;
  gap: 16px;
}

.policy-title {
  margin-bottom: 6px;
}

.policy-intro {
  max-width: 68ch;
}

.policy-inline-link,
.site-footer-link {
  text-decoration: none;
}

.policy-inline-link:hover,
.policy-inline-link:focus-visible,
.site-footer-link:hover,
.site-footer-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.policy-notice,
.policy-footer-note,
.policy-section {
  border: 1px solid rgba(91, 223, 246, 0.18);
  background: rgba(5, 20, 44, 0.76);
  box-shadow: inset 0 1px rgba(138, 245, 255, 0.08);
}

.policy-notice,
.policy-footer-note {
  color: rgba(223, 250, 255, 0.92);
  line-height: 1.6;
}

.policy-section h2 {
  margin: 0 0 8px;
  font-size: clamp(20px, 4.6vw, 28px);
  letter-spacing: -0.02em;
}

.policy-section p {
  margin: 0 0 10px;
  color: rgba(224, 250, 255, 0.92);
  line-height: 1.7;
}

.policy-section p:last-child {
  margin-bottom: 0;
}

.policy-section ul {
  margin: 0;
  padding-left: 20px;
  color: rgba(224, 250, 255, 0.88);
  line-height: 1.7;
}

.policy-section li + li {
  margin-top: 6px;
}

.site-footer {
  margin-top: auto;
  padding: 10px 0 2px;
}

.site-footer-links {
  justify-content: center;
}

.site-footer-link {
  color: rgba(206, 243, 252, 0.7);
  font-size: 12px;
  line-height: 1.2;
  opacity: 0.84;
}

.site-footer-link:hover,
.site-footer-link:focus-visible {
  color: rgba(224, 248, 255, 0.9);
  opacity: 1;
}

.boot-fallback-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.boot-fallback-card {
  width: min(100%, 540px);
  border: 1px solid var(--panel-border);
  background: linear-gradient(160deg, rgba(11, 36, 71, 0.85), rgba(5, 18, 40, 0.94));
  box-shadow: var(--shadow-lg), inset 0 1px rgba(145, 242, 255, 0.08);
}

.boot-fallback-title {
  margin: 0 0 8px;
  color: #84f8ff;
  font-size: clamp(26px, 7vw, 38px);
}

.boot-fallback-message {
  margin: 0;
  color: rgba(200, 246, 255, 0.92);
  font-size: clamp(15px, 3.9vw, 18px);
}

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

@keyframes iosScreenIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes iosCardIn {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: 100%;
    padding-top: max(14px, env(safe-area-inset-top));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(22px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .screen:not(.results-screen):not(.policy-page),
  .loading-screen {
    width: 100%;
  }

  .results-screen {
    padding-top: 12px;
  }
}

@media (max-width: 430px) {
  .screen {
    border-radius: var(--radius-lg);
    padding: 16px;
  }

  .hero-title {
    font-size: clamp(32px, 9.5vw, 38px);
  }

  .hero-subtitle {
    margin-bottom: 16px;
    font-size: 16px;
  }

  .primary-btn,
  .boot-fallback-btn {
    min-height: 52px;
  }

  .results-sticky {
    top: calc(env(safe-area-inset-top) + 8px);
    margin: 0 0 12px;
    padding: 12px;
    border-radius: var(--radius-md);
  }

  .results-back-btn,
  .policy-top-back-btn {
    min-height: 38px;
    padding: 0 13px;
    font-size: 16px;
  }

  .results-title {
    margin-top: 12px;
    font-size: clamp(30px, 8.8vw, 36px);
  }

  .results-player-name {
    margin-bottom: 10px;
    font-size: 16px;
  }

  .card {
    border-radius: 22px;
    padding: 12px;
  }

  .tournament-gradient-header {
    border-radius: var(--radius-sm);
    padding: 14px;
  }

  .draw-board-block {
    padding: 16px;
  }
}

@media (max-width: 390px) {
  .app-shell {
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }

  .screen {
    border-radius: 20px;
    padding: 14px;
  }

  .hero-title {
    font-size: 30px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .results-title {
    font-size: 28px;
  }

  .tournament-title {
    font-size: 24px;
  }

  .draw-board-block p {
    font-size: 20px;
  }
}

/* Stronger iOS-style preview layer */
.ios-preview-shell {
  min-height: 100dvh;
  padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  color: var(--text-primary);
  background:
    linear-gradient(180deg, rgba(7, 28, 58, 0.72), rgba(2, 11, 31, 0.96)),
    var(--bg-deep);
  overflow-x: hidden;
}

.ios-preview-stack {
  width: min(100%, 390px);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.ios-screen {
  min-height: 812px;
  padding: 0 16px 18px;
  border: 1px solid rgba(90, 224, 252, 0.14);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(5, 19, 42, 0.98), rgba(3, 14, 33, 0.98)),
    var(--bg-deep);
  box-shadow: 0 20px 48px rgba(0, 7, 18, 0.32);
  overflow: hidden;
}

.ios-statusbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(233, 252, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
}

.ios-nav {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ios-nav-results {
  margin-bottom: 2px;
}

.ios-icon-button,
.ios-back-button,
.ios-clear-button {
  appearance: none;
  border: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
}

.ios-icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: rgba(129, 246, 255, 0.96);
  font-size: 18px;
  font-weight: 700;
  background: rgba(55, 232, 255, 0.1);
}

.ios-back-button {
  min-height: 36px;
  padding: 0;
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
}

.ios-large-header {
  margin: 10px 0 18px;
}

.ios-large-header.compact {
  margin-top: 2px;
  margin-bottom: 14px;
}

.ios-eyebrow {
  margin: 0 0 4px;
  color: rgba(166, 232, 245, 0.78);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.ios-large-header h1 {
  margin: 0;
  color: #81f6ff;
  font-size: 34px;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: 0;
}

.ios-search-field {
  min-height: 46px;
  margin: 0 0 12px;
  padding: 0 10px 0 13px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  background: rgba(123, 190, 211, 0.16);
  box-shadow: inset 0 0 0 1px rgba(116, 211, 240, 0.09);
}

.ios-search-field.compact {
  min-height: 42px;
}

.ios-search-icon {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(193, 243, 252, 0.68);
  border-radius: 50%;
  position: relative;
}

.ios-search-icon::after {
  content: "";
  width: 7px;
  height: 2px;
  position: absolute;
  right: -6px;
  bottom: -4px;
  border-radius: 2px;
  background: rgba(193, 243, 252, 0.68);
  transform: rotate(45deg);
}

.ios-search-field input {
  min-height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 500;
  background: transparent;
  box-shadow: none;
}

.ios-search-field input:focus {
  box-shadow: none;
}

.ios-clear-button {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  color: rgba(3, 17, 43, 0.9);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  background: rgba(193, 243, 252, 0.64);
}

.ios-segmented {
  height: 36px;
  margin: 0 0 18px;
  padding: 2px;
  display: grid;
  grid-template-columns: 0.8fr 0.8fr 1.4fr 1.2fr;
  gap: 2px;
  border-radius: 10px;
  background: rgba(123, 190, 211, 0.13);
  box-shadow: inset 0 0 0 1px rgba(116, 211, 240, 0.08);
}

.ios-segmented button {
  min-width: 0;
  border: 0;
  border-radius: 8px;
  color: rgba(218, 250, 255, 0.76);
  font-size: 13px;
  font-weight: 700;
  background: transparent;
}

.ios-segmented button.active {
  color: #03233a;
  background: linear-gradient(180deg, #45eeff, var(--accent-strong));
  box-shadow: 0 2px 8px rgba(23, 205, 234, 0.28);
}

.ios-group {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(10, 29, 59, 0.78);
  box-shadow: inset 0 0 0 1px rgba(116, 211, 240, 0.1);
}

.ios-list-row {
  width: 100%;
  min-height: 68px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
}

.ios-list-row strong {
  display: block;
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
}

.ios-list-row small {
  display: block;
  margin-top: 3px;
  color: rgba(193, 243, 252, 0.68);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
}

.ios-chevron {
  color: rgba(193, 243, 252, 0.42);
  font-size: 28px;
  line-height: 1;
}

.ios-primary-action {
  width: 100%;
  min-height: 50px;
  margin-top: 20px;
  border: 0;
  border-radius: 12px;
  color: #022035;
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(180deg, #45eeff, var(--accent-strong));
  box-shadow: 0 10px 24px rgba(23, 205, 234, 0.26);
}

.ios-count-row {
  margin: 4px 2px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(193, 243, 252, 0.72);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.ios-count-row strong {
  color: var(--accent);
  font-size: 15px;
}

.ios-tournament-list {
  display: grid;
}

.ios-tournament-row {
  min-height: 116px;
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr);
  gap: 12px;
  background: rgba(10, 29, 59, 0.42);
}

.ios-tournament-row + .ios-tournament-row {
  border-top: 1px solid rgba(116, 211, 240, 0.1);
}

.ios-draw-stripe {
  width: 5px;
}

.ios-draw-stripe.qual {
  background: linear-gradient(180deg, #b77e1c, #54380d);
}

.ios-draw-stripe.main {
  background: linear-gradient(180deg, #17698c, #092c5d);
}

.ios-draw-stripe.alt {
  background: linear-gradient(180deg, #4f66b0, #2a3563);
}

.ios-tournament-main {
  min-width: 0;
  padding: 14px 14px 14px 0;
}

.ios-row-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.ios-row-title h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: 0;
}

.ios-position {
  min-width: 44px;
  height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: #03233a;
  font-size: 15px;
  font-weight: 800;
  background: var(--accent);
}

.ios-tournament-main p {
  margin: 4px 0 10px;
  color: rgba(233, 252, 255, 0.82);
  font-size: 15px;
  font-weight: 600;
}

.ios-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ios-row-meta span {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 8px;
  color: rgba(218, 250, 255, 0.82);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  background: rgba(46, 104, 163, 0.26);
}

@media (min-width: 860px) {
  .ios-preview-stack {
    width: min(100%, 820px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 390px) {
  .ios-preview-shell {
    padding-right: 0;
    padding-left: 0;
  }

  .ios-screen {
    padding-right: 14px;
    padding-left: 14px;
  }

  .ios-large-header h1 {
    font-size: 32px;
  }

  .ios-row-title h2 {
    font-size: 19px;
  }
}

@media (max-width: 640px) {
/* Native iOS pass for the current production element set */
.native-ios-preview {
  --ios-chip-bg: rgba(133, 151, 170, 0.14);
  --ios-chip-border: rgba(229, 247, 251, 0.07);
  --ios-chip-text: rgba(223, 242, 246, 0.74);
  --ios-chip-accent-bg: rgba(167, 119, 44, 0.17);
  --ios-chip-accent-border: rgba(246, 201, 111, 0.16);
  --ios-chip-accent-text: rgba(245, 222, 181, 0.78);
  --ios-number-color: #ffd27a;
  --ios-qual-accent: linear-gradient(180deg, #ff7a59 0%, #ffb347 100%);
  --ios-main-accent: linear-gradient(180deg, #5ef2b8 0%, #18a0fb 100%);
  --ios-alt-accent: linear-gradient(180deg, #8ea7ff 0%, #4f6bff 100%);
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-right: max(12px, env(safe-area-inset-right));
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  padding-left: max(12px, env(safe-area-inset-left));
}

.native-ios-preview .app-main {
  gap: 0;
  width: 100%;
  padding: 0;
  overflow-x: clip;
}

.native-ios-preview .screen {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 22px 18px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.native-ios-preview .screen:not(.results-screen):not(.policy-page),
.native-ios-preview .loading-screen {
  width: 100%;
  max-width: none;
  margin: 0;
}

.native-ios-preview .screen::after {
  display: none;
}

.native-ios-preview .hero-title {
  max-width: 12ch;
  margin-bottom: 10px;
  color: #81f6ff;
  font-size: 32px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0;
}

.native-ios-preview .hero-subtitle {
  max-width: 31ch;
  margin-bottom: 18px;
  color: rgba(193, 243, 252, 0.78);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.36;
  letter-spacing: 0;
  text-wrap: pretty;
}

.native-ios-preview input {
  width: 100%;
  max-width: 326px;
  min-height: 46px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  background: rgba(123, 190, 211, 0.16);
  box-shadow: inset 0 0 0 1px rgba(116, 211, 240, 0.09);
}

.native-ios-preview input:focus {
  box-shadow:
    inset 0 0 0 1px rgba(55, 232, 255, 0.36),
    0 0 0 4px rgba(55, 232, 255, 0.12);
}

.native-ios-preview .primary-btn {
  width: 100%;
  max-width: 326px;
  min-height: 50px;
  margin: 0;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: 0 10px 24px rgba(23, 205, 234, 0.24);
}

.native-ios-preview .results-screen {
  padding: 0 16px 18px;
}

.native-ios-preview .results-sticky {
  position: static;
  margin: 0 0 12px;
  padding: 18px 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.native-ios-preview .results-back-btn {
  min-height: 32px;
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--accent);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  background: transparent;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.native-ios-preview .results-back-btn::before {
  content: "";
  width: 10px;
  height: 10px;
  border-left: 2.25px solid currentColor;
  border-bottom: 2.25px solid currentColor;
  transform: rotate(45deg);
  border-radius: 1px;
}

.native-ios-preview .results-title {
  max-width: none;
  margin: 0 0 6px;
  color: rgba(129, 246, 255, 0.78);
  font-size: 22px;
  line-height: 1.14;
  font-weight: 600;
}

.native-ios-preview .results-player-name {
  max-width: none;
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.08;
}

.native-ios-preview .results-summary-pill {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(193, 243, 252, 0.72);
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  background: transparent;
}

.native-ios-preview .results-cards {
  gap: 14px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.native-ios-preview .card {
  border-radius: 16px;
  padding: 0;
  animation: none;
}

.native-ios-preview .card + .card {
  border-top: 0;
}

.native-ios-preview .card.dark {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(116, 211, 240, 0.1);
  background: rgba(10, 29, 59, 0.62);
  box-shadow: 0 10px 24px rgba(1, 8, 20, 0.16);
}

.native-ios-preview .card.dark::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  pointer-events: none;
}

.native-ios-preview .card.dark:has(.tournament-gradient-header.draw-board-qual)::before {
  background: var(--ios-qual-accent);
}

.native-ios-preview .card.dark:has(.tournament-gradient-header.draw-board-main)::before {
  background: var(--ios-main-accent);
}

.native-ios-preview .card.dark:has(.tournament-gradient-header.draw-board-alt)::before {
  background: var(--ios-alt-accent);
}

.native-ios-preview .tournament-gradient-header {
  margin: 0;
  padding: 15px 16px 10px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.native-ios-preview .tournament-gradient-header::before {
  display: none;
}

.native-ios-preview .tournament-gradient-header::after {
  display: none;
}

.native-ios-preview .tournament-title {
  margin-bottom: 4px;
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: none;
}

.native-ios-preview .tournament-location {
  margin-bottom: 5px;
  color: rgba(233, 252, 255, 0.78);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  text-shadow: none;
}

.native-ios-preview .tournament-date {
  color: rgba(218, 250, 255, 0.72);
  font-size: 13px;
  font-weight: 400;
  text-shadow: none;
}

.native-ios-preview .tournament-meta {
  gap: 6px;
  margin: 0;
  padding: 0 16px 12px;
}

.native-ios-preview .meta-chip {
  min-height: 24px;
  height: auto;
  padding: 4px 8px;
  border: 1px solid var(--ios-chip-border);
  border-radius: 8px;
  color: var(--ios-chip-text);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
  background: var(--ios-chip-bg);
}

.native-ios-preview .meta-chip.accent {
  border-color: var(--ios-chip-accent-border);
  color: var(--ios-chip-accent-text);
  background: var(--ios-chip-accent-bg);
}

.native-ios-preview .draw-board-block {
  margin: 0;
  padding: 0 16px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.native-ios-preview .draw-board-block p {
  display: inline-flex;
  margin: 0 6px 0 0;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--ios-chip-border);
  border-radius: 8px;
  color: var(--ios-chip-text);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0;
  background: var(--ios-chip-bg);
}

.native-ios-preview .draw-board-block .draw-number {
  width: 100%;
  min-height: auto;
  margin: 8px 0 0;
  padding: 10px 0 0;
  align-items: center;
  justify-content: flex-start;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-top: 1px solid rgba(116, 211, 240, 0.12);
  border-radius: 0;
  color: var(--ios-number-color);
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  background: transparent;
  box-shadow: none;
}

.native-ios-preview .draw-board-block p + p {
  margin-top: 6px;
}

.native-ios-preview .draws-list {
  gap: 0;
  margin: 0;
  padding: 0 16px 16px;
}

.native-ios-preview .draw-entry {
  min-height: 76px;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid rgba(116, 211, 240, 0.1);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.native-ios-preview .draw-entry:first-child {
  border-top-color: rgba(116, 211, 240, 0.14);
}

.native-ios-preview .draw-entry-title {
  color: rgba(233, 252, 255, 0.94);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0;
}

.native-ios-preview .draw-entry-subtitle {
  margin-top: 3px;
  color: rgba(193, 243, 252, 0.64);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 400;
}

.native-ios-preview .draw-entry-number {
  min-width: 68px;
  gap: 2px;
  color: var(--ios-number-color);
}

.native-ios-preview .draw-entry-number span {
  font-size: 31px;
  line-height: 0.95;
  font-weight: 700;
}

.native-ios-preview .draw-entry-number small {
  color: rgba(255, 226, 166, 0.66);
  font-size: 11px;
  font-weight: 500;
}
}

@media (max-width: 390px) {
  .native-ios-preview {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .native-ios-preview .screen {
    padding-right: 16px;
    padding-left: 16px;
  }

  .native-ios-preview .hero-title,
  .native-ios-preview .results-title {
    font-size: 22px;
  }

  .native-ios-preview .hero-title {
    font-size: 32px;
  }

  .native-ios-preview .results-player-name {
    font-size: 32px;
  }
}

.native-ios-preview .results-back-btn[aria-label] {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0 !important;
  justify-content: center;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(2, 10, 26, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: rgba(232, 247, 250, 0.96);
}

.native-ios-preview .results-back-btn[aria-label]::before {
  content: none;
  display: none;
}

.native-ios-preview .results-back-btn[aria-label]:hover,
.native-ios-preview .results-back-btn[aria-label]:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 26px rgba(2, 10, 26, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
