:root {
  --app-max-width: 1180px;
  --app-surface: rgba(9, 25, 13, 0.72);
  --app-surface-strong: rgba(7, 20, 10, 0.84);
  --app-surface-soft: rgba(255, 255, 255, 0.12);
  --app-border: rgba(255, 255, 255, 0.18);
  --app-text: #f6f7f1;
  --app-text-muted: rgba(246, 247, 241, 0.78);
  --app-accent: #b8f76b;
  --app-accent-strong: #55b035;
  --app-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  --panel-gap: clamp(1rem, 2vw, 1.5rem);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  color: var(--app-text);
  background: #07130a;
  overflow: hidden;
}

body.launcher-home {
  overflow: auto;
}

#main-screen,
#game,
#teams-screen,
#play,
#leaderboard-panel,
.toolbar {
  -webkit-user-select: none;
  user-select: none;
}

.launcher-home .eyebrow {
  display: inline-flex;
  margin-bottom: 0.85rem;
}

a {
  color: inherit;
  text-decoration: none;
  outline: none;
}

img {
  border: 0;
  display: block;
}

ul,
li,
h1,
h2,
h3,
p,
#navigation,
#content,
.section {
  list-style: none;
  margin: 0;
  padding: 0;
}

#bgimg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: auto;
  min-height: 0;
  max-width: none;
  object-fit: contain;
  filter: none;
  z-index: -3;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: -2;
}

#realBody {
  position: relative;
  min-height: 100vh;
  width: 100%;
  padding: clamp(0.9rem, 2vw, 1.6rem);
  overflow: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#realBody::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.launcher-shell {
  position: relative;
  width: min(100%, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.2rem, 2.5vw, 1.8rem);
}

.launcher-hero,
.launcher-card {
  border: 1px solid var(--app-border);
  border-radius: 28px;
  background: var(--app-surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--app-shadow);
}

.launcher-hero {
  padding: clamp(1.4rem, 3vw, 2rem);
}

.launcher-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1;
  text-shadow: rgba(0, 0, 0, 0.45) 0 6px 20px;
}

.launcher-copy {
  max-width: 42rem;
  margin-top: 0.9rem;
  color: var(--app-text-muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.6;
}

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
}

.launcher-card {
  padding: 1.25rem;
  color: inherit;
}

.launcher-card-live {
  background:
    linear-gradient(180deg, rgba(14, 42, 20, 0.86), rgba(7, 20, 10, 0.9)),
    var(--app-surface);
}

.launcher-card-planned {
  opacity: 0.86;
}

.launcher-card h2 {
  margin: 0.8rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
}

.launcher-card p {
  margin: 0.75rem 0 0;
  color: var(--app-text-muted);
  line-height: 1.55;
}

.launcher-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.status-pill.live,
.status-pill.planned {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill.live {
  background: rgba(184, 247, 107, 0.18);
  color: var(--app-accent);
}

.status-pill.planned {
  background: rgba(255, 255, 255, 0.12);
  color: var(--app-text-muted);
}

.launcher-domain {
  color: var(--app-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.launcher-link {
  display: inline-flex;
  margin-top: 1.15rem;
  color: var(--app-accent);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#iphone-content {
  width: min(100%, var(--app-max-width));
  margin: 0 auto;
}

#content {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: calc(100vh - clamp(1.8rem, 4vw, 3.2rem));
  min-height: calc(100vh - clamp(1.8rem, 4vw, 3.2rem));
  border: 1px solid var(--app-border);
  border-radius: 28px;
  background: rgba(4, 10, 6, 0.28);
  backdrop-filter: blur(14px);
  box-shadow: var(--app-shadow);
}

.section {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.section .sub {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: clamp(1rem, 2vw, 1.5rem);
  flex-direction: column;
  gap: var(--panel-gap);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateX(0);
  will-change: transform;
}

.section .sub::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.section .sub.active-screen {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  z-index: 2;
}

.section .sub.transition-screen {
  visibility: visible;
}

.section .sub.screen-enter-right,
.section .sub.screen-enter-left,
.section .sub.screen-leave-left,
.section .sub.screen-leave-right {
  z-index: 3;
}

.section .sub.screen-enter-right {
  opacity: 1;
  transform: translate3d(100%, 0, 0);
}

.section .sub.screen-enter-left {
  opacity: 1;
  transform: translate3d(-100%, 0, 0);
}

.section .sub.screen-leave-left,
.section .sub.screen-leave-right {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.section .sub.screen-enter-right.screen-enter-active,
.section .sub.screen-enter-left.screen-enter-active,
.section .sub.screen-leave-left.screen-leave-active,
.section .sub.screen-leave-right.screen-leave-active {
  transition:
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 220ms ease-out;
}

.section .sub.screen-enter-right.screen-enter-active,
.section .sub.screen-enter-left.screen-enter-active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.section .sub.screen-leave-left.screen-leave-active {
  opacity: 0.72;
  transform: translate3d(-12%, 0, 0);
}

.section .sub.screen-leave-right.screen-leave-active {
  opacity: 0.72;
  transform: translate3d(12%, 0, 0);
}

.screen-card,
.list-container {
  border: 1px solid var(--app-border);
  border-radius: 24px;
  background: var(--app-surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.toolbar {
  position: relative;
  min-height: 82px;
  padding: 0.9rem 1.2rem 1rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(158, 203, 45, 0.94), rgba(56, 98, 21, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.toolbar > h1 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(100%, calc(100% - 11rem));
  margin: 0;
  color: #fff;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.2vw, 2.3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: rgba(0, 0, 0, 0.55) 0 2px 10px;
}

.button {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 2.35rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(4, 13, 7, 0.28);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0;
}

.grayButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 52px;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(188, 255, 109, 0.95), rgba(67, 148, 44, 0.95));
  color: #07240f;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18);
}

.grayButton.secondary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(216, 230, 213, 0.92));
  color: #15381a;
}

.grayButton.destructive {
  background: linear-gradient(180deg, rgba(255, 182, 168, 0.94), rgba(191, 71, 48, 0.94));
  color: #fff;
}

.grayButton.disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: auto;
}

.edgetoedge a {
  -webkit-tap-highlight-color: rgba(23, 126, 191, 0.4);
}

.edgetoedge:not(.games) a[selected=true],
.edgetoedge:not(.games) a:active {
  background: linear-gradient(135deg, rgba(184, 247, 107, 0.95), rgba(89, 181, 54, 0.95)) !important;
  color: #0b250f !important;
}

#main-screen {
  justify-content: flex-start;
}

.app-selector-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.app-option-card {
  width: 100%;
  min-height: 156px;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(13, 36, 18, 0.95), rgba(9, 21, 12, 0.9));
  color: #fff;
  text-align: left;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.app-option-card.selected {
  border-color: rgba(184, 247, 107, 0.55);
  box-shadow: 0 0 0 2px rgba(184, 247, 107, 0.18), 0 18px 40px rgba(0, 0, 0, 0.24);
}

.app-option-card.planned {
  opacity: 0.7;
}

.app-option-card:disabled {
  cursor: default;
}

.app-option-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  color: rgba(246, 247, 241, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-option-status {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.app-option-card.selected .app-option-status {
  background: rgba(184, 247, 107, 0.18);
  color: var(--app-accent);
}

.app-option-name {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.2rem;
  font-weight: 800;
}

.app-option-description {
  display: block;
  color: var(--app-text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

#play-game {
  position: static;
  margin: 0;
}

#game-container {
  width: min(100%, 36rem);
  margin: 0 auto;
}

.competition-name {
  position: static;
  display: block;
  width: min(100%, calc(100% - 8rem));
  margin: 0.22rem 0 0;
  margin-right: auto;
  margin-left: auto;
  color: rgba(226, 231, 221, 0.72);
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.toolbar-with-competition {
  display: block;
  text-align: center;
}

.toolbar-with-competition > h1 {
  position: static;
  transform: none;
  width: min(100%, calc(100% - 8rem));
  margin: 0.2rem auto 0;
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
}

.profile-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.profile-type-pill {
  background: rgba(184, 247, 107, 0.14);
  color: var(--app-accent);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.compact-actions {
  margin-top: 1.1rem;
}

.card-button {
  min-width: 0;
  flex: 1 1 12rem;
}

.minor-action-button {
  min-width: 0;
  min-height: 44px;
  padding: 0.68rem 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.main-action-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  width: min(100%, 43rem);
  margin: 0 auto auto;
}

.form-card {
  width: min(100%, 34rem);
  margin: 0 auto;
  padding: 1.35rem 1.45rem;
}

.form-card h3 {
  margin-bottom: 0.55rem;
  color: #fff;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

#home-leaderboard-card {
  width: min(100%, 43rem);
  margin: 0 auto;
  padding: clamp(1.35rem, 3vw, 2rem);
}

#home-leaderboard-card h3 {
  margin-bottom: 0.55rem;
  color: #fff;
  font-size: clamp(1.35rem, 2vw, 1.95rem);
}

#home-leaderboard-card p {
  color: var(--app-text-muted);
}

#home-leaderboard-card .support-copy {
  margin-bottom: 0.35rem;
}

#competition-main {
  width: min(100%, 48rem);
  margin: 0 auto;
  padding: clamp(1.35rem, 3vw, 2rem);
}

#competition-main .eyebrow {
  display: inline-flex;
  margin-bottom: 0.45rem;
}

#competition-main h3 {
  margin-bottom: 0.55rem;
  color: #fff;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

#competition-current-copy {
  color: var(--app-text-muted);
  line-height: 1.55;
}

#competition-current-name {
  margin-top: 0.85rem;
}

.home-scores-table {
  margin-top: 0.22rem;
}

.home-scores-table th:nth-child(1),
.home-scores-table td:nth-child(1) {
  width: 4.5rem;
}

