:root {
  --dp-primary: #2e86d1;
  --dp-accent: #4fc3ff;
  --dp-dark: #0f1f2e;
  --dp-light: #ffffff;
  --dp-surface: #f5f7fa;
  --dp-border: #e3e8ef;
  --dp-text: #0f1f2e;
  --dp-muted: #5b6b7a;
  --dp-radius-card: 16px;
  --dp-radius-btn: 14px;
  --dp-radius-input: 12px;
  --dp-shadow-card: 0 8px 24px rgba(15, 31, 46, 0.12);

  --bg-top: #f3f8fe;
  --bg-bottom: #e7eff8;
  --ink: var(--dp-text);
  --muted: var(--dp-muted);
  --panel: var(--dp-light);
  --line: var(--dp-border);
  --brand: var(--dp-primary);
  --brand-dark: #256fb0;
  --navy: #23476e;
  --cyan: var(--dp-accent);
  --cyan-dark: #276b9f;
  --accent: #2f7dbd;
  --accent-orange: #f39c3d;
  --accent-orange-soft: #fff2e2;
  --accent-orange-border: #ffd3a4;
  --accent-orange-dark: #d87f22;
  --radius: var(--dp-radius-input);
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --btn-sm: 2rem;
  --btn-md: 2.5rem;
  --heading: "Manrope", "Inter", "Segoe UI", sans-serif;
  --display: "Bebas Neue", "Inter", "Segoe UI", sans-serif;
  --font-size-body: 1rem;
  --font-size-subtitle: 0.9375rem;
  --font-size-small: 0.875rem;
  --font-size-label: 0.8125rem;
  --font-size-caption: 0.75rem;
  --font-size-h1: 2.25rem;
  --font-size-h2: 1.5rem;
  --font-size-h3: 1.25rem;
  --section-title-gap: 0.375rem;
  --section-subtitle-gap: 0.75rem;
  --line-height-body: 1.5;
  --line-height-heading: 1.1;
  --panel-title-side: var(--font-size-h2);
  --panel-title-main: var(--font-size-h2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--dp-accent) 70%, white);
  outline-offset: 2px;
}

.app-shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 16px;
}

.main-topbar {
  background: var(--dp-primary);
  border: 1px solid color-mix(in srgb, var(--dp-primary) 86%, black);
  border-radius: var(--dp-radius-card);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: var(--dp-shadow-card);
}

.brand {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.045em;
  color: #fff;
  line-height: 1;
}

h1,
h2,
h3 {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: var(--line-height-heading);
}

h1 {
  font-size: var(--font-size-h1);
}

h2 {
  font-size: var(--font-size-h2);
}

h3 {
  font-size: var(--font-size-h3);
}

.tab {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-radius-card);
  padding: 14px;
  box-shadow: var(--dp-shadow-card);
}

.auth-wrap {
  margin-top: 8px;
}

.auth-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.stack,
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack {
  flex-direction: column;
}

input,
button,
select {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: var(--dp-radius-input);
  padding: 9px 11px;
}

button {
  cursor: pointer;
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  min-height: var(--btn-md);
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  border-radius: var(--dp-radius-btn);
  font-weight: 600;
}

button:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

button.ghost {
  color: var(--dp-text);
  border-color: var(--dp-border);
  background: var(--dp-light);
}

button.ghost:hover {
  background: #f2f7fd;
  border-color: #d2deeb;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.icon-only {
  width: var(--btn-sm);
  min-height: var(--btn-sm);
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.hero-banner {
  background: linear-gradient(140deg, #22639c 0%, #2b7fc5 52%, #54a8ea 100%);
  color: #fff;
  margin-bottom: 14px;
  min-height: 0;
  padding-top: 12px;
  padding-bottom: 12px;
  border: 0;
  box-shadow: var(--dp-shadow-card);
}

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hero-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.hero-brand-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.hero-logo {
  height: clamp(28px, 3.8vw, 44px);
  width: auto;
  display: block;
  cursor: pointer;
  filter: brightness(0) invert(1) saturate(0);
}

.hero-baseline {
  font-family: var(--display);
  font-size: clamp(0.82rem, 1.4vw, 1.02rem);
  letter-spacing: 0.025em;
  color: #e8f4ff;
  line-height: 1;
}

.hero-season {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.1vw, 2rem);
  color: #fff;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
}

.hero-logout.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(11, 37, 76, 0.2);
}

.hero-logout.ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(11, 37, 76, 0.32);
}

.group-header {
  margin-bottom: 18px;
  min-height: 0;
  display: flex;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 10px;
}

.tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.tabs-left {
  display: inline-flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.mobile-menu-toggle {
  display: none;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #c6d8ec;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  color: #1f4468;
  font-family: var(--display);
  font-size: 1.04rem;
  letter-spacing: 0.03em;
  padding: 0 14px;
  box-shadow: 0 4px 16px rgba(31, 61, 98, 0.08);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.mobile-menu-toggle:hover {
  background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);
  border-color: #9fbedf;
  box-shadow: 0 6px 18px rgba(31, 61, 98, 0.13);
}

.mobile-menu-toggle::after {
  content: "▾";
  font-size: 0.8rem;
  line-height: 1;
  transition: transform 0.16s ease;
}

.group-header.mobile-menu-open .mobile-menu-toggle::after {
  transform: rotate(180deg);
}

.tabs-vibe {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--dp-accent) 55%, white);
  background: color-mix(in srgb, var(--dp-accent) 16%, white);
  color: #1f4c72;
  font-family: var(--heading);
  font-size: var(--font-size-caption);
  letter-spacing: 0.03em;
  padding: 0 9px;
  white-space: nowrap;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--dp-muted);
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 8px 0 9px;
  font-size: 1.08rem;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
  min-height: auto;
}

