:root {
  --bg-0: #eef4ff;
  --bg-1: #dce8ff;
  --bg-2: #f9fbff;
  --surface: rgb(255 255 255 / 82%);
  --surface-strong: #ffffff;
  --text-1: #0e1f3e;
  --text-2: #475c84;
  --line: #c9d8f8;
  --line-strong: #a8bfe8;
  --primary: #034694;
  --primary-strong: #022d68;
  --primary-soft: #e8f1ff;
  --success: #0f6f43;
  --danger: #a42525;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 14px 34px rgb(14 47 112 / 12%);
  --shadow-strong: 0 26px 52px rgb(5 34 91 / 28%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Sora", system-ui, sans-serif;
  color: var(--text-1);
  background:
    radial-gradient(circle at 14% 8%, var(--bg-1), transparent 26%),
    radial-gradient(circle at 88% 12%, #fff2cb, transparent 33%),
    linear-gradient(175deg, var(--bg-2) 0%, var(--bg-0) 72%);
  min-height: 100vh;
}

.app-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2.2rem 1rem 3rem;
  display: grid;
  gap: 0.85rem;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 1.45rem 1.55rem;
  color: #fff;
  background:
    radial-gradient(circle at 88% 18%, rgb(255 255 255 / 20%), transparent 34%),
    linear-gradient(136deg, #012f72 0%, #034694 45%, #0f66d5 100%);
  box-shadow: var(--shadow-strong);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -55% auto;
  width: 330px;
  height: 330px;
  border-radius: 999px;
  background: rgb(255 255 255 / 8%);
  pointer-events: none;
}

.kicker {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.9;
}

.hero h1 {
  margin: 0.3rem 0 0;
  font-size: clamp(1.85rem, 4.2vw, 2.8rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.56rem;
}

.hero-beta-badge {
  margin-top: 0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.52rem;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 50%);
  background: rgb(255 255 255 / 16%);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-main {
  min-width: 0;
}

.hero p {
  margin: 0.65rem 0 0;
  max-width: 680px;
  color: rgb(255 255 255 / 88%);
}

.hero-deadline {
  margin: 0;
  flex: 0 0 auto;
  max-width: 360px;
  padding: 0.38rem 0.72rem;
  border-radius: 12px;
  background: rgb(255 255 255 / 16%);
  border: 1px solid rgb(255 255 255 / 28%);
  color: #fff;
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: right;
}

.hero-meta {
  display: grid;
  justify-items: end;
  gap: 0.42rem;
}

.hero-attendance {
  margin: 0;
  padding: 0 0.18rem;
  color: rgb(255 255 255 / 84%);
  font-size: 0.79rem;
  font-weight: 600;
  text-align: right;
}

.panel {
  background: var(--surface);
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: var(--radius-lg);
  padding: 1.05rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  animation: rise 180ms ease;
}

.panel h2,
.panel h3 {
  margin: 0 0 0.72rem;
  letter-spacing: -0.01em;
}

.panel h2 {
  font-size: 1.16rem;
}

.panel h3 {
  font-size: 1rem;
  color: #1f3766;
}

.overview-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-bottom: 0.72rem;
  padding: 0.34rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 90%);
}

.top-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  padding: 0.34rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 90%);
}

.account-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.account-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 102px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--primary-soft);
  color: #274777;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.account-auth-btn:hover {
  background: #dbe9ff;
}

.account-menu-wrap {
  position: relative;
}

.account-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 12;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 0.52rem;
  display: grid;
  gap: 0.45rem;
}

.account-menu-dropdown .ghost-btn,
.account-menu-dropdown .danger-btn,
.account-menu-dropdown .ghost-link {
  width: 100%;
  justify-content: center;
}

#account-signed-out-actions,
#account-signed-in-actions {
  display: grid;
  gap: 0.4rem;
}

#login-panel {
  margin-top: 0.55rem;
}

.predict-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
}

.inline-rules-link {
  border: 0;
  background: transparent;
  color: #21497f;
  padding: 0.1rem 0.22rem;
  text-decoration: underline;
  border-radius: 6px;
}