.home-scores-table th:nth-child(3),
.home-scores-table td:nth-child(3) {
  width: 7rem;
  text-align: right;
}

.leaderboard-player-name {
  color: #fff;
  font-weight: 700;
}

.home-player-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.profile-rename-form label,
.form-card label {
  display: block;
  margin-top: 0.95rem;
  color: var(--app-text);
  font-size: 0.92rem;
  font-weight: 700;
}

.profile-rename-form input,
.form-card input {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #12321a;
  font-family: inherit;
  font-size: 1rem;
}

.profile-rename-form input:focus,
.form-card input:focus {
  outline: 2px solid rgba(184, 247, 107, 0.45);
  outline-offset: 1px;
}

#profile-form .card-actions {
  justify-content: center;
}

#profile-form .card-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 11rem;
  min-height: 3.25rem;
  padding: 0.8rem 1.25rem;
}

.profile-screen-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(100%, 44rem);
  margin: 0 auto;
}

.profile-hero-card,
.profile-avatar-card,
.profile-scores-card {
  padding: clamp(1.2rem, 2.5vw, 1.7rem);
}

.profile-hero-card {
  position: relative;
  text-align: center;
  margin-top: 4.4rem;
  padding-top: 5rem;
}

.profile-avatar-stage {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 0;
  transform: translate(-50%, -50%);
}

.profile-avatar-frame {
  width: clamp(8.75rem, 18vw, 11rem);
  height: clamp(8.75rem, 18vw, 11rem);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at top, rgba(184, 247, 107, 0.22), rgba(255, 255, 255, 0.08) 52%, rgba(8, 20, 10, 0.92) 100%);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.profile-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name-row {
  position: relative;
  display: inline-block;
  margin-top: 0.8rem;
}

.profile-hero-card h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 0.95;
}

.profile-edit-trigger {
  position: absolute;
  top: 50%;
  left: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.72rem;
  height: 1.72rem;
  margin-left: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--app-accent);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
  transform: translateY(-46%);
}

.profile-edit-trigger:hover,
.profile-edit-trigger:focus-visible {
  border-color: rgba(184, 247, 107, 0.44);
  background: rgba(184, 247, 107, 0.12);
  outline: none;
}

.profile-edit-trigger svg {
  width: 0.66rem;
  height: 0.66rem;
  fill: currentColor;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.1rem;
}

.profile-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
}

.profile-stat-label {
  color: rgba(226, 231, 221, 0.74);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-stat-card strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.profile-auth-card {
  margin-top: 0.95rem;
  padding: 0.95rem 1rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
}

.profile-auth-card strong {
  display: block;
  margin-top: 0.25rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#profile-auth-copy {
  margin: 0.35rem 0 0;
  color: var(--app-text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.profile-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.profile-manage-players-actions {
  margin-top: 0.95rem;
}

.profile-player-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
  margin-top: 0.95rem;
}

.profile-manage-players-button {
  width: 100%;
}

.profile-account-switcher {
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-account-copy {
  margin: 0.35rem 0 0;
  color: var(--app-text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.profile-account-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.profile-account-button {
  width: 100%;
  justify-content: center;
}

.players-screen-shell {
  width: min(100%, 34rem);
}

.players-card {
  padding: clamp(1.2rem, 2.6vw, 1.55rem);
  text-align: left;
}

.players-card h3 {
  margin-top: 0.15rem;
  margin-bottom: 0.5rem;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
}

.players-account-switcher {
  margin-top: 1rem;
  padding-top: 0;
  border-top: 0;
}

.players-table-shell {
  overflow: hidden;
  margin-top: 0.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(7, 15, 10, 0.56);
}

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

.players-table tbody tr + tr {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.players-player-row {
  cursor: pointer;
  transition: background 160ms ease;
}

.players-player-row:hover,
.players-player-row:focus-within {
  background: rgba(255, 255, 255, 0.04);
}

.players-player-row:focus-visible {
  outline: 2px solid rgba(196, 255, 109, 0.65);
  outline-offset: -2px;
}

.players-player-row.is-current {
  background: rgba(184, 247, 107, 0.08);
}

.players-player-row.is-empty {
  cursor: default;
}

.players-player-row td {
  padding: 0.95rem 1rem;
  vertical-align: middle;
}

.players-player-tick {
  width: 2.4rem;
  text-align: center;
}

.players-player-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  border: 2px solid rgba(214, 232, 204, 0.34);
  background: transparent;
  color: transparent;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.players-player-row.is-current .players-player-marker {
  border-color: rgba(184, 247, 107, 0.72);
  background: rgba(184, 247, 107, 0.14);
  color: rgba(232, 255, 195, 0.98);
}

.players-player-name {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.players-player-status {
  width: 5.75rem;
  color: rgba(226, 231, 221, 0.74);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.players-player-row.is-current .players-player-status {
  color: var(--app-accent);
}

.profile-auth-button.secondary[disabled],
.profile-auth-button[disabled] {
  opacity: 1;
  cursor: default;
  filter: none;
  color: rgba(244, 242, 232, 0.62);
  box-shadow: none;
}

.profile-auth-button.secondary[disabled] {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.profile-auth-button[disabled]:not(.secondary) {
  border-color: rgba(205, 255, 120, 0.2);
  background: linear-gradient(180deg, rgba(197, 255, 96, 0.46), rgba(162, 229, 51, 0.5));
  color: rgba(18, 32, 15, 0.55);
}

#players-error {
  min-height: 0;
  margin: 0.75rem 0 0;
}

.profile-auth-button {
  border: 1px solid rgba(205, 255, 120, 0.34);
  border-radius: 999px;
  min-height: 2.6rem;
  padding: 0.7rem 1rem;
  background: linear-gradient(180deg, rgba(197, 255, 96, 0.96), rgba(162, 229, 51, 0.98));
  color: #12200f;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 10px 18px rgba(0, 0, 0, 0.18);
}

.profile-auth-button.secondary {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #f4f2e8;
  box-shadow: none;
}

.profile-auth-button:hover,
.profile-auth-button:focus-visible {
  outline: none;
  filter: brightness(1.04);
}

.profile-auth-button[disabled] {
  opacity: 0.6;
  cursor: wait;
}

#profile-auth-error {
  min-height: 0;
  margin: 0.6rem 0 0;
}

.profile-rename-form {
  margin-top: 1.1rem;
  text-align: left;
}

.profile-avatar-card h3,
.profile-scores-card h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
}

.profile-avatar-card {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.profile-avatar-card h4 {
  margin: 0.15rem 0 0.75rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.profile-avatar-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.45rem 0.7rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(9, 24, 13, 0.7));
  color: #fff;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.profile-avatar-option:hover,
.profile-avatar-option:focus-visible {
  border-color: rgba(184, 247, 107, 0.5);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(16, 35, 17, 0.82));
  outline: none;
}

.profile-avatar-option.selected {
  border-color: rgba(196, 255, 109, 0.88);
  box-shadow:
    0 0 0 1px rgba(196, 255, 109, 0.42),
    0 0 16px rgba(184, 247, 107, 0.42);
}

.profile-avatar-option-frame {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(184, 247, 107, 0.18), rgba(255, 255, 255, 0.08) 48%, rgba(8, 20, 10, 0.9) 100%);
}

.profile-avatar-option-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-option-label {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.profile-scores-table {
  margin-top: 0.35rem;
}

.profile-scores-table thead {
  display: none;
}

.profile-scores-table th:nth-child(1),
.profile-scores-table td:nth-child(1) {
  width: 3rem;
}

.profile-scores-table th:nth-child(3),
.profile-scores-table td:nth-child(3) {
  width: 6.5rem;
  text-align: right;
}

.profile-score-title {
  display: inline-block;
  color: var(--app-text);
  font-size: 1.1rem;
  font-weight: 700;
}

.profile-score-context {
  margin-top: 0.18rem;
  color: rgba(214, 224, 213, 0.68);
  font-size: 0.88rem;
  line-height: 1.25;
}

.profile-score-value {
  color: #f1f5c2;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-align: right;
}

.profile-editor-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(2, 8, 4, 0.58);
  backdrop-filter: blur(10px);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.profile-editor-backdrop[hidden] {
  display: none !important;
}

.profile-editor-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.profile-editor-sheet {
  position: relative;
  width: min(100%, 40rem);
  max-height: min(82vh, 46rem);
  padding: 1.2rem 1.1rem 1.1rem;
  overflow-y: auto;
  border-radius: 24px;
  background: rgba(8, 20, 11, 0.96);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42);
  transform: translateY(calc(100% + var(--profile-editor-drag-offset, 0px)));
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
  touch-action: pan-y;
}

.profile-editor-backdrop.is-open .profile-editor-sheet {
  transform: translateY(var(--profile-editor-drag-offset, 0px));
}

.profile-editor-sheet.is-dragging {
  transition: none;
}

.profile-editor-handle {
  width: 3.3rem;
  height: 0.28rem;
  margin: 0 auto 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.profile-editor-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.8rem;
}

.profile-editor-heading {
  min-width: 0;
}

.profile-editor-heading > .eyebrow {
  margin-bottom: 0.22rem;
}

.profile-editor-heading > h3 {
  margin-bottom: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-editor-save {
  border: 1px solid rgba(205, 255, 120, 0.42);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(197, 255, 96, 0.96), rgba(162, 229, 51, 0.98));
  color: #12200f;
  min-height: 2.6rem;
  padding: 0.65rem 1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 10px 18px rgba(0, 0, 0, 0.2);
}

.profile-editor-save:hover,
.profile-editor-save:focus-visible {
  outline: none;
  background: linear-gradient(180deg, rgba(211, 255, 125, 0.98), rgba(171, 235, 62, 1));
}

.profile-editor-sheet .profile-rename-form {
  margin-top: 0.8rem;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 0.7rem;
}

.checkbox-row input {
  width: auto;
  margin-top: 0;
}

.form-error {
  min-height: 1.2rem;
  margin-top: 0.25rem;
  color: #ffd0c8;
  font-size: 0.9rem;
}

.support-copy {
  margin-top: 0.6rem;
  color: var(--app-text-muted);
  line-height: 1.6;
}

.support-copy:empty {
  display: none;
}

.empty-state {
  color: var(--app-text-muted);
  line-height: 1.6;
}

.competition-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0;
}

.competition-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.competition-item:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.competition-item.selected {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.competition-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  flex: 0 0 auto;
  color: transparent;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.competition-item.selected .competition-badge {
  border-color: rgba(184, 247, 107, 0.72);
  background: rgba(184, 247, 107, 0.14);
  color: rgba(232, 255, 195, 0.98);
}

.competition-details {
  flex: 1 1 auto;
  min-width: 0;
}

.competition-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.competition-meta {
  margin-top: 0.2rem;
  color: var(--app-text-muted);
  font-size: 0.84rem;
}

.competition-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.competition-share,
.competition-edit {
  flex: 0 0 auto;
  min-width: 0;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.competition-share {
  background: rgba(184, 247, 107, 0.12);
  color: var(--app-accent);
}

#competition-actions {
  margin-top: 1.25rem;
}

.list-container {
  flex: 1;
  padding: clamp(1rem, 2vw, 1.35rem);
}

#game .list-container {
  flex: 0 0 auto;
  padding-bottom: clamp(1.25rem, 2.6vw, 1.7rem);
}

.selection-intro {
  margin-bottom: 1rem;
}

.selection-intro h3,
#selected-game-card h3 {
  margin-bottom: 0.45rem;
  color: #fff;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.selection-intro p,
#selected-game-copy {
  margin: 0;
  color: var(--app-text-muted);
  line-height: 1.55;
}

#selected-game-card {
  width: min(100%, 36rem);
  margin: 0 auto;
  padding: 1.2rem 1.35rem;
}

#selected-game-card .eyebrow {
  margin: 0 0 0.45rem;
  color: #d7ff93;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#teams-container {
  display: flex;
  align-items: stretch;
  width: min(100%, 42rem);
  margin: 0 auto;
}

.edgetoedge {
  min-height: 100%;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  overflow: hidden auto;
}

.edgetoedge.games {
  border: 1px solid rgba(7, 36, 15, 0.08);
}

.edgetoedge > li {
  position: relative;
  border-bottom: 1px solid rgba(7, 36, 15, 0.08);
  padding: 0.95rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(239, 245, 238, 0.95));
  color: #194321;
}