.tab:hover {
  background: transparent;
  border-color: transparent;
  color: #2e4f71;
}

.tab:focus-visible {
  outline: 2px solid var(--dp-accent);
  outline-offset: 2px;
}

.tab.active {
  border-bottom-color: var(--dp-accent);
  color: #203f63;
  font-weight: 700;
}

.tab.active:hover {
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--dp-accent);
  color: #203f63;
}

.tab-view-hidden {
  display: none !important;
}

#appSection {
  display: grid;
  gap: 0;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(300px, 370px) minmax(620px, 720px) minmax(300px, 370px);
  gap: 14px;
  align-items: start;
  justify-content: center;
  margin-top: 0;
}

.layout-grid.standings-mode {
  grid-template-columns: 1fr;
}

.layout-grid.standings-mode .left-col,
.layout-grid.standings-mode .center-col {
  display: none;
}

.layout-grid.standings-mode .right-col {
  max-width: none;
  position: static;
  top: auto;
  z-index: auto;
}

.layout-grid.predictions-mode {
  grid-template-columns: 1fr;
}

.layout-grid.predictions-mode .left-col,
.layout-grid.predictions-mode .right-col {
  display: none;
}

.layout-grid.predictions-mode .center-col {
  max-width: none;
}

.left-col,
.center-col,
.right-col {
  min-width: 0;
}

.left-col,
.right-col {
  position: sticky;
  top: 6px;
  align-self: start;
  z-index: 1;
}

.center-col {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
}

.left-col .score-panel,
.right-col .pools-panel {
  position: static;
  max-height: calc(100vh - 12px);
  overflow: auto;
  overscroll-behavior: contain;
}

.info-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