.inline-rules-link:hover {
  background: #e8f1ff;
  transform: none;
}

.leaderboards-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.mini-toggle {
  margin: 0;
  padding: 0.2rem;
}

.rules-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgb(8 24 54 / 52%);
  padding: 1rem;
  display: grid;
  place-items: center;
}

.rules-modal-content {
  width: min(760px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.rules-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.upcoming-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.upcoming-list,
.leaderboard,
.fixtures-list,
.prediction-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.upcoming-list {
  margin-top: 0.8rem;
  gap: 0.5rem;
}

.upcoming-list li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.62rem 0.72rem;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 90%), rgb(247 251 255 / 92%));
  color: #314e7e;
  font-size: 0.91rem;
}

.table-wrap {
  margin-top: 0.65rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
}

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

.scorers-table th,
.scorers-table td {
  border-bottom: 1px solid #e4edff;
  padding: 0.58rem 0.62rem;
  text-align: left;
  font-size: 0.88rem;
}

.scorers-table th {
  background: #eff5ff;
  color: #2a4a7c;
}

label {
  display: grid;
  gap: 0.34rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2e4d7f;
}

input,
select,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--text-1);
  padding: 0.65rem 0.72rem;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(3 70 148 / 15%);
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  font-weight: 700;
  transition: transform 120ms ease, background-color 120ms ease, opacity 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.mini-form {
  display: grid;
  gap: 0.6rem;
}

.mini-form button,
.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.mini-form button:hover,
.tab-btn.active:hover {
  background: var(--primary-strong);
}

.tab-btn,
.ghost-btn {
  background: var(--primary-soft);
  color: #274777;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--primary-soft);
  color: #274777;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  white-space: nowrap;
}

.ghost-link:hover {
  background: #dbe9ff;
}

.tab-btn {
  padding: 0.52rem 0.84rem;
  font-size: 0.86rem;
}

.nav-unread-badge {
  margin-left: 0.36rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #d73737;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.tab-btn:not(.active):hover,
.ghost-btn:hover {
  background: #dbe9ff;
}

.danger-btn {
  background: #ffe5e5;
  color: var(--danger);
}

.danger-btn:hover {
  background: #ffd4d4;
}

.two-col,
.auth-grid,
.league-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
}

.league-forms .mini-form {
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 88%);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.56rem;
}

.league-forms .mini-form h3 {
  margin-bottom: 0.1rem;
}

.league-forms .field-slot {
  display: grid;
  align-content: start;
  gap: 0.4rem;
}

.league-forms .field-slot.inactive {
  display: none;
}

.helper,
.status {
  color: var(--text-2);
}

.helper {
  margin: 0 0 0.82rem;
  font-size: 0.9rem;
}

.status {
  margin: 0.74rem 0 0;
  font-size: 0.82rem;
}

.no-margin {
  margin: 0;
}

.session-row {
  margin-top: 0.92rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.auth-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.auth-bar-form {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.auth-login-fields {
  flex: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.55rem;
}

.auth-card {
  max-width: 520px;
  margin: 1rem auto 0;
}

.danger-zone {
  margin-top: 1rem;
  border: 1px solid #f2c4c4;
  border-radius: 12px;
  padding: 0.8rem;
  background: #fff8f8;
  display: grid;
  gap: 0.55rem;
}

.danger-zone h3 {
  margin: 0;
  color: #8a1f1f;
}

.auth-thin {
  padding: 0.64rem 0.86rem;
  display: grid;
  gap: 0.42rem;
}

.auth-inline-status {
  margin: 0;
  font-size: 0.78rem;
}

.session-actions,
.league-meta {
  display: flex;
  gap: 0.45rem;
  align-items: end;
}

.league-meta {
  margin-top: 0.94rem;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.7rem;
}

.league-meta-actions {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
}

#copy-code-btn {
  width: auto;
  margin-top: 0;
  padding: 0.52rem 0.86rem;
}

#league-meta-note {
  font-size: 0.76rem;
  color: #5272a2;
}

.dashboard-grid {
  margin-top: 0.84rem;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0.74rem;
}