.edgetoedge a,
.inset a {
  display: block;
  margin: 0.1rem 0;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  background: rgba(15, 56, 20, 0.05);
  color: #194321 !important;
  font-weight: 700;
  background-image: none;
  cursor: pointer;
}

.edgetoedge .gametype {
  padding-bottom: 0.8rem;
}

.edgetoedge .gametype a {
  font-size: 0.82rem;
}

.year-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.45rem;
}

.year-option {
  border: 1px solid rgba(10, 53, 20, 0.16);
  border-radius: 999px;
  padding: 0.6rem 0.95rem;
  background: rgba(255, 255, 255, 0.9);
  color: #184324;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.year-option.selected {
  border-color: rgba(112, 190, 35, 0.9);
  background: linear-gradient(180deg, #98dd4f, #5d9e1e);
  color: #0d2a14;
}

#teams {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 0.9rem;
  padding: 0;
}

#teams li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 98px;
  padding: 0.85rem 0.4rem;
  border: 1px solid rgba(7, 36, 15, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

#teams li > .team {
  display: flex;
  min-height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.7rem;
  color: #14361c;
}

.team-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 4.5rem);
  height: 3.4rem;
  transform: none;
  transform-origin: center;
  background: transparent;
  text-indent: 0;
  overflow: visible;
}

.team-badge-text {
  transform: none;
  width: auto;
  min-width: 3.25rem;
  height: auto;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(24, 92, 36, 0.92), rgba(10, 53, 20, 0.95));
  color: #f4ffda;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-indent: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.team-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.22));
}

.team-badge.carl .team-logo {
  filter: brightness(0) invert(1) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.22));
}

.all-teams-badge {
  width: min(100%, 4.2rem);
  height: 3rem;
}

.team-label {
  display: block;
  text-align: center;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.2;
}

#question-no {
  position: absolute;
  left: 50%;
  top: 0.55rem;
  transform: translateX(-50%);
  color: #d7ff93;
  font-size: 0.86rem;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#score {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.35rem 0.65rem 0.35rem 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff6a8;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-align: right;
  text-shadow: 0 0 10px rgba(255, 248, 168, 0.5);
}

#question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.6rem);
  align-items: start;
  justify-items: center;
  position: relative;
}

#question.names-mode {
  grid-template-columns: 1fr;
}

#question.names-mode img {
  aspect-ratio: auto;
}

#v1,
#v2 {
  position: relative;
  left: auto;
  width: min(100%, 18rem);
}

#v1.numbers {
  width: min(100%, 24rem) !important;
}

#operator {
  position: relative;
  left: auto;
  top: auto;
  margin-top: 4.2rem;
  padding: 0.5rem 0.8rem;
  border-radius: 16px;
  background: rgba(5, 20, 9, 0.82);
  color: #fff;
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

#question img {
  width: 100%;
  height: auto;
  aspect-ratio: 174 / 225;
  padding: 0.65rem;
  margin: 0;
  border-radius: 24px;
  border: 1px solid rgba(213, 222, 228, 0.22);
  background: linear-gradient(180deg, rgba(27, 35, 44, 0.48), rgba(10, 15, 21, 0.34));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 30px rgba(0, 0, 0, 0.2);
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.24));
}

.numbers img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 326 / 416;
}

#big-number {
  display: none;
  width: 100%;
  min-height: 225px;
  padding: 1.2rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  color: #173019;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
}

.player-name,
.resp-player-name,
.ans-player-name {
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  bottom: calc(0.95rem + 10px);
  padding: 0.52rem 0.9rem 0.58rem;
  border-radius: 14px;
  border: 1px solid rgba(236, 241, 236, 0.12);
  background: linear-gradient(180deg, rgba(47, 55, 61, 0.62), rgba(20, 24, 29, 0.82));
  color: #fff;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
  text-shadow: none;
}

.player-name {
  font-size: 1rem;
  line-height: 1.25;
}

.numbers .player-name {
  min-height: 56px;
  font-size: 1.25rem;
}

.player-number,
.resp-player-number,
.ans-player-number {
  position: absolute;
  left: 0.8rem;
  top: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(5, 74, 20, 0.82);
  color: #fff;
  font-weight: 800;
  text-shadow: rgba(0, 0, 0, 0.7) 0 2px 6px;
}

.player-number {
  width: 56px;
  height: 56px;
  font-size: 1.9rem;
}

.numbers .player-number {
  width: 72px;
  height: 72px;
  font-size: 2.35rem;
}

#choices {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  position: relative;
  left: auto;
  top: auto;
  margin-top: 1rem;
}

#equals {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  min-height: 4rem;
  margin: 1.2rem 0 0;
  padding: 0.5rem;
  border-radius: 16px;
  background: rgba(2, 20, 6, 0.82);
  color: #fff;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
}

.choices-grid {
  float: none !important;
  display: grid;
  grid-template-columns: repeat(4, minmax(7rem, 1fr));
  gap: 1rem;
  width: 100%;
}

#r1,
#r2,
#r3,
#r4,
#answer {
  position: relative;
  left: auto;
  top: auto;
  min-width: 0;
  padding: 0.35rem;
  border-radius: 20px;
  background: rgba(4, 20, 7, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#answer {
  grid-column: 2 / span 2;
  justify-self: center;
  width: min(100%, 11rem);
  margin-top: 0.25rem;
}

#choices img,
#answer img {
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0.35rem;
  border-radius: 16px;
  border: 1px solid rgba(213, 222, 228, 0.18);
  background: linear-gradient(180deg, rgba(27, 35, 44, 0.42), rgba(10, 15, 21, 0.3));
  float: none;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.22));
}

.response {
  width: 100%;
  aspect-ratio: 119 / 151;
  cursor: pointer;
}

.resp-player-name {
  font-size: 0.78rem;
  line-height: 1.25;
}

.resp-player-number {
  width: 34px;
  height: 34px;
  font-size: 1rem;
}

.ans-player-name {
  font-size: 0.82rem;
  line-height: 1.2;
}

.ans-player-number {
  width: 42px;
  height: 42px;
  font-size: 1.35rem;
}

#resp-numbers {
  position: relative;
  left: auto;
  top: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(8rem, 1fr));
  gap: 1rem;
  padding: 0;
  margin-top: 1rem;
  max-width: 30rem;
}

#resp-numbers.names-mode {
  max-width: min(100%, 34rem);
  margin-right: auto;
  margin-left: auto;
  grid-template-columns: 1fr;
}

#resp-numbers.level2 {
  left: auto;
  top: auto;
}

#rn1,
#rn2,
#rn3,
#rn4,
#rn1.name,
#rn2.name,
#rn3.name,
#rn4.name {
  position: relative;
  left: auto;
  top: auto;
}

.legacy-effect-answer-reveal,
.legacy-effect-puff-in,
.legacy-effect-explode-out {
  animation-duration: var(--legacy-effect-duration, 1000ms);
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  transform-origin: center center;
  will-change: opacity, transform, filter;
}

.legacy-effect-answer-reveal {
  animation-name: legacy-answer-reveal;
}

.legacy-effect-puff-in {
  animation-name: legacy-puff-in;
}

.legacy-effect-explode-out {
  animation-name: legacy-explode-out;
  pointer-events: none;
}

