:root {
  color-scheme: light;
  --green: #2fa36b;
  --green-dark: #198754;
  --green-soft: #eaf6f0;
  --green-panel: #34a66f;
  --ink: #07110d;
  --text: #21382f;
  --muted: #5b6f66;
  --line: #dfe6e2;
  --bg: #fbfdfc;
  --paper: #ffffff;
  --danger: #d45342;
  --shadow: 0 2px 8px rgba(16, 32, 24, 0.12);
}

.dark {
  color-scheme: dark;
  --ink: #f3faf6;
  --text: #d7e7df;
  --muted: #9cb1a7;
  --line: #2a4036;
  --bg: #0d1712;
  --paper: #14221b;
  --green-soft: #183b2b;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

.is-hidden {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  overflow: auto;
  background: linear-gradient(145deg, #edf8f2 0%, #fbfdfc 52%, #e2f1eb 100%);
  padding: 32px 20px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.12rem;
}

.auth-panel {
  width: min(100%, 430px);
  border: 1px solid #dce9e2;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(21, 63, 43, 0.12);
  padding: 28px;
}

.auth-heading h1 {
  margin: 7px 0 8px;
  color: var(--ink);
  font-size: clamp(1.7rem, 5vw, 2.1rem);
  line-height: 1.08;
}

.auth-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin: 24px 0;
  border-radius: 8px;
  background: #f1f6f3;
  padding: 4px;
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-tab.is-active {
  background: #fff;
  color: var(--green-dark);
  box-shadow: 0 1px 4px rgba(16, 32, 24, 0.1);
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 47px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
}

.auth-submit {
  width: 100%;
  margin-top: 2px;
}

.auth-message {
  min-height: 18px;
  margin: -2px 0 0;
  color: var(--danger);
  font-size: 0.78rem;
}

.auth-footnote {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
  text-align: center;
}

body.is-authenticated .auth-screen {
  display: none;
}

.dark .auth-screen {
  background: linear-gradient(145deg, #10291c 0%, #0d1712 52%, #173526 100%);
}

.dark .auth-panel,
.dark .auth-tab.is-active,
.dark .auth-form input {
  border-color: var(--line);
  background: var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

i,
svg,
nav,
.nav-item,
.mobile-bottom-nav-item {
  user-select: none;
  -webkit-user-select: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.1;
}

h2 {
  margin: 0;
  color: #020806;
  font-size: clamp(1.75rem, 4vw, 2rem);
  line-height: 1.05;
}

h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1rem;
}

.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  padding: 0 20px;
}

.notification-center {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 35;
}

.notification-bell {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.notification-bell span {
  font-size: 1.16rem;
  line-height: 1;
}

.notification-bell strong {
  position: absolute;
  top: -4px;
  right: -3px;
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  padding: 0 4px;
  font-size: 0.68rem;
  line-height: 1;
}

.notification-bell strong.is-empty {
  background: #66766f;
}

.notification-panel {
  position: absolute;
  top: 52px;
  right: 0;
  display: none;
  width: min(340px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 14px 36px rgba(16, 32, 24, 0.18);
}

.notification-center.is-open .notification-panel {
  display: block;
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.notification-panel-header span,
.notification-item span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-list {
  display: grid;
  max-height: 360px;
  overflow: auto;
}

.notification-item {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.notification-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.notification-settings {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.notification-settings legend {
  padding: 0 5px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.appearance-settings {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.menu-button {
  display: grid;
  width: 28px;
  height: 40px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.35rem;
}

.brand-compact,
.club-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-compact strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.badge {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  background-position: center;
  background-size: cover;
  text-transform: uppercase;
}

.badge.has-image {
  border: 1px solid var(--line);
  background-color: var(--paper);
}

.logo-preview-field {
  display: grid;
  gap: 8px;
  justify-items: start;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
}

.logo-preview {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--green);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
  font-size: 2.6rem;
  font-weight: 950;
  text-transform: uppercase;
}

.logo-preview.has-image {
  background-color: var(--paper);
}

.app-shell {
  min-height: calc(100vh - 58px);
  min-height: calc(100dvh - 58px);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.sidebar {
  position: fixed;
  inset: 58px auto 0 0;
  z-index: 19;
  display: flex;
  width: min(280px, 82vw);
  transform: translateX(-100%);
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid var(--line);
  background: var(--paper);
  padding: 22px 12px 18px;
  transition: transform 180ms ease;
}

body.nav-open .sidebar {
  transform: translateX(0);
  box-shadow: 20px 0 50px rgba(9, 30, 20, 0.18);
}

.mobile-bottom-nav {
  display: none;
}

.club-mark {
  padding: 0 8px;
}

.club-mark p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  text-align: left;
  font-size: 0.83rem;
  font-weight: 700;
}

.logout-nav-item {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  padding-top: 10px;
}

.nav-item::before {
  content: none;
}

.nav-item svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  color: #536a60;
}

.nav-item.is-active {
  background: var(--green);
  color: #fff;
}

.nav-item.is-active::before {
  color: #fff;
}

.nav-item.is-active svg {
  color: #fff;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.switch-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green);
}

.workspace {
  min-width: 0;
  padding: 30px 20px 40px;
}

.view {
  display: none;
}

.is-hidden {
  display: none !important;
}

.view.is-active {
  display: grid;
  gap: 24px;
  animation: view-slide-in 220ms ease both;
}

@keyframes view-slide-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.page-heading,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.subtitle,
.page-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.eyebrow {
  margin: 0;
  color: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.primary-button,
.text-button,
.data-form button,
.chat-form button,
.secondary-button,
.danger-button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button,
.data-form button,
.chat-form button {
  border: 0;
  background: var(--green);
  color: #fff;
  padding: 0 16px;
}

.squad-add-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.squad-add-button svg {
  width: 17px;
  height: 17px;
}

.text-button,
.secondary-button {
  border: 1px solid transparent;
  background: #eef8f2;
  color: #0f5f3c;
  padding: 0 14px;
}

.danger-button {
  border: 1px solid #f1c9c2;
  background: #fff7f5;
  color: var(--danger);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat,
.card,
.announcement,
.player-card,
.role-card,
.fixture-card,
.availability-card,
.training-card,
.lift-card,
.bench-player {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.stat {
  display: grid;
  min-height: 96px;
  align-content: center;
  gap: 10px;
  padding: 17px;
}

.stat span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 0.82rem;
}

.stat span svg {
  width: 18px;
  height: 18px;
  color: #52685e;
  flex: 0 0 18px;
}

.stat strong {
  color: #000;
  font-size: 1.55rem;
  line-height: 1;
}

.next-fixture {
  display: grid;
  gap: 20px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: var(--green-panel);
  color: #fff;
  padding: 22px 20px 24px;
  box-shadow: 0 8px 18px rgba(31, 137, 88, 0.24);
}

.next-fixture.is-clickable {
  cursor: pointer;
}

.next-fixture.is-clickable:focus,
.next-fixture.is-clickable:hover {
  box-shadow: 0 10px 22px rgba(31, 137, 88, 0.32);
  outline: 0;
}

.next-fixture h3 {
  margin: 18px 0 6px;
  color: #fff;
  font-size: clamp(1.45rem, 5vw, 1.9rem);
  line-height: 1.1;
}

.next-fixture p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
}

.fixture-topline,
.fixture-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.fixture-topline {
  justify-content: space-between;
}

.fixture-label {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  padding: 5px 14px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
}

.home-away {
  color: #eaf8f0;
  font-size: 0.82rem;
  font-weight: 900;
}

.fixture-meta {
  gap: 18px;
  margin-top: 14px;
}

.fixture-meta .chip {
  background: transparent;
  color: inherit;
  padding: 0;
}

.next-fixture .summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.13);
  padding: 12px;
}

.next-fixture .summary-strip .stat {
  min-height: 32px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.next-fixture .summary-strip .stat span {
  color: rgba(255, 255, 255, 0.84);
}

.next-fixture .summary-strip .stat strong {
  color: #fff;
  font-size: 1rem;
}

.manage-button {
  margin-left: auto;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: #f2fbf6;
  color: #0c603a;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 850;
}

.dashboard-grid,
.two-column,
.fixture-layout,
.lineup-layout {
  display: grid;
  gap: 14px;
}

.stack {
  display: grid;
  gap: 10px;
}

.pull-refresh {
  display: grid;
  height: 0;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  opacity: 0;
  transition: height 160ms ease, opacity 160ms ease;
}

.pull-refresh.is-pulling,
.pull-refresh.is-refreshing {
  height: 32px;
  opacity: 1;
}

.pull-refresh::after {
  content: "Pull to refresh";
}

.pull-refresh.is-refreshing::after {
  content: "Refreshing...";
}

.card,
.announcement,
.player-card,
.role-card,
.fixture-card,
.availability-card,
.training-card,
.lift-card,
.bench-player {
  padding: 16px;
}

#squadList {
  gap: 12px;
}

.player-card {
  gap: 14px;
  padding: 16px;
}

.player-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-number {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 50%;
  background: #f0f7f4;
  color: #087c4d;
  font-size: 0.86rem;
  font-weight: 900;
}

.player-identity {
  min-width: 0;
}

.player-identity h3 {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.98rem;
}

.player-position {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  border-radius: 999px;
  background: #dce9ff;
  color: #0758d2;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 800;
}

.player-position.gk {
  background: #fff0bd;
  color: #a36a00;
}

.player-position.mid {
  background: #c9f6e3;
  color: #078052;
}

.player-position.fwd {
  background: #ffe0e8;
  color: #d6003d;
}

.player-contact,
.guardian-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.78rem;
}

.player-contact svg,
.guardian-label svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: #58756a;
}

.player-guardian {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.guardian-label {
  color: var(--text);
}

.player-guardian strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.empty {
  color: var(--muted);
  font-weight: 700;
}

.chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #eef8f2;
  color: #0f5f3c;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.chip.away {
  background: #eff5fb;
  color: #2a6594;
}

.data-form,
.chat-form {
  display: grid;
  gap: 10px;
}

.data-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
}

.data-form.is-collapsed {
  display: none;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--text);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

.player-card,
.role-card,
.fixture-card,
.training-card,
.lift-card {
  display: grid;
  gap: 12px;
}

.role-settings {
  display: grid;
  gap: 14px;
}

.settings-section {
  display: grid;
  gap: 18px;
  border: 1px solid #e1e9e5;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 2px 5px rgba(16, 32, 24, 0.08);
  padding: 24px;
}

.settings-section > h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.05rem;
}

.settings-section > h3 svg {
  width: 20px;
  height: 20px;
  color: var(--green);
}

.settings-profile > label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.settings-profile textarea {
  min-height: 74px;
}

.profile-logo-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-logo-row .logo-preview {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  font-size: 1.8rem;
}

.profile-upload {
  display: grid;
  gap: 7px;
}

.profile-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.profile-upload span,
.settings-help,
.account-danger p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.upload-button,
.save-settings-button,
.invite-box button,
.account-danger button {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 7px;
  padding: 0 13px;
  font-size: 0.78rem;
  font-weight: 800;
}

.upload-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.upload-button svg,
.save-settings-button svg,
.invite-box button svg,
.account-danger button svg {
  width: 16px;
  height: 16px;
}

.save-settings-button {
  background: var(--green);
  color: #fff;
}

.advanced-settings {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.advanced-settings summary {
  color: var(--text);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
}

.advanced-settings .data-form {
  margin-top: 14px;
}

.invite-box {
  display: grid;
  gap: 12px;
  border: 1px solid #e1e9e5;
  border-radius: 8px;
  background: #f8fbfa;
  padding: 14px;
}

.invite-box strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.82rem;
}

.invite-box strong svg {
  width: 17px;
  height: 17px;
}

.invite-box .role-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px auto;
  gap: 8px;
}

.invite-box button {
  background: #8bd3b2;
  color: #fff;
}

.account-danger {
  border-color: #ffb9b4;
}

.account-danger > h3 svg {
  color: #f24646;
}

.account-danger button {
  background: #f24646;
  color: #fff;
}

.role-form {
  grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1.2fr) minmax(120px, 0.8fr) auto;
}