.dashboard-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-grid-single .subpanel {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}

.subpanel {
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 86%);
  border-radius: var(--radius-md);
  padding: 0.78rem;
}

.admin-result-meta {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.admin-result-meta > span,
.admin-result-meta > small {
  overflow-wrap: anywhere;
}

.admin-result-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.leaderboard {
  gap: 0.45rem;
}

.leaderboard li {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.52rem 0.58rem;
  background: #fff;
  font-size: 0.9rem;
}

.leader-identity {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.leader-rank {
  color: #3b5a8c;
  font-weight: 800;
  min-width: 1.45rem;
}

.leader-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #c3d7f8;
  background: #edf4ff;
  flex: 0 0 auto;
}

.leader-avatar.fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #274777;
}

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

.leader-identity-clickable {
  cursor: pointer;
}

.leader-breakdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.95rem;
  color: #1d3e73;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.leader-identity-clickable:focus-visible {
  outline: 2px solid #4d7fd6;
  outline-offset: 2px;
  border-radius: 6px;
}

.leader-submitted-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: #0d9a54;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.leader-breakdown {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #d4e4ff;
  border-radius: 10px;
  background: #f7fbff;
  color: #2a4d80;
  font-size: 0.78rem;
  line-height: 1.4;
}

.leader-points {
  background: #edf4ff;
  border: 1px solid #d4e4ff;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.78rem;
  color: #254376;
}

.past-games-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.past-game-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.62rem 0.72rem;
  background: linear-gradient(180deg, rgb(255 255 255 / 92%), rgb(246 250 255 / 90%));
}

.past-game-head {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: #223f70;
}

.past-game-line {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  color: #35507d;
}

.rules-list {
  margin: 0.1rem 0 0.85rem;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.32rem;
}

.rules-list li {
  font-size: 0.9rem;
  color: #2f4e80;
}

.fixtures-title {
  margin-top: 0.7rem;
}

.prediction-primary {
  padding: 1rem;
  position: relative;
  overflow: hidden;
  border: 1px solid #d5e3ff;
  background:
    radial-gradient(circle at 88% 0%, rgb(15 102 213 / 14%), transparent 34%),
    radial-gradient(circle at 3% 100%, rgb(255 212 92 / 18%), transparent 28%),
    linear-gradient(165deg, rgb(255 255 255 / 92%), rgb(243 249 255 / 90%));
}

.prediction-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 25%, rgb(255 255 255 / 36%), transparent 65%);
  transform: translateX(-110%);
  animation: sheen 8s ease-in-out infinite;
}

.prediction-primary .fixtures-title {
  margin-top: 0;
  margin-bottom: 0.78rem;
  font-size: 1.2rem;
  position: relative;
  z-index: 1;
}

.prediction-primary .fixtures-list {
  position: relative;
  z-index: 1;
}