#r1.response-hidden,
#r2.response-hidden,
#r3.response-hidden,
#r4.response-hidden,
#rn1.response-hidden,
#rn2.response-hidden,
#rn3.response-hidden,
#rn4.response-hidden {
  visibility: hidden;
  pointer-events: none;
}

.legacy-explode-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}

.legacy-explode-shard {
  position: fixed;
  overflow: hidden;
  pointer-events: none;
  animation-name: legacy-explode-shard;
  animation-duration: var(--legacy-effect-duration, 500ms);
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

.legacy-explode-clone {
  position: absolute;
  transform-origin: center center;
}

@keyframes legacy-puff-in {
  0% {
    opacity: 0;
    transform: scale(1.32);
  }

  55% {
    opacity: 1;
    transform: scale(0.96);
  }

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

@keyframes legacy-answer-reveal {
  0% {
    opacity: 0;
    transform: scale(1.55) translateY(0.25rem);
    filter: blur(10px) saturate(1.15);
  }

  40% {
    opacity: 1;
    transform: scale(0.9) translateY(-0.15rem);
    filter: blur(0) saturate(1);
  }

  68% {
    opacity: 1;
    transform: scale(1.05) translateY(0);
    filter: blur(0);
  }

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

@keyframes legacy-explode-out {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  45% {
    opacity: 0.96;
    transform: scale(1.08);
  }

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

@keyframes legacy-explode-shard {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }

  35% {
    opacity: 1;
    transform: translate3d(
      calc(var(--legacy-explode-x, 0px) * 0.42),
      calc(var(--legacy-explode-y, 0px) * 0.42),
      0
    ) scale(1.03) rotate(calc(var(--legacy-explode-rotate, 0deg) * 0.4));
  }

  100% {
    opacity: 0;
    transform: translate3d(
      var(--legacy-explode-x, 0px),
      var(--legacy-explode-y, 0px),
      0
    ) scale(0.68) rotate(var(--legacy-explode-rotate, 0deg));
  }
}

.r.n {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5.4rem;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: #1e2f1f;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
}

.r.n.name {
  grid-column: 1 / -1;
  min-height: 3.9rem;
  width: auto;
  height: auto;
  margin: 0;
  padding: 1rem 1.2rem;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.35;
}

#score-display {
  position: absolute;
  left: 50% !important;
  top: 52% !important;
  transform: translate(-50%, -10%);
  width: min(90%, 24rem);
  min-height: 8rem;
  padding: 1rem 1.3rem;
  border-radius: 22px;
  background: rgba(1, 8, 2, 0.92);
  color: #fff;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.08em;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.55);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  z-index: 8;
}

#score-display.level2 {
  left: 50% !important;
  top: 52% !important;
}

#score-display #feedback {
  display: block;
  margin-bottom: 0.45rem;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  letter-spacing: 0.04em;
}

#leaderboards {
  justify-content: flex-start;
}

#leaderboard-panel {
  width: min(100%, 62rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

#results-summary-card {
  width: min(100%, 40rem);
  margin: 0 auto;
  padding: clamp(1.35rem, 3vw, 2rem);
}

#leaderboard-panel h3 {
  font-size: clamp(1.6rem, 2.4vw, 2.25rem);
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.18);
}

#totalscore {
  position: relative;
  width: 100%;
  min-height: 0;
  height: auto;
  background: transparent;
  color: #d7ff93;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(215, 255, 147, 0.28);
  box-shadow: none;
  left: auto;
  top: auto;
  padding: 0;
}

#result-summary {
  max-width: 32rem;
  margin: 0;
  color: var(--app-text-muted);
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  line-height: 1.6;
}

#play-again {
  position: static;
  margin-top: 0.4rem;
  align-self: center;
  width: min(100%, 28rem);
}

.scores-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  color: #eef6ef;
}

.scores-table th,
.scores-table td {
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  text-align: left;
  vertical-align: top;
}

.scores-table th {
  color: #d7ff93;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scores-table td.score-cell {
  font-weight: 800;
  color: #fff2a3;
}

.scores-table tr.me td {
  color: #d9ffb6;
}

.scores-table tr.this-match td {
  background: rgba(184, 247, 107, 0.12);
}

#loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
  transition: opacity 140ms ease;
  z-index: 80;
}

#loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 20, 16, 0.12), rgba(13, 20, 16, 0.3), rgba(13, 20, 16, 0.12));
}

#loader::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: clamp(5rem, 18vw, 12rem);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(184, 247, 107, 0), rgba(184, 247, 107, 0.95) 35%, rgba(233, 255, 177, 1) 55%, rgba(184, 247, 107, 0.92) 72%, rgba(184, 247, 107, 0));
  box-shadow: 0 0 12px rgba(184, 247, 107, 0.45);
  transform: translateX(-140%);
}

#loader.is-active {
  opacity: 1;
}

#loader.is-active::after {
  animation: loader-sweep 980ms cubic-bezier(0.35, 0, 0.2, 1) infinite;
}

@keyframes loader-sweep {
  0% {
    transform: translateX(-140%);
  }

  100% {
    transform: translateX(calc(100vw + 12rem));
  }
}

.app-toast {
  position: fixed;
  right: clamp(0.9rem, 2vw, 1.5rem);
  bottom: clamp(0.9rem, 2vw, 1.5rem);
  max-width: min(92vw, 26rem);
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(6, 17, 9, 0.94);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.45;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 85;
}

.app-toast[hidden],
.app-dialog-backdrop[hidden] {
  display: none !important;
}

.app-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.app-toast.warning {
  border-color: rgba(255, 214, 135, 0.4);
  color: #fff3cb;
}

.app-toast.error {
  border-color: rgba(255, 182, 168, 0.45);
  color: #ffd9d0;
}

.app-dialog-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(2, 8, 4, 0.62);
  backdrop-filter: blur(10px);
  z-index: 90;
}

.app-dialog {
  width: min(100%, 30rem);
  padding: clamp(1.35rem, 3vw, 1.9rem);
}

.app-dialog h3 {
  margin-bottom: 0.5rem;
  color: #fff;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
}

.app-dialog .support-copy {
  margin-top: 0;
}

.app-dialog-field {
  margin-top: 1rem;
}

.app-dialog-field label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--app-text);
  font-size: 0.92rem;
  font-weight: 700;
}

.app-dialog-field input {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #12321a;
  font-family: inherit;
  font-size: 1rem;
}

.app-dialog-field input:focus {
  outline: 2px solid rgba(184, 247, 107, 0.45);
  outline-offset: 1px;
}

.app-dialog-actions {
  justify-content: flex-end;
}

.adel { background-position: 0 -6px !important; }
.bris { background-position: -39px -6px !important; }
.carl { background-position: -78px -6px !important; }
.coll { background-position: -109px -6px !important; }
.ess { background-position: -147px -6px !important; }
.fre { background-position: -188px -6px !important; }
.gee { background-position: -228px -3px !important; }
.gc { background-position: -627px -3px !important; }
.haw { background-position: -268px -3px !important; }
.melb { background-position: -347px -3px !important; }
.kang { background-position: -305px -3px !important; }
.port { background-position: -390px -3px !important; }
.rich { background-position: -428px -3px !important; }
.stk { background-position: -468px -3px !important; }
.syd { background-position: -504px -2px !important; }
.wce { background-position: -544px -3px !important; }
.wb { background-position: -589px -3px !important; }

@media (max-width: 1080px) {
  .edgetoedge.games {
    min-height: 0;
  }

  #question {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .choices-grid {
    grid-template-columns: repeat(4, minmax(6rem, 1fr));
  }
}

@media (max-width: 860px) {
  #content {
    min-height: calc(100vh - 1.8rem);
    border-radius: 22px;
  }

  .section .sub {
    padding: 0.9rem;
  }

  .toolbar {
    min-height: 74px;
  }

  #question {
    grid-template-columns: 1fr;
  }

  #operator {
    margin-top: 0;
  }

  #choices {
    grid-template-columns: 1fr;
  }

  #equals {
    margin: 0 auto;
  }

  .choices-grid {
    grid-template-columns: repeat(2, minmax(7rem, 1fr));
  }

  .year-selector {
    gap: 0.5rem;
  }

  .year-option {
    flex: 1 1 calc(50% - 0.5rem);
    text-align: center;
  }

  #answer {
    grid-column: 1 / -1;
  }

  #resp-numbers {
    max-width: none;
  }

  .competition-name {
    position: static;
    margin-top: 0.35rem;
    text-align: center;
  }
}

@media (max-width: 640px) {
  #realBody {
    padding: 0.65rem;
  }

  #main-screen {
    justify-content: flex-start !important;
  }

  .section .sub {
    gap: 0.85rem;
    padding: 0.75rem;
  }

  #teams-screen {
    padding-right: 0.21rem;
    padding-left: 0.21rem;
  }

  #teams-container {
    width: min(calc(100% - 0.02rem), 100%);
  }

  #play-game {
    margin-top: 1rem !important;
    margin-right: auto;
    margin-bottom: 0 !important;
    margin-left: auto;
  }

  .toolbar {
    min-height: 68px;
    padding: 0.8rem 0.9rem;
  }

  .toolbar > h1 {
    width: min(100%, calc(100% - 7rem));
    font-size: 1.25rem;
  }

  .button {
    min-width: 64px;
    height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.75rem;
  }

  #question-no {
    font-size: 0.72rem;
    top: 0.35rem;
  }

  #score {
    right: 0.8rem;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
  }

  .card-actions,
  .main-action-stack {
    flex-direction: column;
  }

  .card-button {
    width: 100%;
  }

  .competition-item {
    align-items: flex-start;
  }

  .competition-row-actions {
    width: 100%;
    justify-content: flex-start;
    margin-top: 0.35rem;
    padding-left: 1.85rem;
  }

  .competition-edit {
    align-self: center;
  }

  .scores-table th:nth-child(3),
  .scores-table td:nth-child(3) {
    display: none;
  }

  .home-scores-table th:nth-child(3),
  .home-scores-table td:nth-child(3) {
    display: table-cell;
  }

  #teams {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
  }

  #teams li {
    min-height: 86px;
    padding: 0.7rem 0.35rem;
  }

  .team-badge {
    width: min(100%, 3.9rem);
    height: 2.9rem;
  }

  .team-badge-text {
    transform: none;
  }

  #v1,
  #v2 {
    width: min(100%, 15rem);
  }

  #v1.numbers {
    width: min(100%, 18rem) !important;
  }

  .player-name {
    font-size: 0.92rem;
  }

  .numbers .player-name {
    font-size: 1.05rem;
  }

  .player-number {
    width: 48px;
    height: 48px;
    font-size: 1.55rem;
  }

  .numbers .player-number {
    width: 62px;
    height: 62px;
    font-size: 2rem;
  }

  .choices-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  #resp-numbers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .r.n {
    min-height: 4.5rem;
    font-size: 2.2rem;
  }

  .r.n.name {
    font-size: 1rem;
  }

  #score-display {
    width: min(92%, 18rem);
    font-size: 1.9rem;
  }
}