.role-card {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.role-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.role-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fixture-card.is-clickable {
  cursor: pointer;
}

.fixture-card.is-clickable:focus-within,
.fixture-card.is-clickable:hover {
  border-color: rgba(47, 163, 107, 0.48);
  box-shadow: 0 4px 14px rgba(16, 32, 24, 0.16);
}

.fixture-card.is-expanded {
  border-color: rgba(47, 163, 107, 0.62);
}

.fixture-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.fixture-card-header > div:first-child {
  min-width: 0;
}

.score-window {
  display: grid;
  min-width: 92px;
  min-height: 62px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--text);
  padding: 7px 10px;
  text-align: center;
}

button.score-window:hover,
button.score-window:focus {
  border-color: var(--green);
  background: var(--green-soft);
  outline: 0;
}

.score-window span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.score-window strong {
  color: var(--ink);
  font-size: 1.28rem;
  line-height: 1;
}

.viewer-score {
  display: none;
}

.training-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.training-card-header > div:first-child {
  min-width: 0;
}

.reminder-pill {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  border-radius: 999px;
  background: #fff7e8;
  color: #8a5608;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 900;
}

.video-link {
  display: inline-flex;
  min-height: 40px;
  width: fit-content;
  align-items: center;
  border-radius: 8px;
  background: #fff1ef;
  color: #b3261e;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 900;
}