.score-panel {
  background: linear-gradient(180deg, #58bbe8 0%, #4aaedd 100%);
  border-color: #6bc4eb;
  box-shadow: 0 4px 14px rgba(45, 127, 173, 0.2);
  color: #f4fcff;
  margin-bottom: 12px;
}

.score-panel h2 {
  color: #f7fdff;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--panel-title-side);
  line-height: 1.02;
}

.leaderboard-head {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  padding: 3px 0 8px;
  border-bottom: 1px solid rgba(235, 249, 255, 0.4);
  color: #def3ff;
  font-size: 0.74rem;
  font-weight: 600;
  font-family: "Inter", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.015em;
}

.leaderboard-head span:last-child {
  justify-self: end;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(235, 249, 255, 0.35);
  padding: 10px 0;
}

.leaderboard-row:last-child {
  border-bottom: 0;
}

.leaderboard-row.is-me {
  background: rgba(236, 249, 255, 0.14);
  border-radius: 8px;
  padding-left: 6px;
  padding-right: 6px;
}

.leaderboard-rank {
  text-align: center;
  color: #f5fcff;
  font-weight: 600;
  font-family: "Inter", "Segoe UI", sans-serif;
}

.leaderboard-player {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.leaderboard-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #eff9ff;
  font-weight: 600;
  font-family: "Inter", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.leaderboard-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(237, 249, 255, 0.32);
  border: 1px solid rgba(237, 249, 255, 0.55);
  display: inline-grid;
  place-items: center;
  font-size: 0.76rem;
  color: #2b5978;
}

.leaderboard-row.is-me .leaderboard-avatar {
  background: #ffe28a;
  color: #213a54;
  font-weight: 700;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.leaderboard-points {
  font-size: 1rem;
  color: #f3fcff;
  font-variant-numeric: tabular-nums;
  justify-self: end;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-weight: 700;
}

.group-panel h2,
.matches-head h2,
.standings-head h2,
.info-panel h2 {
  margin-bottom: 10px;
}

.list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.group-item {
  border: 1px solid #dfe8f2;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #fff;
}

.admin-tools-panel h2 {
  margin-bottom: 10px;
}

.admin-tools-grid {
  display: grid;
  gap: 8px;
}

.predictions-table-wrap {
  overflow-x: auto;
  border: 1px solid #dbe6f3;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(23, 46, 79, 0.06);
  max-width: 100%;
}

.pred-matchday-block {
  margin-bottom: 10px;
  padding-top: 2px;
}

.pred-week-controls {
  margin-bottom: 10px;
}

.pred-weeks-nav-wrap {
  margin-bottom: 8px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.pred-weeks-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 2px 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.pred-weeks-nav-wrap::-webkit-scrollbar,
.pred-weeks-nav::-webkit-scrollbar {
  display: none;
}

.pred-week-tab {
  border: 1px solid #c9d9ed;
  border-radius: 999px;
  background: #f7fbff;
  color: #294768;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 0 12px;
  min-height: 42px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pred-week-tab:hover {
  background: #ebf4ff;
  border-color: #aac6e2;
  color: #1e4a78;
}

.pred-week-tab.is-current {
  border-color: #8fb6da;
  background: #eaf3ff;
  color: #1f4f80;
}

.pred-week-tab.is-upcoming {
  border-color: #cad9ec;
  background: #f5f9ff;
  color: #294768;
}

.pred-week-tab.is-locked {
  color: #6c7e96;
  border-color: #d8e1ec;
  background: #f1f4f8;
}

.pred-week-tab.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.pred-week-tab.active:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

.pred-week-tab:focus-visible {
  outline: 2px solid var(--dp-accent);
  outline-offset: 2px;
}

.predictions-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.predictions-table th,
.predictions-table td {
  border-bottom: 1px solid #e3eaf2;
  padding: 10px 7px;
  text-align: center;
  white-space: nowrap;
  background: #fff;
}

.predictions-table th {
  position: sticky;
  top: 0;
  z-index: 7;
  background: #eef4fc;
  color: #20324f;
  border-bottom: 1px solid #d4dfef;
}

.predictions-table tbody tr:nth-child(even) td {
  background: #f9fbff;
}

.predictions-table tbody tr:hover td {
  background: #eef5ff;
}

.predictions-table th:first-child,
.predictions-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 8;
  width: 52px;
  min-width: 52px;
}

.predictions-table th:nth-child(2),
.predictions-table td:nth-child(2) {
  position: sticky;
  left: 52px;
  z-index: 8;
  width: 180px;
  min-width: 180px;
  text-align: left;
}

.predictions-table th:nth-child(3),
.predictions-table td:nth-child(3) {
  position: sticky;
  left: 232px;
  z-index: 8;
  min-width: 82px;
  font-weight: 700;
}

.predictions-table th:nth-child(n + 4),
.predictions-table td:nth-child(n + 4) {
  min-width: 136px;
}

.pred-col-head {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.pred-col-logos {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}

.pred-col-logo {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
}

.pred-col-logo .club-logo {
  width: 20px;
  height: 20px;
}

.pred-col-logo .team-emblem,
.pred-col-logo .team-flag {
  transform: scale(0.88);
}

.pred-col-divider {
  color: #90a0b4;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.pred-col-match {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pred-col-meta,
.pred-col-result {
  color: #6c7d93;
  font-size: 0.75rem;
}

.pred-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
}

.pred-status-badge.is-live {
  background: var(--dp-accent);
  color: var(--dp-dark);
}

.pred-status-badge.is-upcoming {
  background: color-mix(in srgb, var(--dp-accent) 18%, white);
  color: #1f4c72;
}

.pred-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pred-cell strong {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #233e7e, #1a2f63);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 0.88rem;
}

.pred-cell-empty {
  color: #9aa6b6;
}

.pred-fill-btn {
  min-height: 26px;
  border-radius: 999px;
  font-size: 0.78rem;
  padding: 0 10px;
  border: 1px dashed var(--dp-accent);
  color: #1f4c72;
  background: color-mix(in srgb, var(--dp-accent) 14%, white);
}

.pred-fill-btn:hover {
  background: color-mix(in srgb, var(--dp-accent) 20%, white);
  border-color: #3ba4e6;
}

.pred-locked-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f0f3f8;
  color: #6a778d;
  font-size: 0.74rem;
  font-weight: 700;
}

.pred-mobile-list {
  display: none;
}

.matches-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 0.875rem;
}

.section-heading {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.section-heading .section-title,
.section-heading .section-subtitle {
  margin: 0;
}

.section-title {
  font-size: var(--panel-title-main);
  line-height: 1.02;
  margin: 0 0 var(--section-title-gap);
  color: #1f2b37;
}

.section-subtitle {
  display: block;
  margin: 0 0 var(--section-subtitle-gap);
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: var(--font-size-subtitle);
  line-height: 1.5;
  color: #4f5f70;
}

#matchesSubtitle,
#standingsUsersPanel .standings-users-subtitle {
  display: block;
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: var(--font-size-subtitle);
  line-height: 1.5;
  font-weight: 500;
  color: #4f5f70;
}

.matches-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.matches-actions button {
  min-height: var(--btn-sm);
}

.matches-meta {
  display: none;
}

#groupHint {
  margin: 0;
  color: #5e6e84;
}

.mobile-panels-nav {
  display: none;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.mobile-pane-btn {
  min-height: var(--btn-sm);
  border-radius: 999px;
  border: 1px solid #cfdbec;
  background: #f5f8fc;
  color: #3a5578;
  padding: 0 12px;
  font-size: 0.85rem;
}

.mobile-pane-btn:hover {
  background: #e8f1fb;
  border-color: #b3cbe4;
  color: #2a4c72;
}

.mobile-pane-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.mobile-pane-btn.active:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #fff;
}

.overview-week-controls {
  display: grid;
  grid-template-columns: 88px minmax(260px, 1fr) 88px;
  gap: 8px;
  margin-bottom: 10px;
  align-items: stretch;
  width: 100%;
}

.overview-week-selector,
.pred-week-selector {
  margin-bottom: 12px;
}

.overview-week-nav {
  min-height: var(--btn-sm);
  width: 100%;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.overview-week-nav.icon-only {
  width: 100%;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 700;
}

.overview-week-nav:hover {
  background: #e7f1fb;
  border-color: #afc8e2;
  color: #1e4a78;
}

.overview-week-nav:focus-visible {
  outline: 2px solid #9ab8da;
  outline-offset: 2px;
}

.overview-week-pills-wrap {
  margin-bottom: 8px;
  padding-bottom: 2px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.overview-week-pills {
  display: inline-flex;
  gap: 8px;
  min-width: max-content;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.overview-week-pills-wrap::-webkit-scrollbar,
.overview-week-pills::-webkit-scrollbar {
  display: none;
}

.overview-week-pill {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid #cad9ec;
  background: #f7fbff;
  color: #294768;
  padding: 0 12px;
  white-space: nowrap;
  font-size: 0.86rem;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.overview-week-pill:hover {
  background: #ebf4ff;
  border-color: #aac6e2;
  color: #1e4a78;
}

.overview-week-pill.is-current {
  border-color: #8fb6da;
  background: #eaf3ff;
  color: #1f4f80;
}

.overview-week-pill.is-upcoming {
  border-color: #cad9ec;
  background: #f5f9ff;
}

.overview-week-pill.is-locked {
  color: #6c7e96;
  background: #f1f4f8;
  border-color: #d8e1ec;
}

.overview-week-pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.overview-week-pill.active.is-current,
.overview-week-pill.active.is-upcoming,
.overview-week-pill.active.is-locked {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.overview-week-pill.active:hover,
.overview-week-pill.active.is-current:hover,
.overview-week-pill.active.is-upcoming:hover,
.overview-week-pill.active.is-locked:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

.week-pill-title {
  font-weight: 700;
  line-height: 1.05;
}

.week-pill-range {
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0.9;
}

.overview-week-pill:focus-visible {
  outline: 2px solid var(--dp-accent);
  outline-offset: 2px;
}

.overview-week-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 2px 0 0;
}

.overview-week-header {
  font-family: var(--heading);
  color: #22395f;
  font-size: 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  border-bottom: 1px solid #d8e2ee;
  padding: 0 2px 8px;
}

.overview-week-header span {
  color: #5f738f;
  font-size: 0.82rem;
  font-family: "Inter", "Segoe UI", sans-serif;
}

.matches-section-label {
  margin: 6px 0 10px;
  font-family: var(--heading);
  font-size: 1rem;
  color: #33445f;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.past-matches-block {
  margin-top: 12px;
}

.past-matches-block > summary {
  cursor: pointer;
  font-family: var(--heading);
  font-size: 1rem;
  color: #33445f;
  list-style: none;
}

.past-matches-block > summary::-webkit-details-marker {
  display: none;
}

.past-matches-inner {
  margin-top: 8px;
}

.matches-panel {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 8px 0 0;
}

.layout-grid.predictions-mode .matches-panel {
  background: var(--panel);
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-radius-card);
  box-shadow: var(--dp-shadow-card);
  padding: 1.5rem;
}

.matches-feedback-card {
  border: 1px solid #dbe6f3;
  border-radius: var(--dp-radius-card);
  background: #f8fbff;
  padding: 14px;
  box-shadow: var(--dp-shadow-card);
}

.matches-feedback-card .feedback-title {
  margin: 0 0 6px;
  font-family: var(--heading);
  font-weight: 700;
  color: #294668;
  font-size: 0.96rem;
}

.matches-feedback-card.is-error {
  border-color: #ecc6c6;
  background: #fff5f5;
}

.matches-feedback-card.is-error .feedback-title {
  color: #8a2f2f;
}

.matches-feedback-card [data-retry-matches] {
  margin-top: 10px;
}

.matches-skeleton-grid {
  display: grid;
  gap: 10px;
}

.match-skeleton-card {
  border: 1px solid #e1e9f4;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.skeleton-line {
  border-radius: 999px;
  background: linear-gradient(90deg, #edf3fb 0%, #e4edf8 50%, #edf3fb 100%);
  background-size: 200% 100%;
  animation: shimmer 1.15s linear infinite;
}

.skeleton-line.lg {
  height: 12px;
  width: 70%;
  margin-bottom: 8px;
}

.skeleton-line.md {
  height: 10px;
  width: 44%;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.day-block {
  margin-bottom: 20px;
}

.day-block h3 {
  margin-bottom: 7px;
  color: #0f121a;
  text-transform: uppercase;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.matchday-range {
  margin: -4px 0 7px;
  color: #5a6d86;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.matchday-date-block {
  margin-bottom: 10px;
}

.week-day-accordion {
  border: 1px solid #dde6f2;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.week-day-summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #2f4868;
  text-transform: uppercase;
  background: #f2f7fd;
  position: sticky;
  top: 0;
  z-index: 2;
}

.week-day-summary::-webkit-details-marker {
  display: none;
}

.week-day-body {
  padding: 0;
}

.matchday-date-title {
  margin: 0 0 5px;
  font-size: 0.86rem;
  color: #304765;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.day-matches-card {
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.day-matches-card.is-open-day {
  border-color: #d8dee8;
}

.day-match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  min-height: 64px;
  padding: 38px 18px 14px;
  position: relative;
  background: #fff;
  border: 1px solid #e1e9f4;
  border-radius: var(--dp-radius-card);
  box-shadow: var(--dp-shadow-card);
  margin-bottom: 0;
}

.day-match-item {
  position: relative;
  margin-bottom: 10px;
}

.day-match-item.has-divider {
  margin-top: 6px;
}

.day-match-row.is-open {
  background: #fff;
  padding-top: 38px;
}

.day-match-row.is-locked {
  background: #fff;
}

.match-meta-row {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
}

.match-time-meta {
  font-size: 0.7rem;
  color: #657f9a;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.012em;
}

.match-save-state {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
}

.match-save-state.is-empty {
  color: #5b6f88;
  background: #f2f6fb;
  border-color: #d9e5f2;
}

.match-save-state.is-saving {
  color: #7e4d16;
  background: #fff3e2;
  border-color: #ffd2a3;
}

.match-save-state.is-saved {
  color: #1f6f50;
  background: #e9f8f0;
  border-color: #bfe7d2;
}

.match-save-state.is-error {
  color: #8a2f2f;
  background: #fff0f0;
  border-color: #ebc6c6;
}

.match-save-state.is-closed {
  color: #586a82;
  background: #eef2f7;
  border-color: #d8e0ea;
}

.day-team {
  display: grid;
  align-items: center;
  min-width: 0;
  font-size: 0.93rem;
  line-height: 1.1;
  color: #19253d;
}

.day-team-home {
  justify-self: end;
  width: auto;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr) 32px;
  justify-content: end;
  text-align: right;
}

.day-team-away {
  justify-self: start;
  width: auto;
  max-width: 100%;
  grid-template-columns: 32px minmax(0, 1fr);
  justify-content: start;
  text-align: left;
}

.day-team-home .day-team-name {
  padding-right: 8px;
}

.day-team-away .day-team-name {
  padding-left: 8px;
}

.day-team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-badge-wrap {
  display: inline-grid;
  place-items: center;
}

.team-badge-wrap.match-badge {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid #d7e1ee;
  background: #fff;
  box-shadow: none;
}

.team-flag {
  font-size: 1.35rem;
  line-height: 1;
}

.team-badge-wrap.match-badge .team-flag {
  font-size: 1rem;
}

.team-emblem {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #f1f5fb;
  color: #253045;
  border: 1px solid #c8d5e4;
  display: inline-grid;
  place-items: center;
  font-size: 0.58rem;
  font-weight: 700;
}

.team-badge-wrap.match-badge .team-emblem {
  width: 21px;
  height: 21px;
  font-size: 0.52rem;
}

.match-points-badge {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  font-size: 0.68rem;
  box-shadow: 0 2px 7px rgba(22, 33, 66, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.match-points-badge.badge-zero {
  background: linear-gradient(180deg, #9aa3b2, #7f8898);
}

.match-points-badge.badge-low {
  background: linear-gradient(180deg, #355faa, #274786);
}

.match-points-badge.badge-mid {
  background: linear-gradient(180deg, #233f84, #182f63);
}

.match-points-badge.badge-minor {
  background: linear-gradient(180deg, #5670a1, #445a82);
}

.match-points-badge.badge-jackpot {
  background: linear-gradient(180deg, #e3bc31, #c79d1a);
}

.day-center {
  justify-self: center;
  align-self: center;
  display: grid;
  justify-items: center;
  min-width: 96px;
  width: max-content;
}

.day-center.open-center {
  align-content: center;
  justify-items: center;
  row-gap: 5px;
  min-height: 40px;
  padding-top: 0;
}

.day-center.locked-center {
  align-content: center;
  min-height: 40px;
}

.match-kickoff-label {
  display: block;
  text-align: center;
  font-size: 0.76rem;
  color: #5f7895;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

.match-kickoff-label.is-in-card {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}

.kickoff-time {
  text-align: center;
  font-size: 0.68rem;
  color: #65809b;
  font-weight: 700;
  margin-bottom: 2px;
}

.kickoff-time.kickoff-time-floating {
  display: block;
  margin: 0;
}

.kickoff-time-row {
  display: none;
}

.score-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-input.open input {
  width: 38px;
  height: 38px;
  padding: 3px 1px;
  font-size: 1.06rem;
  text-align: center;
  border: 2px solid #aac1da;
  background: #fff;
  border-radius: 10px;
  font-weight: 700;
  color: #1f2f48;
  font-family: var(--heading);
  appearance: textfield;
  -moz-appearance: textfield;
}

.score-input.open input::-webkit-outer-spin-button,
.score-input.open input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.score-input input:focus {
  outline: none;
  border-color: #2d7bc2;
  box-shadow: 0 0 0 3px rgba(45, 123, 194, 0.2);
}

.score-pill {
  background: linear-gradient(180deg, #274c95 0%, #1b356d 100%);
  color: #fff;
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 1.08rem;
  font-weight: 700;
  min-width: 58px;
  text-align: center;
  line-height: 1.05;
  font-family: var(--heading);
}

.score-stack {
  position: relative;
  padding-top: 9px;
  transform: translateY(-2px);
}

.score-top {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #29c680, #1ea266);
  color: #fff;
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  font-family: var(--heading);
}

.score-top.is-live {
  background: linear-gradient(180deg, #f5ad59, #e68f2d);
}

.prediction-row.compact {
  margin-top: 0;
  min-height: 0;
}

.meta,
.small {
  color: var(--muted);
  font-size: var(--font-size-small);
}

.meta.compact {
  margin-top: 2px;
}

.standings-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.standings-head h2 {
  font-size: var(--panel-title-side);
  line-height: 1.02;
  margin-bottom: 0;
}

.info-panel h2 {
  font-size: var(--panel-title-main);
  line-height: 1.02;
  margin: 0 0 var(--section-title-gap);
  color: #1d2a45;
}

.standings-head .small {
  margin-top: 4px;
}

.pools-grid {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.pools-panel {
  overflow: visible;
}

.layout-grid.standings-mode .pools-grid {
  grid-template-columns: 1fr;
}

.pool-season-meta {
  margin: 0;
  color: #5a6b84;
  font-size: 0.88rem;
  font-weight: 700;
}

.pool-table-wrap {
  max-height: none;
  overflow: visible;
  border-radius: 8px;
}

.pool-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.pool-table th,
.pool-table td {
  border-bottom: 1px solid #e3eaf2;
  padding: 9px 7px;
  text-align: right;
}

.pool-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf2fa;
  color: #1f2c4f;
}

.pool-table th:first-child,
.pool-table td:first-child {
  text-align: center;
  width: 34px;
}

.pool-table th:nth-child(2),
.pool-table td:nth-child(2) {
  text-align: left;
}

.pool-table th:last-child,
.pool-table td:last-child {
  width: 64px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pool-table tbody tr:last-child td {
  border-bottom: 0;
}

.pool-table tbody tr:nth-child(even) td {
  background: #f8fbff;
}

.pool-table tbody tr:hover td {
  background: #eef5ff;
}

.pool-table tbody tr.pool-top3 td {
  background: #f1f7ff;
}

.pool-points strong {
  font-weight: 700;
}

.pool-team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.club-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.team-badge-wrap.match-badge .club-logo {
  width: 24px;
  height: 24px;
}

.standings-users-table {
  margin-top: 0.75rem;
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
  border: 1px solid #dbe6f3;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.standings-users-table th,
.standings-users-table td {
  border-bottom: 1px solid #e3eaf2;
  padding: 11px 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.standings-users-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #eaf2fc 0%, #e2edf9 100%);
  color: #1f3a5d;
  border-bottom: 1px solid #d4dfef;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.015em;
}

.standings-users-table tbody tr:nth-child(even) td {
  background: #f6fbff;
}

.standings-users-table tbody tr:hover td {
  background: #e8f3ff;
}

.standings-users-table tbody tr.is-me td {
  background: #e2f0ff;
}

.standings-users-table tbody tr.is-top-1 td {
  background: linear-gradient(180deg, #fff8ea 0%, #fff3e1 100%);
}

.standings-users-table tbody tr.is-top-2 td {
  background: linear-gradient(180deg, #eef6ff 0%, #e5f0fd 100%);
}

.standings-users-table tbody tr.is-top-3 td {
  background: linear-gradient(180deg, #fff4ea 0%, #ffefdf 100%);
}

.standings-users-table th:nth-child(2),
.standings-users-table td:nth-child(2) {
  text-align: left;
  width: 24%;
}

.standings-users-table th:first-child,
.standings-users-table td:first-child {
  text-align: center;
  width: 42px;
}

.standings-users-table th:nth-child(n + 3),
.standings-users-table td:nth-child(n + 3) {
  width: 10.85%;
}

.standings-users-table th:last-child,
.standings-users-table td:last-child {
  font-weight: 700;
  color: #1f4b86;
  background-image: linear-gradient(180deg, rgba(236, 246, 255, 0.9) 0%, rgba(226, 239, 255, 0.9) 100%);
}

.standings-users-table tbody tr:last-child td {
  border-bottom: 0;
}

.standings-users-panel {
  padding: 1.5rem;
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-radius-card);
  box-shadow: var(--dp-shadow-card);
  background: var(--panel);
  overflow-x: auto;
}

.standings-users-panel .standings-head {
  margin: 0;
  display: grid;
  gap: var(--section-title-gap);
}

.standings-users-subtitle {
  margin: 0;
}

.standings-legend {
  margin: 0.875rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  color: #5d718b;
  font-size: 0.78rem;
  line-height: 1.4;
}

.standings-legend li {
  margin: 0;
}

.standings-legend strong {
  color: #2b4666;
}

.standings-rank-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #edf3fb;
  color: #2b4769;
  font-weight: 700;
  font-size: 0.74rem;
}

.standings-users-table tbody tr.is-top-1 .standings-rank-badge {
  background: linear-gradient(180deg, #f3c44b, #dcaa26);
  color: #fff;
}

.standings-users-table tbody tr.is-top-2 .standings-rank-badge {
  background: linear-gradient(180deg, #cfd7e2, #adb9c9);
  color: #21324c;
}

.standings-users-table tbody tr.is-top-3 .standings-rank-badge {
  background: linear-gradient(180deg, #e7b091, #cd8456);
  color: #fff;
}

.standings-player-name {
  font-weight: 600;
  color: #1f3049;
}

.standings-player {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.standings-player-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #c8d6e7;
  background: #e9f2fd;
  color: #2a4b6f;
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
  flex: 0 0 auto;
}

.message {
  min-height: 1.2em;
  margin: 8px 2px;
  color: #b33f3a;
}

.toast-container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  z-index: 1000;
}

.toast {
  border: 1px solid #d4dfec;
  background: #f8fbff;
  color: #274364;
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 8px 16px rgba(22, 39, 63, 0.14);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.toast-success {
  border-color: #b8dfcd;
  background: #effaf4;
  color: #225f44;
}

.toast.toast-error {
  border-color: #e4c4c4;
  background: #fff2f2;
  color: #7f2e2e;
}

.info-panel h3 {
  margin: 12px 0 6px;
  font-size: var(--font-size-h3);
  color: #1f2c4f;
}

.info-panel > .small {
  margin: 0 0 14px;
}

.info-panel > .section-subtitle {
  margin: 0 0 var(--section-subtitle-gap);
}

.account-form {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.account-form + .account-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #dbe6f3;
}

.account-avatar-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.account-avatar-preview,
.account-avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #cedded;
  object-fit: cover;
  display: inline-grid;
  place-items: center;
  background: #eff5fc;
  color: #26415f;
  font-weight: 700;
}

.admin-users-wrap {
  overflow-x: auto;
}

.admin-users-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  border: 1px solid #dbe6f3;
  border-radius: 10px;
  overflow: hidden;
}

.admin-users-table th,
.admin-users-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e4ecf6;
  text-align: left;
  white-space: nowrap;
}

.admin-users-table th {
  background: #eef4fc;
  color: #26435f;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.admin-users-table tbody tr:nth-child(even) td {
  background: #f8fbff;
}

.admin-users-table td:last-child {
  text-align: right;
}

.admin-reset-btn {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.info-list {
  margin: 0 0 8px;
  padding-left: 18px;
}

.info-list li {
  margin-bottom: 4px;
}

.visible-predictions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.visible-prediction-chip {
  border: 1px solid #d6e2f1;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f5f9ff;
  color: #29415b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.visible-prediction-chip strong {
  color: #1f3f76;
}

.hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .info-page {
    grid-template-columns: 1fr;
  }

  .matches-actions {
    max-width: 100%;
  }

  .predictions-table th:nth-child(2),
  .predictions-table td:nth-child(2) {
    width: 160px;
    min-width: 160px;
  }

  .predictions-table th:nth-child(3),
  .predictions-table td:nth-child(3) {
    left: 212px;
  }

}

@media (max-width: 1024px) {
  .mobile-panels-nav {
    display: inline-flex;
  }

  .layout-grid {
    grid-template-columns: 1fr;
  }

  .layout-grid.mobile-pane-matches .left-col,
  .layout-grid.mobile-pane-matches .right-col {
    display: none;
  }

  .layout-grid.mobile-pane-scoreboard .center-col,
  .layout-grid.mobile-pane-scoreboard .right-col {
    display: none;
  }

  .layout-grid.mobile-pane-scoreboard .left-col {
    display: block;
  }

  .layout-grid.mobile-pane-stand .center-col,
  .layout-grid.mobile-pane-stand .left-col {
    display: none;
  }

  .layout-grid.mobile-pane-stand .right-col {
    display: block;
  }

  .left-col .score-panel,
  .right-col .pools-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .left-col,
  .right-col {
    position: static;
    top: auto;
    z-index: auto;
  }

  .matches-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-topline {
    flex-wrap: nowrap;
    align-items: flex-start;
    row-gap: 0;
  }

  .hero-brand-row {
    min-width: 0;
    flex: 1 1 auto;
    max-width: calc(100% - 94px);
    gap: 3px;
    flex-wrap: nowrap;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-brand-block {
    gap: 3px;
  }

  .hero-logo {
    height: 22px;
  }

  .hero-season {
    font-size: 0.82rem;
  }

  .hero-logout {
    margin-left: 8px;
    min-height: 32px;
    padding: 0 9px;
    font-size: 0.82rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .matches-actions button {
    width: 100%;
  }

  .standings-users-table {
    min-width: 100%;
  }

  .standings-users-table th:nth-child(n + 3):nth-child(-n + 8),
  .standings-users-table td:nth-child(n + 3):nth-child(-n + 8) {
    display: none;
  }

  .standings-users-table th:first-child,
  .standings-users-table td:first-child {
    width: 46px;
    min-width: 46px;
  }

  .standings-users-table th:nth-child(2),
  .standings-users-table td:nth-child(2) {
    width: auto;
    min-width: 0;
  }

  .standings-users-table th:last-child,
  .standings-users-table td:last-child {
    width: 84px;
    min-width: 84px;
    text-align: center;
  }
}

@media (max-width: 900px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding: 8px 6px;
    overflow-x: hidden;
  }

  .layout-grid.predictions-mode .matches-panel,
  .standings-users-panel {
    padding: 0.875rem;
  }

  .group-header {
    padding-top: 6px;
    padding-bottom: 6px;
    margin-bottom: 12px;
  }

  .tabs {
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    min-height: 36px;
    box-shadow: none;
    border: 0;
    background: transparent;
    border-radius: 0;
    padding: 0 2px;
    font-size: 1.08rem;
  }

  .tabs-left {
    width: 100%;
    display: none;
    gap: 0;
    flex-wrap: nowrap;
    flex-direction: column;
    background: transparent;
    border: 0;
    border-top: 0;
    border-radius: 0;
    overflow: hidden;
    margin-top: 2px;
    box-shadow: none;
  }

  .group-header.mobile-menu-open .tabs-left {
    display: flex;
  }

  .tab {
    width: 100%;
    text-align: left;
    font-size: 1.06rem;
    font-family: var(--display);
    letter-spacing: 0.03em;
    white-space: nowrap;
    border: 0;
    border-bottom: 1px solid #e5edf7;
    border-radius: 0;
    padding: 10px 2px 9px;
    color: #304f71;
  }

  .tabs-left .tab:last-child {
    border-bottom: 0;
  }

  .tab.active {
    color: #163a5e;
    background: #f6faff;
    box-shadow: inset 0 -1px 0 #d7e6f7;
    font-weight: 700;
  }

  .tabs-left .tab:hover {
    color: #1b446c;
    background: #f8fbff;
    border-bottom-color: #dbe7f4;
  }

  .day-match-row {
    grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
    column-gap: 6px;
    min-height: 66px;
    padding: 34px 10px 10px;
  }

  .day-match-row.is-open {
    padding-top: 34px;
  }

  .match-meta-row {
    left: 8px;
    right: 8px;
    top: 6px;
  }

  .match-time-meta {
    font-size: 0.62rem;
  }

  .match-save-state {
    font-size: 0.62rem;
    min-height: 18px;
    padding: 0 6px;
  }

  .match-kickoff-label {
    font-size: 0.66rem;
    margin-bottom: 4px;
  }

  .match-kickoff-label.is-in-card {
    top: 6px;
  }

  .day-team-home,
  .day-team-away {
    max-width: 100%;
  }

  .day-center {
    min-width: 80px;
    width: max-content;
  }

  .day-team {
    font-size: 0.72rem;
    gap: 5px;
  }

  .day-team-name {
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.15;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .team-badge-wrap.match-badge {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }

  .team-badge-wrap.match-badge .team-flag {
    font-size: 1rem;
  }

  .team-badge-wrap.match-badge .team-emblem {
    width: 21px;
    height: 21px;
    font-size: 0.48rem;
  }

  .score-pill {
    min-width: 58px;
    padding: 3px 8px;
    font-size: 1.2rem;
  }

  .score-top {
    font-size: 0.76rem;
    padding: 1px 7px;
  }

  .score-stack {
    transform: translateY(-1px);
  }

  .score-input.open input {
    width: 34px;
    height: 34px;
    font-size: 0.98rem;
    border-radius: 9px;
  }

  .kickoff-time {
    font-size: 0.62rem;
    margin-bottom: 2px;
  }

  .kickoff-time-row {
    font-size: 0.62rem;
    top: 6px;
  }

  .match-points-badge {
    right: 6px;
    bottom: 6px;
    width: 23px;
    height: 23px;
    font-size: 0.62rem;
  }

  .day-block h3,
  .matches-head-left h2 {
    font-size: 1.12rem;
  }

  .matches-head-left .small {
    display: none;
  }

  .hero-season {
    font-size: 0.78rem;
  }

  .hero-logo {
    height: 24px;
  }

  .hero-baseline {
    display: block;
    font-size: 0.64rem;
    letter-spacing: 0.02em;
    line-height: 1;
  }

  .hero-logout {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.8rem;
  }

  .tabs-vibe {
    display: none;
  }

  .pool-table-wrap {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-radius: 10px;
  }

  .pool-table {
    min-width: 100%;
    font-size: 0.86rem;
    table-layout: fixed;
  }

  .pool-table th,
  .pool-table td {
    padding: 8px 6px;
  }

  .pool-table th:nth-child(2),
  .pool-table td:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pools-panel {
    overflow: hidden;
  }

  .pred-week-tab {
    font-size: 0.82rem;
    min-height: 38px;
    padding: 0 10px;
  }

  .pred-week-tab.is-current,
  .pred-week-tab.active,
  .pred-week-tab.active.is-current,
  .pred-week-tab.active.is-upcoming,
  .pred-week-tab.active.is-locked,
  .overview-week-pill.is-current,
  .overview-week-pill.active,
  .overview-week-pill.active.is-current,
  .overview-week-pill.active.is-upcoming,
  .overview-week-pill.active.is-locked {
    background: #ffffff;
    border-color: #b9cde4;
    color: #1f4368;
  }

  .pred-week-tab.active:hover,
  .pred-week-tab.active.is-current:hover,
  .pred-week-tab.active.is-upcoming:hover,
  .pred-week-tab.active.is-locked:hover,
  .overview-week-pill.active:hover,
  .overview-week-pill.active.is-current:hover,
  .overview-week-pill.active.is-upcoming:hover,
  .overview-week-pill.active.is-locked:hover {
    background: #f5f9ff;
    border-color: #a7c2de;
    color: #1d4166;
  }

  .predictions-table {
    font-size: 0.82rem;
  }

  .predictions-table th,
  .predictions-table td {
    padding: 7px 6px;
  }

  .matches-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .overview-week-selector,
  .pred-week-selector {
    position: sticky;
    top: 0;
    z-index: 9;
    background: transparent;
    padding: 4px 0 8px;
    margin-bottom: 8px;
  }

  .overview-week-controls,
  .pred-week-controls {
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    gap: 6px;
  }

  .overview-week-nav,
  .pred-week-nav {
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.9rem;
  }

  .overview-week-nav.icon-only,
  .pred-week-nav.icon-only {
    font-size: 0.72rem;
  }

  .overview-week-pills-wrap,
  .pred-weeks-nav-wrap {
    margin-bottom: 8px;
    padding-bottom: 3px;
  }

  .predictions-table-wrap {
    border-radius: 10px;
  }

  .pred-col-meta,
  .pred-status-badge,
  .pred-col-result {
    font-size: 0.68rem;
  }

  .matches-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .matches-actions button {
    width: 100%;
  }

  .matches-actions .icon-only {
    width: 100%;
  }

  .matches-meta {
    display: none;
  }

  .pred-week-controls {
    margin-bottom: 10px;
  }

  .predictions-table th:first-child,
  .predictions-table td:first-child {
    width: 42px;
    min-width: 42px;
  }

  .predictions-table th:nth-child(2),
  .predictions-table td:nth-child(2) {
    left: 42px;
    width: 142px;
    min-width: 142px;
  }

  .predictions-table th:nth-child(3),
  .predictions-table td:nth-child(3) {
    left: 184px;
    min-width: 72px;
  }

  .pred-mobile-list {
    display: grid;
    gap: 10px;
  }

  .pred-mobile-match-card {
    border: 1px solid #dbe7f5;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(27, 53, 92, 0.07);
    overflow: hidden;
  }

  .pred-mobile-match-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    background: #f5f9ff;
    border-bottom: 1px solid #e4edf8;
  }

  .pred-mobile-teams {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .pred-mobile-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: #60748f;
    font-weight: 700;
  }

  .pred-mobile-kickoff {
    font-variant-numeric: tabular-nums;
  }

  .pred-mobile-rows {
    display: grid;
  }

  .pred-mobile-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #edf2f9;
  }

  .pred-mobile-row:last-child {
    border-bottom: 0;
  }

  .pred-mobile-row.is-me {
    background: #edf6ff;
  }

  .pred-mobile-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .pred-mobile-avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid #c9d8ea;
    background: #eff5fd;
    color: #2c4c70;
    display: inline-grid;
    place-items: center;
    font-size: 0.68rem;
    flex: 0 0 auto;
  }

  .pred-mobile-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 600;
    color: #233553;
  }

  .pred-mobile-score {
    min-width: 40px;
    text-align: center;
    font-size: 0.84rem;
    font-weight: 700;
    color: #203657;
  }

  .pred-mobile-points {
    min-width: 56px;
    text-align: right;
    font-size: 0.74rem;
    color: #5b718d;
    font-weight: 700;
  }

  .info-page {
    gap: 10px;
  }

  .info-panel {
    overflow: hidden;
  }

  .info-panel .small {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .account-form input,
  .account-form button {
    width: 100%;
    max-width: 100%;
  }

  #accountAvatarInput {
    width: 100%;
    max-width: 100%;
  }

  .admin-users-table {
    min-width: 440px;
  }

  .admin-users-table th,
  .admin-users-table td {
    white-space: nowrap;
  }

}

@media (max-width: 900px) {
  .mobile-panels-nav {
    display: none;
  }

  .center-col {
    order: 1;
  }

  .left-col {
    order: 2;
  }

  .right-col {
    order: 3;
  }

  .layout-grid,
  .layout-grid.mobile-pane-matches,
  .layout-grid.mobile-pane-scoreboard,
  .layout-grid.mobile-pane-stand {
    grid-template-columns: 1fr;
  }

  .layout-grid.mobile-pane-matches .left-col,
  .layout-grid.mobile-pane-matches .center-col,
  .layout-grid.mobile-pane-matches .right-col,
  .layout-grid.mobile-pane-scoreboard .left-col,
  .layout-grid.mobile-pane-scoreboard .center-col,
  .layout-grid.mobile-pane-scoreboard .right-col,
  .layout-grid.mobile-pane-stand .left-col,
  .layout-grid.mobile-pane-stand .center-col,
  .layout-grid.mobile-pane-stand .right-col {
    display: block;
  }
}