@font-face {
  font-family: "Bebas Neue";
  src: local("Bebas Neue"), local("BebasNeue-Regular");
  font-display: swap;
}

@font-face {
  font-family: "Barlow Semi Condensed";
  src: local("Barlow Semi Condensed"), local("BarlowSemiCondensed-Regular");
  font-display: swap;
}

:root {
  --font-display: "Bebas Neue", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --font-body: "Barlow Semi Condensed", "Arial Narrow", "Trebuchet MS", sans-serif;
  --app-max-width: 1240px;
  --app-surface: linear-gradient(180deg, rgba(11, 23, 18, 0.82), rgba(6, 14, 10, 0.78));
  --app-surface-strong: linear-gradient(180deg, rgba(10, 20, 15, 0.9), rgba(4, 10, 8, 0.86));
  --app-surface-soft: rgba(215, 235, 211, 0.06);
  --app-border: rgba(206, 235, 200, 0.14);
  --app-text: #f4f2e8;
  --app-text-muted: rgba(226, 231, 221, 0.72);
  --app-accent: #b7ea61;
  --app-accent-strong: #6fb537;
  --app-focus: rgba(183, 234, 97, 0.46);
  --app-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --panel-gap: clamp(0.85rem, 1.8vw, 1.2rem);
}

body {
  font-family: var(--font-body);
  background: #07100c;
  letter-spacing: 0.01em;
}

#bgimg {
  filter: none;
  transform: none;
}

body::before {
  background: transparent;
}

#realBody {
  padding: clamp(0.75rem, 1.5vw, 1.1rem);
}

#content {
  border: 1px solid rgba(214, 232, 204, 0.12);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(5, 11, 8, 0.28), rgba(4, 9, 7, 0.18));
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.48);
}

#content.immersive-screen-shell {
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.section .sub {
  padding: clamp(0.85rem, 1.7vw, 1.2rem);
}

.section .sub.screen-enter-right.screen-enter-active,
.section .sub.screen-enter-left.screen-enter-active,
.section .sub.screen-leave-left.screen-leave-active,
.section .sub.screen-leave-right.screen-leave-active {
  transition-duration: 240ms;
}

.screen-card,
.list-container {
  border: 1px solid rgba(214, 232, 204, 0.12);
  border-radius: 22px;
  background: var(--app-surface);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(203, 221, 191, 0.78);
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  flex: 0 0 auto;
  min-height: 72px;
  padding: 0.25rem 0 1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.toolbar::after {
  display: none;
}

.toolbar > h1 {
  width: min(100%, calc(100% - 10rem));
  color: var(--app-text);
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.38);
}

.button {
  min-width: 68px;
  height: 2.15rem;
  padding: 0 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(214, 232, 204, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--app-text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  text-shadow: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toolbar .back {
  position: absolute;
  left: 0;
  top: 0;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 3.1rem;
  min-width: 0;
  height: 3.1rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(245, 247, 241, 0.92);
  font-size: 0;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  text-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.toolbar .back::before {
  content: "\2039";
  font-size: 2.25rem;
  line-height: 1;
}

@media (hover: none) and (pointer: coarse) {
  .toolbar .back:focus,
  .toolbar .back:focus-visible,
  .toolbar .back:active {
    outline: none;
    box-shadow: none;
  }
}

.grayButton {
  min-width: 180px;
  min-height: 50px;
  padding: 0.8rem 1.4rem;
  border-radius: 14px;
  border: 1px solid rgba(183, 234, 97, 0.16);
  background: linear-gradient(180deg, rgba(186, 233, 91, 0.98), rgba(109, 177, 52, 0.96));
  color: #0c170f;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.grayButton:hover,
.grayButton:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.26);
}

.grayButton.secondary {
  border-color: rgba(214, 232, 204, 0.14);
  background: linear-gradient(180deg, rgba(25, 41, 31, 0.92), rgba(12, 23, 18, 0.96));
  color: var(--app-text);
}

.grayButton.destructive {
  border-color: rgba(255, 182, 168, 0.22);
  background: linear-gradient(180deg, rgba(180, 65, 52, 0.96), rgba(116, 30, 22, 0.98));
  color: #fff4f2;
}

.grayButton.disabled {
  opacity: 0.46;
}

.grayButton:focus-visible,
.button:focus-visible,
.competition-share:focus-visible,
.competition-edit:focus-visible,
.year-option:focus-visible,
.team:focus-visible {
  outline: 2px solid var(--app-focus);
  outline-offset: 2px;
}

#main-screen {
  position: relative;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(0.16rem, 0.55vw, 0.34rem);
}

#main-screen .main-profile-button {
  position: absolute;
  top: clamp(0.7rem, 1.9vw, 1.2rem);
  right: clamp(0.7rem, 1.9vw, 1.2rem);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.75rem, 1.6vw, 1rem);
  min-width: clamp(9.4rem, 19vw, 13rem);
  min-height: clamp(3.2rem, 5.4vw, 4.1rem);
  padding: clamp(0.22rem, 0.65vw, 0.3rem) clamp(0.22rem, 0.65vw, 0.3rem) clamp(0.22rem, 0.65vw, 0.3rem) clamp(1.1rem, 2vw, 1.45rem);
  border-radius: 999px;
  border: 1px solid rgba(231, 239, 226, 0.2);
  background: linear-gradient(180deg, rgba(28, 40, 37, 0.88), rgba(13, 20, 17, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 28px rgba(0, 0, 0, 0.24);
  text-decoration: none;
}

#main-screen .main-profile-name {
  flex: 1 1 auto;
  min-width: 0;
  color: #f4f8ee;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.34);
}

#main-screen .main-profile-button:hover,
#main-screen .main-profile-button:focus-visible {
  background: linear-gradient(180deg, rgba(35, 48, 44, 0.92), rgba(17, 25, 21, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 32px rgba(0, 0, 0, 0.28);
  outline: 2px solid var(--app-focus);
  outline-offset: 2px;
}

#main-screen .main-profile-avatar-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: clamp(2.75rem, 4.8vw, 3.55rem);
  height: clamp(2.75rem, 4.8vw, 3.55rem);
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

#main-profile-avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#main-profile-avatar-image[hidden] {
  display: none !important;
}

#main-screen .main-profile-avatar-fallback {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 249, 234, 0.96);
}

#main-screen .main-profile-avatar-fallback[hidden] {
  display: none !important;
}

#main-screen .main-profile-avatar-fallback svg {
  width: 60%;
  height: 60%;
  fill: currentColor;
}

#main-screen .main-screen-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 34rem);
  margin: clamp(11vh, 16vh, 18vh) auto 0;
  padding-top: 0;
  padding-bottom: clamp(4.5rem, 25vh, 15rem);
  gap: clamp(0.8rem, 2vw, 1.2rem);
}

#main-screen .main-screen-logo {
  width: min(100%, 24rem);
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.42));
}

#main-screen .main-screen-play-button {
  width: min(100%, 25rem);
  min-height: 4.9rem;
  padding: 1rem 2.4rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 255, 205, 0.96);
  background: linear-gradient(180deg, #e7ff76 0%, #d8fd49 40%, #bdf028 100%);
  color: #131a10;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.45rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.6),
    inset 0 -2px 0 rgba(128, 179, 25, 0.42),
    0 0 0 1px rgba(196, 245, 82, 0.34),
    0 0 10px rgba(213, 255, 112, 0.45),
    0 0 20px rgba(182, 235, 74, 0.3),
    0 14px 26px rgba(0, 0, 0, 0.2);
  filter: drop-shadow(0 0 8px rgba(214, 255, 100, 0.28));
}

#main-screen .main-screen-play-button:hover,
#main-screen .main-screen-play-button:focus-visible {
  background: linear-gradient(180deg, #efff92 0%, #ddff58 42%, #c4f22e 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.62),
    inset 0 -2px 0 rgba(128, 179, 25, 0.38),
    0 0 0 1px rgba(214, 250, 106, 0.4),
    0 0 12px rgba(220, 255, 132, 0.52),
    0 0 24px rgba(188, 239, 86, 0.34),
    0 16px 28px rgba(0, 0, 0, 0.22);
}

#main-screen #play-game {
  position: static;
  margin: 0;
}

#home-leaderboard-card {
  width: min(100%, 31rem);
  padding: clamp(0.82rem, 1.7vw, 1.15rem);
  margin-top: 0;
  border: 1px solid rgba(237, 243, 233, 0.22);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(10, 20, 15, 0.84), rgba(8, 16, 12, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 36px rgba(0, 0, 0, 0.26);
}