.video-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-link:hover,
.video-link:focus {
  background: #ffe2de;
  outline: 0;
}

.fixture-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.fixture-availability-board {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.fixture-board-header,
.fixture-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fixture-board-header h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
}

.fixture-board-header span,
.fixture-player-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.fixture-player-list {
  display: grid;
  gap: 8px;
}

.fixture-player-row {
  border-radius: 8px;
  background: #f7faf8;
  padding: 10px;
}

.fixture-player-row > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.fixture-vote-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 6px;
}

.fixture-vote-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--text);
  font-weight: 850;
}

.fixture-vote-actions button.is-selected {
  border-color: var(--green);
  background: var(--green-soft);
  color: #0f5f3c;
}

.fixture-lift-board {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.lift-board-header,
.lift-row,
.lift-row-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lift-board-header {
  justify-content: space-between;
}

.lift-board-header h4 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 0.98rem;
}

.lift-board-header p,
.lift-empty span {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.lift-row-list {
  display: grid;
  gap: 8px;
}

.lift-row,
.lift-empty {
  border-radius: 8px;
  background: #f7faf8;
  padding: 12px;
}

.lift-row {
  justify-content: space-between;
}

.lift-row > div {
  min-width: 0;
}

.lift-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.lift-empty {
  display: grid;
  gap: 3px;
}

.chip.full {
  background: #fff1ef;
  color: var(--danger);
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.availability-grid {
  display: grid;
  gap: 10px;
}

.lineup-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.lineup-toolbar label {
  display: grid;
  width: min(280px, 100%);
  gap: 6px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
}

.fixture-lineup-board {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.fixture-lineup-board .pitch {
  min-height: 560px;
}

.pitch {
  position: relative;
  min-height: 700px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.88);
  border-radius: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.84)) 50% 50% / 100% 3px no-repeat,
    radial-gradient(circle at 50% 50%, transparent 0 56px, rgba(255, 255, 255, 0.84) 57px 59px, transparent 60px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 50%, rgba(0, 0, 0, 0.04) 50% 100%),
    #258957;
  box-shadow: var(--shadow);
}