.signedout-preview {
  position: relative;
  z-index: 1;
  margin-bottom: 0.62rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.signedout-preview-card {
  border: 1px solid #c5d9ff;
  border-radius: 12px;
  background: linear-gradient(180deg, rgb(255 255 255 / 94%), rgb(244 249 255 / 92%));
  padding: 0.68rem;
  display: grid;
  gap: 0.38rem;
}

.signedout-preview-card h3 {
  margin: 0;
  font-size: 0.88rem;
  color: #244879;
}

.signedout-why-card {
  display: grid;
  gap: 0.32rem;
}

.signedout-why-list {
  list-style: none;
  margin: 0.18rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.34rem;
}

.signedout-why-list li {
  display: grid;
  gap: 0.08rem;
  padding: 0.38rem 0.46rem;
  border: 1px solid #d5e4ff;
  border-radius: 10px;
  background: rgb(255 255 255 / 86%);
}

.signedout-why-list li strong {
  font-size: 0.8rem;
  color: #234777;
}

.signedout-why-list li span {
  font-size: 0.74rem;
  color: #4f6f9f;
}

.signedout-preview-card .leaderboard {
  gap: 0.3rem;
}

.signedout-preview-card .leaderboard li {
  padding: 0.4rem 0.48rem;
  font-size: 0.8rem;
}

.signedout-preview-card .leaderboard li.placeholder {
  justify-content: center;
  color: #6580ab;
}

.signedout-cta-link {
  width: fit-content;
}

.fixtures-list.hidden {
  display: none;
}

.admin-score-panel {
  margin-top: 0.68rem;
  border: 1px solid #bfd5fa;
  border-radius: 14px;
  padding: 0.7rem;
  background: linear-gradient(180deg, #fafdff, #ecf4ff);
  display: grid;
  gap: 0.48rem;
}

.admin-score-panel h3 {
  margin: 0;
}

.admin-score-meta {
  margin: 0;
  color: var(--text-2);
  font-size: 0.82rem;
}

.admin-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.admin-score-form {
  display: grid;
  gap: 0.5rem;
}

.admin-score-form button {
  width: 100%;
  background: linear-gradient(140deg, #0f7d4a, #0b6439);
  color: #fff;
}

.fixtures-list {
  gap: 0.64rem;
}

.fixture-item {
  border: 1px solid #c8dafb;
  border-radius: 18px;
  padding: 0.84rem;
  background:
    radial-gradient(circle at 95% 4%, rgb(3 70 148 / 9%), transparent 33%),
    linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: 0 14px 26px rgb(3 70 148 / 8%);
}

.fixture-head {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: baseline;
}

.fixture-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.status-badge {
  border-radius: 999px;
  padding: 0.22rem 0.52rem;
  font-size: 0.72rem;
  font-weight: 800;
  background: #edf4ff;
  color: #2a4d82;
  border: 1px solid #cde0ff;
}

.fixture-meta {
  margin: 0.33rem 0 0;
  color: var(--text-2);
  font-size: 0.86rem;
}

.fixture-body {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.66rem;
}

.prediction-form {
  border: 1px solid #bfd5fa;
  border-radius: 14px;
  padding: 0.68rem;
  background: #fff;
  display: grid;
  gap: 0.52rem;
}

.prediction-form {
  background: linear-gradient(180deg, #fafdff, #ecf4ff);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 70%);
}

.prediction-form.saved-state {
  border-color: #99cfb3;
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 74%),
    0 0 0 2px rgb(15 111 67 / 11%);
}

.draft-notice {
  border: 1px solid #bfd5fa;
  border-radius: 10px;
  background: #edf4ff;
  color: #244879;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.draft-notice .ghost-btn {
  width: auto;
  margin: 0;
  padding: 0.35rem 0.62rem;
  font-size: 0.74rem;
}

.prediction-ack {
  margin: 0;
  font-size: 0.77rem;
  font-weight: 600;
  color: #2d6a49;
  background: #edf8f2;
  border: 1px solid #b4dfc6;
  border-radius: 10px;
  padding: 0.32rem 0.45rem;
}

.prediction-ack.fresh {
  animation: pop-in 280ms ease;
}

.scoreboard-picker {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: center;
  background:
    radial-gradient(circle at 15% 12%, rgb(255 255 255 / 12%), transparent 30%),
    linear-gradient(140deg, #0f315f 0%, #1c477f 45%, #265896 100%);
  border-radius: 14px;
  border: 1px solid #2c5e9a;
  padding: 0.66rem;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%);
}

.score-team {
  text-align: center;
}

.score-team-name {
  margin: 0 0 0.35rem;
  color: #cfe0ff;
  font-size: 0.78rem;
  font-weight: 700;
}

.score-separator {
  margin: 0;
  color: #8db2ea;
  font-weight: 800;
  font-size: 1.2rem;
}

.score-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.score-minus,
.score-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  aspect-ratio: 1 / 1;
  line-height: 1;
  border: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 7px 14px rgb(2 26 61 / 30%);
}

.score-plus {
  background: #18b36a;
}

.score-plus:hover {
  background: #14995b;
}

.score-minus {
  background: #4e6284;
}

.score-minus:hover {
  background: #3d4f6c;
}

.score-value {
  min-width: 28px;
  text-align: center;
  color: #fff;
  font-size: 1.75rem;
  font-weight: 800;
}

.goalscorer-picker {
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: linear-gradient(180deg, rgb(255 255 255 / 94%), rgb(245 251 255 / 92%));
  padding: 0.58rem;
  display: grid;
  gap: 0.45rem;
}

.scorer-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.scorer-group {
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  padding: 0.45rem;
  background: #f7fbff;
}

.scorer-group-title {
  margin: 0 0 0.4rem;
  font-size: 0.76rem;
  font-weight: 800;
  color: #33527f;
}

.player-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.position-groups-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
}

.position-group + .position-group {
  margin-top: 0;
}

.position-group {
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  padding: 0.3rem 0.42rem;
  background: rgb(255 255 255 / 74%);
}

.position-group-title {
  margin: 0 0 0.28rem;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #42679e;
}

.player-chip {
  border-radius: 999px;
  border: 1px solid #aac4ef;
  padding: 0.28rem 0.56rem;
  background: linear-gradient(180deg, #fff, #f3f8ff);
  color: #284a7e;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgb(11 41 83 / 8%);
}

.player-chip:hover {
  background: linear-gradient(180deg, #eef5ff, #ddeaff);
}

.player-chip.active {
  background: linear-gradient(150deg, #023a7b, #0450a9);
  border-color: #034a99;
  color: #fff;
  box-shadow: 0 8px 18px rgb(3 70 148 / 28%);
}

.selected-scorer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}

.selected-scorer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #cbddff;
  border-radius: 10px;
  padding: 0.35rem 0.48rem;
  background: linear-gradient(180deg, #fafdff, #f2f8ff);
  color: #244879;
  font-size: 0.76rem;
  font-weight: 700;
}

.selected-scorer-item.empty {
  justify-content: center;
  color: #5d769f;
  font-weight: 600;
}

.selected-scorer-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mini-step-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #b5caef;
  background: #fff;
  color: #22497f;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 800;
}

.prediction-form .mini-step-btn {
  display: inline-grid !important;
  place-items: center;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  flex: 0 0 24px !important;
  padding: 0 !important;
  margin-top: 0 !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  line-height: 1 !important;
}

.mini-step-btn:hover {
  background: #e9f2ff;
}

.selected-scorer-count {
  min-width: 12px;
  text-align: center;
}

.prediction-form button {
  background: linear-gradient(140deg, #0f7d4a, #0b6439);
  color: #fff;
  box-shadow: 0 11px 20px rgb(8 73 43 / 28%);
  width: 100%;
  margin-top: 0.2rem;
}

.prediction-form button.needs-review {
  background: linear-gradient(140deg, #0e5dc0, #0a4287);
  box-shadow: 0 11px 20px rgb(8 57 122 / 25%);
}

.prediction-form .score-minus,
.prediction-form .score-plus {
  display: inline-grid !important;
  place-items: center;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  flex: 0 0 36px !important;
  padding: 0 !important;
  margin-top: 0 !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  line-height: 1 !important;
}

.prediction-form button:hover {
  background: linear-gradient(140deg, #0c6f41, #094e2f);
}

.mini-title {
  margin: 0;
  font-size: 0.71rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #3d5685;
}

.prediction-list {
  gap: 0.36rem;
  margin-top: 0.42rem;
}

.prediction-list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.42rem 0.54rem;
  background: #fff;
  color: #35507d;
  font-size: 0.84rem;
}

.admin-league-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
}

.admin-league-item .danger-btn {
  width: auto;
  margin-top: 0;
  padding: 0.5rem 0.78rem;
}

.fixture-actions {
  margin-top: 0.66rem;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 0.8rem;
  text-align: center;
  color: var(--text-2);
  background: rgb(255 255 255 / 82%);
}

.empty-state .ghost-btn {
  margin-top: 0.58rem;
}

.auth-gate-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(255 255 255 / 88%);
  padding: 0.85rem;
  color: #294a79;
  display: grid;
  gap: 0.55rem;
  text-align: center;
  justify-items: center;
}

.auth-gate-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.auth-gate-card-inline {
  margin-top: 0.55rem;
}

.config-error-banner {
  border: 1px solid #efb4b4;
  border-radius: 12px;
  background: #fff3f3;
  color: #8e1f1f;
  font-weight: 700;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.6rem;
}

.hidden {
  display: none;
}

.site-footer {
  max-width: 1040px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

.section-kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 800;
  color: #42679e;
}

.overview-panel .section-kicker {
  margin-bottom: 0.45rem;
}

.prediction-primary .section-kicker {
  position: relative;
  z-index: 1;
}

.profile-edit-shell {
  margin: 0.2rem 0 0.62rem;
  display: grid;
  gap: 0.45rem;
}

.profile-edit-shell .mini-form {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.62rem;
  background: rgb(255 255 255 / 88%);
}

.profile-actions {
  display: flex;
  gap: 0.45rem;
}

.profile-actions button {
  flex: 1;
}

.forum-thread-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.forum-thread-row {
  display: grid;
  gap: 0.24rem;
}

.forum-thread-title {
  font-weight: 800;
}

#forum-thread-detail-body {
  white-space: pre-wrap;
  color: #294a79;
  margin: 0.45rem 0 0.65rem;
}

.forum-comment-list {
  gap: 0.3rem;
}

.forum-comment {
  list-style: none;
  margin: 0;
  padding: 0.22rem 0;
  border-bottom: 1px solid #dce8ff;
}

.forum-comment.depth-2 {
  margin-left: 0.95rem;
  border-left: 2px solid #d9e7ff;
  padding-left: 0.55rem;
}

.forum-comment.depth-3 {
  margin-left: 1.9rem;
  border-left: 2px solid #d9e7ff;
  padding-left: 0.55rem;
}

.forum-comment-shell {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.48rem;
  align-items: start;
}

.forum-comment-content {
  display: grid;
  gap: 0.2rem;
}

.forum-comment-body {
  white-space: pre-wrap;
  color: #1f3f70;
  font-size: 0.85rem;
  line-height: 1.4;
}

.forum-comment-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.forum-vote-rail {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
  margin-top: 0.02rem;
}

.forum-vote-btn {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6a81a8;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  font-size: 0.76rem;
  line-height: 1;
  box-shadow: none;
  transform: none;
}

.forum-vote-btn:hover {
  color: #2a4f86;
  background: #eaf2ff;
  transform: none;
}

.forum-vote-btn.active {
  background: #e2eeff;
  color: #0f3f84;
}

.forum-comment-score {
  min-width: 24px;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 800;
  color: #315684;
}

.forum-comment-children {
  list-style: none;
  margin: 0.08rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.16rem;
}

.forum-inline-reply-form {
  margin-top: 0.2rem;
  border: 1px solid #d4e3fb;
  border-radius: 8px;
  padding: 0.34rem;
  background: #f9fcff;
  gap: 0.34rem;
}

.forum-inline-reply-actions {
  display: flex;
  gap: 0.34rem;
}

.forum-action-link {
  border: 0;
  background: transparent;
  color: #355b8d;
  border-radius: 6px;
  padding: 0.18rem 0.34rem;
  min-width: 0;
  min-height: 0;
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: none;
  transform: none;
}

.forum-action-link:hover {
  background: #eaf2ff;
  color: #163f78;
  transform: none;
}

.error-text {
  color: #a12626;
}

.success-text {
  color: #17623d;
}

.site-footer p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-2);
  text-align: center;
}