#home-leaderboard-card h3,
#competition-main h3,
.form-card h3,
#selected-game-card h3,
.selection-intro h3,
#leaderboard-panel h3 {
  color: var(--app-text);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#home-leaderboard-card h3 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.28rem, 2.1vw, 1.78rem);
  line-height: 1;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  letter-spacing: 0.02em;
}

#home-leaderboard-card p,
#competition-current-copy,
.support-copy,
.empty-state,
#result-summary,
#result-context-note {
  color: var(--app-text-muted);
  font-size: 1rem;
  line-height: 1.45;
}

.main-action-stack {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 0.85rem;
  width: min(100%, 52rem);
  margin: 0 auto auto;
}

#main-screen .main-action-stack {
  grid-template-columns: minmax(0, 31rem);
  width: min(100%, 31rem);
  justify-content: center;
  margin-top: 0.85rem;
  margin-bottom: 0;
}

#play-game {
  min-width: 0;
}

#show-competitions {
  min-width: 0;
}

#main-screen #show-competitions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  min-height: 5rem;
  padding: 1rem 1.5rem;
  border-radius: 22px;
  border: 1px solid rgba(231, 239, 226, 0.22);
  background: linear-gradient(180deg, rgba(31, 42, 39, 0.94), rgba(18, 26, 24, 0.98));
  color: var(--app-text);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 30px rgba(0, 0, 0, 0.22);
}

#main-screen #show-competitions::before {
  content: none;
}

#main-screen #show-competitions .main-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--app-accent);
  filter: drop-shadow(0 0 10px rgba(195, 255, 92, 0.22));
}

#main-screen #show-competitions .main-action-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

#main-screen #show-competitions .main-action-label {
  display: inline-block;
  line-height: 1;
}

#teams-screen {
  justify-content: flex-start;
  gap: 0.65rem;
}

#teams-screen .team {
  appearance: none;
  -webkit-appearance: none;
}

#teams-screen .toolbar {
  min-height: 0;
  padding: 0.15rem 0 0.95rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: block;
  text-align: center;
}

#teams-screen .toolbar::after {
  display: none;
}

#teams-screen .toolbar > h1 {
  position: static;
  transform: none;
  width: 100%;
  margin: 0.2rem auto 0;
  text-align: center;
  font-size: clamp(2.5rem, 5.6vw, 3.6rem);
  letter-spacing: 0.02em;
  line-height: 0.94;
}

#teams-screen .competition-name {
  display: none;
}

#game .toolbar {
  padding: 0.15rem 0 1.1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: block;
  text-align: center;
}

#game .toolbar::after {
  display: none;
}

#game .toolbar > h1 {
  position: static;
  transform: none;
  width: 100%;
  margin: 0.2rem auto 0;
  text-align: center;
  font-size: clamp(2.2rem, 4.8vw, 3.1rem);
  letter-spacing: 0.02em;
  line-height: 0.94;
}

#selected-game-card {
  width: min(100%, 32rem);
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  min-height: 0;
  display: none;
}

#selected-game-card .eyebrow {
  display: none;
}

#selected-game-card h3,
.selection-intro h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.2rem, 4.8vw, 3.1rem);
  line-height: 0.94;
  letter-spacing: 0.02em;
}

#selected-game-copy {
  position: absolute;
  right: 0;
  top: 0.2rem;
  margin: 0;
  color: rgba(222, 227, 219, 0.7);
  font-size: 0.95rem;
  line-height: 1.2;
  text-align: right;
}

#teams-container {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  margin-top: 3rem;
  width: min(calc(100% - 0.09rem), 35rem);
  margin: 0 auto;
}

#teams {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.68rem;
  padding: 0;
}

#teams li {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#teams li:hover {
  transform: none;
  box-shadow: none;
}

#teams li > .team {
  display: flex;
  width: 100%;
  min-height: 124px;
  padding: 0.78rem 0.34rem 0.72rem;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  gap: 0.56rem;
  border: 1px solid rgba(207, 215, 221, 0.22);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(29, 34, 41, 0.58), rgba(22, 26, 32, 0.54));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 16px rgba(0, 0, 0, 0.16);
  color: #f5f6f1;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

#teams li > .team:hover,
#teams li > .team:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(228, 235, 232, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 20px rgba(0, 0, 0, 0.18);
}

#teams li > .team.selected {
  border-color: rgba(193, 255, 72, 0.96);
  background: linear-gradient(180deg, rgba(30, 34, 39, 0.68), rgba(22, 26, 31, 0.62));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(194, 249, 88, 0.28),
    0 0 14px rgba(191, 255, 72, 0.68),
    0 0 26px rgba(191, 255, 72, 0.3);
}

#teams li > .team.selected .team-label {
  color: #ffffff;
}

.team-badge {
  width: min(100%, 6.75rem);
  height: 5.3rem;
}

.team-badge-text {
  transform: none;
  width: auto;
  min-width: 3.15rem;
  height: auto;
  padding: 0.34rem 0.58rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(26, 58, 36, 0.96), rgba(11, 29, 17, 0.98));
  color: #f4ffda;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-indent: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.team-label {
  display: block;
  text-align: center;
  color: rgba(248, 249, 245, 0.96);
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

#main-screen #show-competitions:hover,
#main-screen #show-competitions:focus-visible {
  background: linear-gradient(180deg, rgba(36, 48, 45, 0.96), rgba(20, 29, 26, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 34px rgba(0, 0, 0, 0.24);
}

.scores-table {
  margin-top: 0.85rem;
  border-collapse: separate;
  border-spacing: 0 0.55rem;
}

.scores-table thead th {
  padding: 0 0.85rem 0.35rem;
  border-bottom: 0;
  color: rgba(203, 221, 191, 0.82);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scores-table tbody td {
  padding: 0.85rem 0.95rem;
  border-top: 1px solid rgba(214, 232, 204, 0.08);
  border-bottom: 1px solid rgba(214, 232, 204, 0.08);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.96rem;
  vertical-align: middle;
}

.scores-table tbody td:first-child {
  padding-left: 1.2rem;
  border-left: 1px solid rgba(214, 232, 204, 0.08);
  border-radius: 14px 0 0 14px;
}

.scores-table tbody td:last-child {
  padding-right: 1.2rem;
  border-right: 1px solid rgba(214, 232, 204, 0.08);
  border-radius: 0 14px 14px 0;
}

.home-rank-cell,
#scores td:first-child,
.profile-scores-table td:first-child {
  color: var(--app-accent);
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
  text-align: center;
}

.leaderboard-player-name {
  display: inline-block;
  color: var(--app-text);
  font-size: 1.1rem;
  font-weight: 700;
}

.competition-meta {
  margin-top: 0.16rem;
  color: rgba(214, 224, 213, 0.68);
  font-size: 0.88rem;
  line-height: 1.25;
}

.scores-table td.score-cell {
  color: #f1f5c2;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.scores-table tr.me td {
  border-color: rgba(183, 234, 97, 0.16);
  background: rgba(183, 234, 97, 0.045);
}

.scores-table tr.this-match td {
  border-color: rgba(183, 234, 97, 0.22);
  background: rgba(183, 234, 97, 0.09);
}

.home-player-cell {
  gap: 0.55rem;
}

#competition-main,
.form-card {
  width: min(100%, 50rem);
  padding: clamp(1.15rem, 2.4vw, 1.8rem);
}

#competition-current-name,
.status-pill {
  min-height: 2rem;
  padding: 0.36rem 0.72rem;
  border: 1px solid rgba(214, 232, 204, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--app-text);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.competition-list {
  gap: 0.65rem;
}

.competition-item {
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border-color: rgba(214, 232, 204, 0.1);
  background: linear-gradient(180deg, rgba(18, 31, 24, 0.92), rgba(11, 21, 17, 0.96));
}

.competition-item:hover {
  border-color: rgba(214, 232, 204, 0.18);
  background: linear-gradient(180deg, rgba(22, 36, 28, 0.95), rgba(13, 24, 19, 0.98));
  transform: translateY(-1px);
}

.competition-badge {
  width: 1.1rem;
  height: 1.1rem;
  border-color: rgba(214, 232, 204, 0.34);
}

.competition-title {
  font-size: 1.08rem;
  font-weight: 700;
}

.competition-share,
.competition-edit {
  padding: 0.52rem 0.82rem;
  border-radius: 12px;
  border-color: rgba(214, 232, 204, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(234, 239, 230, 0.84);
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.competition-share {
  color: var(--app-accent);
}

.form-card label,
.profile-rename-form label,
.app-dialog-field label {
  color: rgba(230, 234, 228, 0.88);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.form-card input,
.profile-rename-form input,
.app-dialog-field input {
  border: 1px solid rgba(214, 232, 204, 0.12);
  border-radius: 14px;
  background: rgba(246, 248, 242, 0.98);
  color: #102318;
  font-family: var(--font-body);
}

.list-container {
  padding: clamp(0.9rem, 2vw, 1.2rem);
}

#selected-game-card {
  width: min(100%, 40rem);
  padding: 1rem 1.15rem;
}

#selected-game-card .eyebrow {
  margin-bottom: 0.35rem;
}

#selected-game-card h3,
.selection-intro h3 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 0.96;
}

#selected-game-copy,
.selection-intro p {
  color: var(--app-text-muted);
}

#teams {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

#teams li {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: none;
}

#teams li:hover {
  transform: none;
  box-shadow: none;
}

.team-badge {
  width: min(100%, 5.7rem);
  height: 4.5rem;
}

.team-badge-text {
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 49, 27, 0.96), rgba(8, 24, 14, 0.98));
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.team-label {
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-weight: 700;
}

.year-selector {
  gap: 0.5rem;
  margin-bottom: 1.15rem;
}

.game-section-heading {
  margin: 0.95rem 0 0.7rem;
  color: rgba(226, 231, 221, 0.82);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#year-selector + .game-section-heading {
  margin-top: 0;
}