.pitch::before,
.pitch::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 48%;
  height: 110px;
  transform: translateX(-50%);
  border: 3px solid rgba(255, 255, 255, 0.84);
}

.pitch::before {
  top: -3px;
  border-top: 0;
}

.pitch::after {
  bottom: -3px;
  border-bottom: 0;
}

.pitch-name {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 1;
  max-width: calc(100% - 28px);
  border-radius: 999px;
  background: rgba(7, 17, 13, 0.44);
  color: #fff;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 900;
}

.lineup-slot {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 104px;
  min-height: 104px;
  transform: translate(-50%, -50%);
  justify-items: center;
  gap: 5px;
}

.lineup-slot strong {
  max-width: 104px;
  overflow: hidden;
  color: #fff;
  font-size: 0.78rem;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.player-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #123f2a;
  color: #fff;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.22);
  font-weight: 950;
}

.player-icon.small {
  width: 38px;
  height: 38px;
  border-width: 2px;
  box-shadow: none;
}

.lineup-slot.has-player .player-icon {
  background: var(--green);
}

.lineup-slot select {
  min-height: 34px;
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.94);
  padding: 4px 7px;
  font-size: 0.72rem;
  font-weight: 800;
}

.bench-player {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bench-player div:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.bench-player strong,
.bench-player span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bench-player span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.availability-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.status-available {
  background: var(--green);
  color: #fff;
}

.status-maybe {
  background: #b27619;
  color: #fff;
}

.status-unavailable {
  background: var(--danger);
  color: #fff;
}

.status-none {
  background: #66766f;
  color: #fff;
}

.vote-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.vote-row button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--text);
  font-weight: 850;
}

.vote-row button.is-selected {
  border-color: var(--green);
  background: var(--green-soft);
}

.announcement h3,
.player-card h3,
.fixture-card h3,
.training-card h3,
.lift-card h3 {
  margin-bottom: 5px;
}