/* Matchday Moments */
.cards-toolbar {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.cards-filter-row {
  display: grid;
  gap: 0.45rem;
}

.cards-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.cards-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.moment-card {
  border: 1px solid #c8dcfb;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f5f9ff);
  aspect-ratio: 3 / 4;
}

.moment-card-hit {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #163462;
  text-align: left;
  padding: 0.58rem;
  display: grid;
  gap: 0.38rem;
  position: relative;
}

.moment-card-hit:focus-visible,
.card-detail-actions .ghost-btn:focus-visible,
.cards-filter-group .tab-btn:focus-visible {
  outline: 3px solid #1f5db2;
  outline-offset: 2px;
}

.moment-card.rarity-common {
  box-shadow: inset 0 0 0 2px rgb(126 154 197 / 34%);
}

.moment-card.rarity-rare {
  box-shadow: inset 0 0 0 2px rgb(39 99 186 / 40%);
}

.moment-card.rarity-legendary {
  box-shadow: inset 0 0 0 2px rgb(148 116 25 / 55%);
}

.moment-card.rarity-rare .moment-card-hit:hover::after,
.moment-card.rarity-legendary .moment-card-hit:hover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(120deg, transparent 20%, rgb(255 255 255 / 20%) 50%, transparent 80%);
  animation: sheen 1.1s linear;
  pointer-events: none;
}