.year-option {
  border-color: rgba(214, 232, 204, 0.12);
  border-radius: 12px;
  padding: 0.62rem 0.95rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--app-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.year-option.selected {
  border-color: rgba(193, 255, 72, 0.96);
  background: rgba(255, 255, 255, 0.06);
  color: #f0f7dd;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(194, 249, 88, 0.28),
    0 0 14px rgba(191, 255, 72, 0.68),
    0 0 26px rgba(191, 255, 72, 0.3);
}

.edgetoedge {
  border-radius: 20px;
  border: 1px solid rgba(214, 232, 204, 0.08);
  background: linear-gradient(180deg, rgba(248, 249, 245, 0.96), rgba(226, 231, 221, 0.95));
}

.edgetoedge.games {
  display: grid;
  gap: 0.72rem;
  border: 0;
  background: transparent;
  overflow: visible;
}

.edgetoedge > li {
  padding: 1rem 1rem;
  border-bottom-color: rgba(8, 23, 13, 0.08);
}

.edgetoedge a,
.inset a {
  border-radius: 12px;
  background: rgba(11, 29, 16, 0.06);
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}

.edgetoedge.games > li {
  padding: 0.78rem 0.88rem 0.84rem;
  border: 1px solid rgba(207, 215, 221, 0.22);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(29, 34, 41, 0.58), rgba(22, 26, 32, 0.54));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 16px rgba(0, 0, 0, 0.16);
  color: #f5f6f1;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.edgetoedge.games > li:hover {
  transform: translateY(-1px);
  border-color: rgba(228, 235, 232, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 20px rgba(0, 0, 0, 0.18);
}

.edgetoedge.games > li > a,
.edgetoedge.games .gametype-options > a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.9rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(214, 232, 204, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(25, 37, 30, 0.68), rgba(18, 26, 22, 0.72));
  color: #f5f6f1 !important;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 6px 14px rgba(0, 0, 0, 0.14);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.edgetoedge.games > li > a.selected,
.edgetoedge.games .gametype-options > a.selected,
.games a.selected,
.edgetoedge a[selected=true],
.edgetoedge.games a:active {
  border-color: rgba(193, 255, 72, 0.96);
  background: linear-gradient(180deg, rgba(25, 37, 30, 0.68), rgba(18, 26, 22, 0.72));
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(194, 249, 88, 0.28),
    0 0 14px rgba(191, 255, 72, 0.68),
    0 0 26px rgba(191, 255, 72, 0.3);
}

.edgetoedge.games .game-option {
  padding: 0;
}

.edgetoedge.games .game-option > a {
  min-height: 5rem;
  border: 1px solid rgba(214, 232, 204, 0.12);
  border-radius: 16px;
}

.edgetoedge.games .gametype {
  display: grid;
  gap: 0.72rem;
}

#game .edgetoedge.games .gametype {
  display: none;
}

.edgetoedge.games .gametype-label {
  display: block;
  color: rgba(248, 249, 245, 0.96);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

  .edgetoedge.games .gametype-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }


#play .toolbar {
  min-height: 0;
  padding: 0.15rem 0 0.95rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#play {
  align-items: center;
}

#play > .toolbar {
  width: 100%;
}

#play .toolbar::after {
  display: none;
}

#play .toolbar .back {
  z-index: 2;
}

#heading {
  position: static;
  transform: none;
  width: min(100%, calc(100% - 8rem));
  margin: 0.05rem auto 0;
  color: rgba(244, 242, 232, 0.9);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.9vw, 1.22rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

#question-no {
  top: 2.35rem;
  left: 0;
  right: 0;
  width: min(100%, calc(100% - 8rem));
  margin: 0 auto;
  transform: none;
  color: rgba(203, 221, 191, 0.82);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-shadow: none;
  text-align: center;
}

#play #question-no {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  width: min(100%, calc(100% - 8rem));
  margin: 0.36rem auto 0;
  transform: none;
}

#score {
  top: 0.35rem;
  right: 0;
  transform: none;
  padding: 0.42rem 0.7rem 0.42rem 0.9rem;
  border: 1px solid rgba(183, 234, 97, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #f3f5c5;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-shadow: none;
}

#question {
  gap: clamp(1rem, 2vw, 1.4rem);
  width: min(100%, 54rem);
  margin: 0.35rem auto 0;
  justify-content: center;
}

#operator,
#equals {
  border: 1px solid rgba(214, 232, 204, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(13, 24, 18, 0.96), rgba(7, 14, 11, 0.98));
  color: var(--app-accent);
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 3vw, 3.2rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

#choices img,
#answer img,
#big-number,
.r.n {
  border: 1px solid rgba(214, 232, 204, 0.08);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

#question img,
#choices img,
#answer img {
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

#question img,
#choices img,
#answer img,
#big-number {
  border-radius: 20px;
}

#v1,
#v2 {
  width: min(100%, 19rem);
}

#question.names-mode {
  width: min(100%, 28rem);
}

#question.numbers-mode {
  grid-template-columns: 1fr;
  width: min(100%, 28rem);
}

#question.names-mode #v1 {
  width: min(100%, 26rem);
}

#question.numbers-mode #v1 {
  width: min(100%, 26rem);
}

#v1.numbers {
  width: min(100%, 25rem) !important;
}

.player-name,
.resp-player-name,
.ans-player-name {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  color: var(--app-text);
  font-family: var(--font-body);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: none;
}

.player-name {
  font-size: 1.08rem;
}

.numbers .player-name {
  font-size: 1.18rem;
}

.resp-player-name,
.ans-player-name {
  min-height: 0;
}

.player-number,
.resp-player-number,
.ans-player-number {
  border: 1px solid rgba(183, 234, 97, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(113, 173, 52, 0.9), rgba(51, 103, 25, 0.92));
  color: #f4f8e7;
  font-family: var(--font-display);
  font-weight: 400;
  text-shadow: none;
}

#r1,
#r2,
#r3,
#r4,
#answer {
  padding: 0.4rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17, 29, 23, 0.6), rgba(9, 16, 12, 0.64));
  border-color: rgba(214, 232, 204, 0.1);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

#choices {
  width: min(100%, 64rem);
  margin: 0.35rem auto 0;
}

#r1:hover,
#r2:hover,
#r3:hover,
#r4:hover,
#rn1:hover,
#rn2:hover,
#rn3:hover,
#rn4:hover {
  transform: translateY(-2px);
  border-color: rgba(228, 235, 232, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 32px rgba(0, 0, 0, 0.22);
}

#r1.response-selected,
#r2.response-selected,
#r3.response-selected,
#r4.response-selected,
.r.n.response-selected {
  border-color: rgba(193, 255, 72, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(194, 249, 88, 0.28),
    0 0 14px rgba(191, 255, 72, 0.68),
    0 0 26px rgba(191, 255, 72, 0.3);
}

.r.n {
  border-radius: 20px;
  border: 1px solid rgba(207, 215, 221, 0.22);
  background: linear-gradient(180deg, rgba(29, 34, 41, 0.58), rgba(22, 26, 32, 0.54));
  color: #f5f6f1;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 16px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(4px);
  text-shadow: none;
}

.r.n.name {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f5f6f1;
}

#resp-numbers {
  width: min(100%, 30rem);
  margin: 0.35rem auto 0;
}

#score-display {
  border: 1px solid rgba(214, 232, 204, 0.14);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(7, 15, 11, 0.8), rgba(3, 8, 6, 0.78));
  color: var(--app-text);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 400;
  text-shadow: none;
}

#score-display #feedback {
  color: rgba(214, 224, 213, 0.8);
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 1.4vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#results-summary-card {
  width: min(100%, 44rem);
  padding: clamp(1.2rem, 2.5vw, 1.9rem);
}

#results-summary-card h3 {
  color: var(--app-text);
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#totalscore {
  color: var(--app-accent);
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 0.95;
}

#leaderboard-panel {
  width: min(100%, 68rem);
  padding: clamp(1.2rem, 2.6vw, 1.95rem);
  gap: 0.7rem;
}

#leaderboard-panel h3 {
  font-size: clamp(2rem, 3vw, 2.9rem);
  line-height: 0.95;
  text-shadow: none;
}

#play-again {
  width: min(100%, 22rem);
}

.app-toast {
  right: 1rem;
  bottom: 1rem;
  max-width: min(88vw, 22rem);
  padding: 0.72rem 0.9rem;
  border-color: rgba(214, 232, 204, 0.14);
  border-radius: 14px;
  background: rgba(9, 17, 13, 0.96);
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.35;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.app-dialog-backdrop {
  background: rgba(1, 7, 5, 0.72);
}

.app-dialog {
  width: min(100%, 28rem);
  border-radius: 22px;
  background: var(--app-surface-strong);
}

.app-dialog h3 {
  color: var(--app-text);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  #main-screen .main-screen-hero {
    width: min(100%, 30rem);
  }

  #main-screen .main-screen-logo {
    width: min(100%, 21rem);
  }

  #main-screen .main-screen-play-button {
    width: min(100%, 21rem);
  }

  #home-leaderboard-card,
  #main-screen .main-action-stack {
    width: min(100%, 29rem);
  }

  .toolbar {
    min-height: 68px;
    padding: 0.72rem 0.9rem;
  }

  .toolbar > h1 {
    width: min(100%, calc(100% - 8.5rem));
    font-size: clamp(1.7rem, 5vw, 2.35rem);
  }

  .main-action-stack {
    grid-template-columns: 1fr;
  }

  #teams-container,
  #selected-game-card {
    width: min(100%, 31rem);
  }

  #score {
    font-size: 1.55rem;
  }

  #question {
    width: min(100%, 46rem);
  }

  #results-summary-card,
  #leaderboard-panel,
  #competition-main,
  .form-card,
  #home-leaderboard-card {
    width: 100%;
  }
}