.announcement p,
.player-card p,
.fixture-card p,
.training-card p,
.lift-card p,
.chat-message p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.segment {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-weight: 850;
}

.segment.is-active {
  border-color: var(--green);
  background: var(--green-soft);
  color: #0f5f3c;
}

.chat-window {
  display: grid;
  min-height: 320px;
  max-height: 52vh;
  align-content: start;
  gap: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 12px;
  box-shadow: var(--shadow);
}

.chat-message {
  max-width: 88%;
  border-radius: 10px;
  background: #f2f6f4;
  padding: 10px 12px;
}

.chat-message.own {
  justify-self: end;
  background: var(--green-soft);
}

.chat-message strong {
  display: block;
  margin-bottom: 3px;
}

.chat-form {
  grid-template-columns: 0.9fr 1.5fr auto;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 30;
  transform: translateY(18px);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 12px 14px;
  opacity: 0;
  transition: 180ms ease;
  pointer-events: none;
}

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

.viewer-mode .admin-only,
.viewer-mode #playerForm,
.viewer-mode #fixtureForm,
.viewer-mode #trainingForm,
.viewer-mode #announcementForm,
.viewer-mode [data-edit-player],
.viewer-mode [data-remove-player],
.viewer-mode [data-remove-fixture],
.viewer-mode [data-remove-training],
.viewer-mode [data-edit-score],
.viewer-mode [data-remove-lift] {
  display: none;
}

.viewer-mode .viewer-score {
  display: grid;
}

.viewer-mode .card-actions {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

@media (max-width: 520px) {
  .workspace {
    padding: 28px 20px calc(104px + env(safe-area-inset-bottom));
  }

  .view.is-active {
    gap: 22px;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .primary-button,
  .text-button,
  .data-form button,
  .chat-form button {
    width: 100%;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .stat {
    min-height: 90px;
  }

  .summary-strip,
  .chat-form {
    grid-template-columns: 1fr;
  }

  .next-fixture {
    padding: 20px;
  }

  .next-fixture .summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: auto;
  }

  .manage-button {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .availability-card header {
    flex-direction: column;
    gap: 8px;
  }

  .fixture-board-header,
  .fixture-player-row,
  .fixture-card-header,
  .training-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .score-window {
    width: 100%;
  }

  .fixture-vote-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lift-board-header,
  .lift-row,
  .lineup-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .pitch {
    min-height: 640px;
  }

  .lineup-slot {
    width: 92px;
  }

  .lineup-slot strong {
    max-width: 92px;
  }

  .chat-window {
    min-height: 300px;
  }

  .role-card {
    grid-template-columns: 1fr;
  }

  .role-card-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 759px) {
  button,
  input,
  select,
  textarea,
  .nav-item,
  .mobile-bottom-nav-item {
    min-height: 44px;
  }

  .mobile-topbar {
    padding-top: env(safe-area-inset-top);
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(16, 32, 24, 0.08);
  }

  .mobile-bottom-nav-item {
    display: grid;
    min-height: 48px;
    place-items: center;
    gap: 3px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 800;
  }

  .mobile-bottom-nav-item svg {
    width: 19px;
    height: 19px;
  }

  .mobile-bottom-nav-item.is-active {
    background: var(--green-soft);
    color: var(--green-dark);
  }
}

@media (min-width: 760px) {
  .workspace {
    padding: 34px 32px 50px;
  }

  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .two-column,
  .fixture-layout,
  .lineup-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  }

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

  .availability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-form {
    grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1.2fr) minmax(120px, 0.8fr) auto;
  }

.announcement-form textarea,
.training-form textarea,
.fixture-entry input:last-of-type {
  grid-column: 1 / -1;
}

  .data-form button {
    justify-self: start;
    min-width: 150px;
  }
}

@media (min-width: 1024px) {
  .mobile-topbar {
    display: none;
  }

  .notification-center {
    top: 18px;
    right: 24px;
  }

  .app-shell {
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
  }

  .sidebar {
    position: sticky;
    inset: auto;
    top: 0;
    width: auto;
    min-height: 100vh;
    min-height: 100dvh;
    transform: none;
    padding: 24px 12px 18px;
    box-shadow: none;
  }

  .workspace {
    max-width: 920px;
    padding: 38px 38px 60px;
  }

  .availability-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1240px) {
  .workspace {
    max-width: 980px;
  }
}