.moment-card.is-locked,
.moment-card-detail.is-locked {
  filter: grayscale(0.9);
  opacity: 0.75;
}

.moment-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.moment-rarity-pill,
.moment-competition-pill,
.moment-new-pill,
.moment-locked-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #aac4ef;
  padding: 0.14rem 0.45rem;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #1d467d;
  background: #edf4ff;
}

.moment-rarity-pill {
  text-transform: uppercase;
}

.moment-new-pill {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #0f7d4a;
  border-color: #0f7d4a;
  color: #fff;
}

.moment-locked-pill {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: #5f708d;
  border-color: #5f708d;
  color: #fff;
}

.moment-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  color: #102f5d;
}

.moment-card-context {
  margin: 0;
  font-size: 0.75rem;
  color: #335586;
}

.moment-card-score {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 900;
  color: #113668;
}

.moment-card-reason {
  margin: 0;
  font-size: 0.72rem;
  color: #2e4f7f;
  min-height: 2.2em;
}

.moment-card-footer {
  margin-top: 0.08rem;
  display: flex;
  justify-content: space-between;
  gap: 0.3rem;
  font-size: 0.66rem;
  color: #3a5d8f;
}

.card-detail-modal-content {
  max-width: 620px;
}

.moment-card-detail {
  border: 1px solid #c8dcfb;
  border-radius: 14px;
  padding: 0.72rem;
  background: linear-gradient(180deg, #fff, #f5f9ff);
  display: grid;
  gap: 0.44rem;
}

.moment-card-help {
  margin: 0;
  font-size: 0.82rem;
  color: #264a7b;
}

.card-detail-actions {
  margin-top: 0.6rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sheen {
  0% {
    transform: translateX(-115%);
  }
  48%,
  100% {
    transform: translateX(115%);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .app-shell {
    padding-top: 1.2rem;
  }

  .auth-grid,
  .league-forms,
  .two-col,
  .dashboard-grid,
  .fixture-body,
  .scorer-groups,
  .signedout-preview,
  .position-groups-layout,
  .admin-score-grid {
    grid-template-columns: 1fr;
  }

  .session-row,
  .league-meta,
  .upcoming-head,
  .auth-bar-top {
    display: block;
  }

  .session-actions,
  .league-meta button,
  .upcoming-head .ghost-btn,
  .auth-bar-top .ghost-link {
    margin-top: 0.58rem;
  }

  .auth-bar-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .auth-login-fields {
    grid-template-columns: 1fr;
  }

  .league-forms .mini-form {
    min-height: 0;
  }

  .overview-tabs {
    width: 100%;
  }

  .top-nav-row {
    display: grid;
    gap: 0.55rem;
  }

  .top-nav {
    width: 100%;
  }

  .account-menu-wrap {
    justify-self: end;
  }

  .account-actions {
    justify-self: end;
    width: 100%;
    justify-content: flex-end;
  }

  .account-menu-dropdown {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .tab-btn {
    flex: 1;
    justify-content: center;
    min-height: 42px;
  }

  .hero {
    display: block;
  }

  .hero-deadline {
    margin-top: 0.75rem;
    max-width: none;
    text-align: left;
  }

  .hero-meta {
    justify-items: stretch;
  }

  .hero-attendance {
    text-align: left;
    padding-left: 0.04rem;
  }

  .cards-filter-group .tab-btn {
    min-height: 42px;
  }
}

@media (min-width: 901px) {
  .cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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