@media (max-width: 640px) {
  #content {
    border-radius: 20px;
  }

  #teams-screen .toolbar > h1 {
    margin-top: 0.15rem;
    font-size: 2.35rem;
  }

  #teams-screen .teams-step-indicator,
  #selected-game-copy {
    top: 0.12rem;
    font-size: 0.82rem;
  }

  #selected-game-card,
  #teams-container {
    width: 100%;
  }

  #game .toolbar > h1 {
    margin-top: 0.15rem;
    font-size: 2.35rem;
  }

  .game-section-heading {
    margin-top: 0.85rem;
    font-size: 0.76rem;
  }

  .edgetoedge.games {
    gap: 0.64rem;
  }

  .edgetoedge.games > li {
    padding: 0.72rem 0.78rem 0.8rem;
  }

  .edgetoedge.games > li > a,
  .edgetoedge.games .gametype-options > a {
    min-height: 3.55rem;
    padding: 0.75rem 0.85rem;
    font-size: 0.96rem;
  }

  .edgetoedge.games .gametype-label {
    font-size: 0.96rem;
  }

  #teams-container {
    margin-top: 3rem;
  }

  #main-screen .main-screen-hero {
    width: min(100%, 22rem);
    padding-top: 0.15rem;
    gap: 0.72rem;
  }

  #main-screen .main-profile-button {
    top: 0.5rem;
    right: 0.5rem;
    min-width: 8.8rem;
    min-height: 3rem;
    gap: 0.66rem;
    padding: 0.18rem 0.18rem 0.18rem 0.96rem;
  }

  #main-screen .main-profile-name {
    font-size: 0.96rem;
  }

  #main-screen .main-profile-avatar-frame {
    width: 2.64rem;
    height: 2.64rem;
  }

  #main-screen .main-screen-logo {
    width: min(100%, 15rem);
  }

  #main-screen .main-screen-play-button {
    width: min(100%, 17.75rem);
    min-height: 4rem;
    padding: 0.85rem 1.8rem;
    font-size: 1.85rem;
  }

  #home-leaderboard-card,
  #main-screen .main-action-stack {
    width: 100%;
  }

  #main-screen #show-competitions {
    min-height: 4.35rem;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    font-size: 1.95rem;
  }

  #main-screen #show-competitions .main-action-icon {
    width: 1.65rem;
    height: 1.65rem;
  }

  .section .sub {
    padding: 0.72rem;
  }

  .toolbar {
    min-height: 84px;
    border-radius: 18px;
    padding-bottom: 1.55rem;
  }

  .toolbar > h1 {
    top: 41%;
    width: min(100%, calc(100% - 7.8rem));
    font-size: 1.55rem;
  }

  .toolbar-with-competition > h1 {
    width: min(100%, calc(100% - 7.8rem));
    margin-top: 0.15rem;
  }

  .competition-name {
    width: min(100%, calc(100% - 7.8rem));
    margin: 0.18rem auto 0;
    color: rgba(214, 224, 213, 0.74);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-align: center;
  }

  .button {
    min-width: 58px;
    height: 1.95rem;
    border-radius: 10px;
    font-size: 0.7rem;
  }

  .grayButton {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    font-size: 0.92rem;
  }

  #home-leaderboard-card,
  #competition-main,
  #selected-game-card,
  #results-summary-card,
  #leaderboard-panel,
  .form-card {
    padding: 1rem;
  }

  .profile-screen-shell {
    gap: 0.85rem;
  }

  .profile-hero-card,
  .profile-avatar-card,
  .profile-scores-card {
    padding: 1rem;
  }

  .profile-hero-card {
    margin-top: 3.6rem;
    padding-top: 4.5rem;
  }

  .profile-avatar-frame {
    width: 8rem;
    height: 8rem;
  }

  .profile-hero-card h3 {
    font-size: 2rem;
  }

  .profile-name-row {
    margin-top: 0.3rem;
  }

  .profile-edit-trigger {
    width: 1.55rem;
    height: 1.55rem;
    margin-left: 0.34rem;
  }

  .profile-stats-grid {
    gap: 0.7rem;
  }

  .profile-stat-card {
    padding: 0.8rem 0.85rem;
  }

  .profile-avatar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .profile-account-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-avatar-option {
    padding: 0.5rem 0.35rem 0.6rem;
    border-radius: 18px;
  }

  .profile-avatar-option-label {
    font-size: 0.72rem;
  }

  .profile-score-context {
    font-size: 0.78rem;
  }

  .profile-editor-sheet {
    width: 100%;
    max-height: min(84vh, 44rem);
    padding: 1rem 0.95rem 0.95rem;
    border-radius: 22px;
  }

  #home-leaderboard-card h3,
  #leaderboard-panel h3,
  #results-summary-card h3,
  #competition-main h3,
  .form-card h3,
  #selected-game-card h3,
  .selection-intro h3 {
    font-size: 1.85rem;
  }

  .scores-table {
    border-spacing: 0 0.4rem;
  }

  .scores-table thead th {
    padding-right: 0.45rem;
    padding-left: 0.45rem;
    font-size: 0.66rem;
  }

  .scores-table tbody td {
    padding: 0.72rem 0.6rem;
  }

  .scores-table tbody td:first-child {
    padding-left: 0.82rem;
  }

  .scores-table tbody td:last-child {
    padding-right: 0.82rem;
  }

  .home-rank-cell,
  #scores td:first-child {
    font-size: 1.3rem;
  }

  .leaderboard-player-name {
    font-size: 1rem;
  }

  #competition-main {
    padding: 1rem 0.95rem 1.05rem;
  }

  #competition-current-copy {
    font-size: 0.98rem;
    line-height: 1.5;
  }

  #competition-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
  }

  #competition-actions .card-button {
    width: 100%;
    min-height: 3.35rem;
    flex: 0 0 auto;
  }

  .competition-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem 0.8rem;
    padding: 0.9rem;
  }

  .competition-badge {
    margin-top: 0.2rem;
  }

  .competition-title {
    font-size: 1rem;
    line-height: 1.12;
    word-break: break-word;
  }

  .competition-meta {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .competition-row-actions {
    grid-column: 2;
    width: auto;
    margin-top: 0.15rem;
    padding-left: 0;
    justify-content: flex-start;
    gap: 0.45rem;
  }

  .competition-share,
  .competition-edit {
    padding: 0.48rem 0.72rem;
    font-size: 0.68rem;
  }

  .competition-edit {
    align-self: auto;
  }

  #score {
    right: 0.7rem;
    padding: 0.34rem 0.56rem 0.34rem 0.72rem;
    font-size: 1.35rem;
  }

  #question-no {
    top: 0.3rem;
    font-size: 0.68rem;
  }

  #play .toolbar {
    min-height: 0;
    padding: 0.15rem 0 0.9rem;
  }

  #play .toolbar .back {
    top: 0.1rem;
    left: 0;
  }

  #heading {
    width: min(100%, calc(100% - 7.25rem));
    margin-top: 0.05rem;
    font-size: 1rem;
    letter-spacing: 0.04em;
  }

  .edgetoedge.games > li {
    padding: 0.68rem 0.72rem 0.74rem;
    border-radius: 15px;
  }

  .edgetoedge.games > li > a,
  .edgetoedge.games .gametype-options > a {
    min-height: 3.25rem;
    padding: 0.68rem 0.72rem;
    font-size: 0.9rem;
    border-radius: 13px;
  }

  .edgetoedge.games .gametype-label {
    font-size: 0.9rem;
  }

  .edgetoedge.games .gametype-options {
    gap: 0.5rem;
  }

  #play #question-no {
    top: auto;
    left: auto;
    right: auto;
    width: min(100%, calc(100% - 7rem));
    margin: 0.34rem auto 0;
    transform: none;
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-align: center;
  }

  #play #score {
    top: 0.25rem;
    right: 0;
    transform: none;
    padding: 0.34rem 0.56rem 0.34rem 0.72rem;
    font-size: 1.35rem;
  }

  #operator,
  #equals {
    min-width: 3.6rem;
    min-height: 3.6rem;
    font-size: 2.2rem;
  }

  #question,
  #choices,
  #resp-numbers {
    width: 100%;
  }

  #teams {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.58rem;
  }

  #teams li > .team {
    min-height: 110px;
    padding: 0.68rem 0.24rem 0.6rem;
    gap: 0.48rem;
    border-radius: 16px;
  }

  .team-badge {
    width: min(100%, 5.55rem);
    height: 4.35rem;
  }

  .team-label {
    font-size: 0.82rem;
  }

  .r.n {
    min-height: 4.2rem;
    font-size: 2rem;
  }

  #resp-numbers.names-mode {
    width: min(100%, 26rem);
    max-width: none;
  }

  .r.n.name {
    width: 100%;
  }

  #totalscore {
    font-size: 3.5rem;
  }
}

@media (max-width: 460px) {
  .profile-avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.orientation-lockout {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top, rgba(104, 67, 130, 0.45), transparent 42%),
    linear-gradient(180deg, rgba(8, 17, 28, 0.98), rgba(9, 21, 13, 0.98));
  text-align: center;
}

.orientation-lockout[hidden] {
  display: none !important;
}

.orientation-lockout-card {
  width: min(100%, 21rem);
  padding: 1.5rem 1.35rem 1.4rem;
  border: 1px solid rgba(176, 232, 88, 0.42);
  border-radius: 28px;
  background: rgba(10, 20, 15, 0.9);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.orientation-lockout-icon {
  margin-bottom: 0.8rem;
  font-size: 2.4rem;
  line-height: 1;
  color: #b7ef4c;
}

.orientation-lockout h2 {
  margin: 0;
  color: #f7f5eb;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.orientation-lockout p {
  margin: 0.7rem 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1.45;
}

html[data-mobile-orientation="landscape"] #realBody {
  display: none;
}

html[data-mobile-orientation="landscape"] .orientation-lockout {
  display: flex;
}
