:root {
  --blue: #1e88e5;
  --navy: #101828;
  --paper: #f2f4f7;
  --teal: #00c2ab;
  --orange: #ff6b00;
  --bg: #07111f;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f8fbff;
  --muted: rgba(248, 251, 255, 0.68);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f9fc;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --border: rgba(16, 24, 40, 0.14);
  --text: #101828;
  --muted: rgba(16, 24, 40, 0.62);
  --shadow: 0 18px 46px rgba(16, 24, 40, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); overflow-x: hidden; }
body {
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 480px at 72% -8%, rgba(30, 136, 229, 0.24), transparent 62%),
    linear-gradient(180deg, #07111f 0%, #0a1728 48%, #07111f 100%);
}
:root[data-theme="light"] body {
  background:
    radial-gradient(900px 480px at 78% -10%, rgba(30, 136, 229, 0.16), transparent 60%),
    linear-gradient(180deg, #f7f9fc 0%, #eef4fb 52%, #f7f9fc 100%);
}
a { color: inherit; text-decoration: none; }
.container { width: min(1120px, 100%); margin: 0 auto; padding: 0 18px; }
.main { padding: 28px 0 56px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 17, 31, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
:root[data-theme="light"] .topbar {
  background: rgba(247, 249, 252, 0.88);
}
.topbar-inner { min-height: 70px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; min-width: 170px; overflow: hidden; border-radius: 8px; }
.brand-mark { width: 184px; height: auto; display: block; }
.brand-mark-light,
.hero-logo-light {
  display: none;
}
:root[data-theme="light"] .brand-mark-dark,
:root[data-theme="light"] .hero-logo-dark {
  display: none;
}
:root[data-theme="light"] .brand-mark-light,
:root[data-theme="light"] .hero-logo-light {
  display: block;
}
.navlinks { display: flex; gap: 5px; align-items: center; flex: 1; min-width: 0; }
.navlinks a, .icon-btn, .more-menu summary {
  color: var(--muted);
  padding: 10px 9px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
}
.navlinks a:hover, .icon-btn:hover, .more-menu summary:hover { background: var(--panel); color: var(--text); }
.more-menu {
  position: relative;
}
.more-menu summary {
  cursor: pointer;
  list-style: none;
}
.more-menu summary::-webkit-details-marker {
  display: none;
}
.more-menu summary::after {
  content: "▾";
  margin-left: 6px;
  color: var(--muted);
}
.more-menu-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 210px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(7, 17, 31, 0.98);
  box-shadow: var(--shadow);
  z-index: 80;
}
:root[data-theme="light"] .more-menu-panel {
  background: rgba(255, 255, 255, 0.98);
}
.more-menu-panel a {
  padding: 10px 11px;
  color: var(--text);
  font-weight: 800;
}
.top-actions { display: flex; gap: 8px; align-items: center; }
.support-floating {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 95;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #ff5f8f, #e11d48);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(225, 29, 72, 0.3);
}
.support-floating:hover,
.support-floating:focus-visible {
  color: #fff;
  transform: translateY(-1px);
  background: linear-gradient(180deg, #ff6f9c, #be123c);
}
.support-floating span:first-child {
  font-size: 18px;
  line-height: 1;
}
.floating-hint {
  position: fixed;
  right: 24px;
  bottom: 102px;
  z-index: 92;
  max-width: 260px;
  display: grid;
  gap: 3px;
  padding: 12px 42px 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(16, 24, 40, 0.92);
  color: #fff;
  box-shadow: var(--shadow);
}
.floating-hint[hidden] {
  display: none;
}
.floating-hint-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 18px;
  line-height: 1;
}
.floating-hint-close:hover,
.floating-hint-close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}
.floating-hint strong {
  font-size: 14px;
}
.floating-hint span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.35;
}
:root[data-theme="light"] .floating-hint {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
}
:root[data-theme="light"] .floating-hint span {
  color: var(--muted);
}
.install-banner {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 990;
  width: min(560px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(7, 17, 31, 0.96);
  color: #fff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.44);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}
.install-banner[hidden] {
  display: none;
}
:root[data-theme="light"] .install-banner {
  border-color: rgba(16, 24, 40, 0.14);
  background: rgba(255, 255, 255, 0.97);
  color: var(--text);
  box-shadow: 0 22px 56px rgba(16, 24, 40, 0.18);
}
.install-banner-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.install-banner-copy strong {
  font-size: 15px;
  font-weight: 900;
}
.install-banner-copy span,
.install-banner-steps {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.35;
}
:root[data-theme="light"] .install-banner-copy span,
:root[data-theme="light"] .install-banner-steps {
  color: var(--muted);
}
.install-banner-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.install-banner-steps[hidden] {
  display: none;
}
.install-banner-steps span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-weight: 800;
}
:root[data-theme="light"] .install-banner-steps span {
  background: rgba(16, 24, 40, 0.06);
}
.install-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.install-banner-actions .btn {
  min-height: 38px;
  padding: 0 12px;
}
.install-banner-actions .btn[hidden] {
  display: none;
}
.install-banner-x {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 22px;
  line-height: 1;
}
.install-banner-x:hover,
.install-banner-x:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}
.language-switch {
  margin: 0;
}
.language-switch button {
  min-width: 44px;
  width: 44px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
}
.account-menu {
  position: relative;
}
.account-menu summary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.account-menu summary::-webkit-details-marker {
  display: none;
}
.account-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(160deg, var(--teal), var(--blue));
  color: white;
  font-size: 13px;
  font-weight: 900;
}
.account-label::after {
  content: "▾";
  margin-left: 6px;
  color: var(--muted);
}
.account-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(7, 17, 31, 0.98);
  box-shadow: var(--shadow);
  z-index: 80;
}
:root[data-theme="light"] .account-menu-panel {
  background: rgba(255, 255, 255, 0.98);
}
.account-menu-panel a {
  padding: 10px 11px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 800;
}
.account-menu-panel a:hover {
  background: var(--panel-strong);
}
.support-card {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.support-card h2 {
  margin: 4px 0 6px;
  font-size: clamp(22px, 3vw, 30px);
}
.support-card p {
  margin: 0;
  color: var(--muted);
}
.theme-toggle {
  min-width: 62px;
  width: 62px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
}
.notification-link {
  position: relative;
  min-width: 44px;
}
.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #d92d20;
  color: white;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.notification-toast {
  position: fixed;
  top: 76px;
  right: max(18px, env(safe-area-inset-right));
  z-index: 120;
  width: min(340px, calc(100vw - 28px));
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.notification-toast a,
.notification-toast div {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  color: var(--text);
}
.notification-toast span {
  color: var(--muted);
  font-size: 13px;
}
.theme-toggle span {
  display: none;
}
:root[data-theme-mode="auto"] .theme-toggle-auto,
:root[data-theme-mode="light"] .theme-toggle-light,
:root[data-theme-mode="dark"] .theme-toggle-dark {
  display: inline;
}
.theme-toggle-auto {
  color: var(--teal);
}
.theme-toggle-light {
  color: #f6a700;
}
.theme-toggle-dark {
  color: #80c8ff;
}
:root:not([data-theme-mode]) .theme-toggle-dark,
:root:not([data-theme-mode])[data-theme="light"] .theme-toggle-light {
  display: none;
}
:root:not([data-theme-mode])[data-theme="light"] .theme-toggle-dark {
  display: inline;
}
.btn, button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(180deg, #2498ff, var(--blue));
  color: white;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 24px rgba(30, 136, 229, 0.24);
}
.btn-ghost { background: var(--panel); color: var(--text); }
.btn-danger {
  background: linear-gradient(180deg, #ff6b6b, #d92d20);
  color: white;
  border-color: rgba(217, 45, 32, 0.4);
}
.detail-action {
  justify-content: center;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}
.detail-action-edit,
.detail-action-chat,
.detail-action-friend {
  background: linear-gradient(135deg, #1e90ff, #006fe6);
}
.detail-action-delete,
.detail-action-leave {
  background: linear-gradient(135deg, #f04438, #c62828);
}
.detail-action-join {
  background: linear-gradient(135deg, #35c76b, #159947);
}
.detail-action-calendar {
  background: linear-gradient(135deg, #1e88e5, #00a896);
}
.detail-action-spectator {
  background: linear-gradient(135deg, #00c2ab, #008c86);
}
.detail-action:hover,
.detail-action:focus-visible {
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.link-button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 800;
}
.link-button.danger {
  color: #d92d20;
}
.full { width: 100%; margin-bottom: 10px; }
.payment-method-card {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}
.payment-method-card strong {
  font-size: 14px;
}
.payment-method-card select,
.payment-method-card input {
  min-height: 38px;
  padding: 7px 9px;
}
.payment-method-card .errorlist {
  margin: 0;
}

.hero {
  min-height: 470px;
  display: flex;
  align-items: center;
  padding: 42px 0;
  border-bottom: 1px solid var(--border);
}
.hero-copy { max-width: 720px; }
.hero-logo { width: min(520px, 100%); margin-bottom: 20px; border-radius: 8px; }
.hero h1 { font-size: clamp(40px, 8vw, 78px); line-height: 0.94; margin: 0 0 18px; letter-spacing: 0; }
.hero p { color: var(--muted); font-size: 19px; margin: 0 0 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.hero-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.hero-counters a {
  min-width: 132px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.hero-counters strong,
.hero-counters span {
  display: block;
}
.hero-counters strong {
  font-size: 28px;
  line-height: 1;
}
.hero-counters span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.hero-counters a:hover,
.hero-counters a:focus-visible {
  border-color: rgba(30, 136, 229, 0.48);
  background: rgba(30, 136, 229, 0.12);
}
.profile-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(30, 136, 229, 0.36);
}
.profile-link:hover {
  color: var(--blue);
}

.searchbar, .filters {
  display: flex;
  gap: 10px;
  width: min(620px, 100%);
  margin: 0 0 16px;
}
.event-filter-shell {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}
.quick-filters {
  display: grid;
  grid-template-columns: minmax(170px, 1.1fr) minmax(130px, 0.8fr) minmax(145px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
}
.filter-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.advanced-filters {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.advanced-filters summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}
.advanced-filters[open] summary {
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.advanced-filters .filters-grid {
  padding: 12px;
}
.filters-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: center;
}
.check-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.check-pill input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--blue);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.searchbar.inline { margin-top: 18px; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}
input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  accent-color: var(--blue);
}
.form-card ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
}
.form-card li label {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.2;
}
:root[data-theme="light"] .form-card li label {
  background: rgba(16, 24, 40, 0.025);
}
textarea { min-height: 120px; }
label { color: var(--muted); font-weight: 700; display: block; margin-bottom: 6px; }
.helptext { color: var(--muted); font-size: 13px; }

.messages { margin-bottom: 18px; }
.message, .notice {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(30, 136, 229, 0.35);
  background: rgba(30, 136, 229, 0.12);
}
.page-title, .section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 18px 0;
}
h1, h2, h3 { margin-top: 0; letter-spacing: 0; }
.page-title h1 { font-size: clamp(34px, 6vw, 58px); margin-bottom: 8px; }
.page-title p, .lead, .card p { color: var(--muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.event-week-list {
  display: grid;
  gap: 24px;
}
.event-week-group {
  display: grid;
  gap: 12px;
}
.future-week-list {
  display: grid;
  gap: 10px;
}
.future-week-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
:root[data-theme="light"] .future-week-panel {
  background: rgba(255, 255, 255, 0.78);
}
.future-week-panel summary {
  min-height: 54px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 900;
}
.future-week-panel summary::-webkit-details-marker {
  display: none;
}
.future-week-panel summary::before {
  content: "+";
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(30, 136, 229, 0.16);
  color: var(--blue);
  font-weight: 900;
}
.future-week-panel[open] summary::before {
  content: "-";
}
.future-week-panel summary span {
  grid-column: 2;
}
.future-week-panel summary strong {
  color: var(--muted);
}
.future-week-panel summary em {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(30, 136, 229, 0.14);
  color: var(--blue);
  font-style: normal;
  font-size: 13px;
}
.future-week-panel .card-grid {
  padding: 0 14px 14px;
}
.compact-head {
  align-items: center;
  margin-bottom: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.compact-head h2 {
  margin: 0;
  font-size: 24px;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.coach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.coach-card {
  display: grid;
  gap: 10px;
}
.training-link-card {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.training-link-card:hover,
.training-link-card:focus-visible {
  border-color: rgba(30, 136, 229, 0.72);
  transform: translateY(-1px);
}
.coach-card h2,
.coach-card p {
  margin: 0;
}
.coach-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.coach-meta span {
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.training-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.training-package-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.training-package-card.is-active {
  border-color: rgba(0, 194, 171, 0.48);
  background: rgba(0, 194, 171, 0.09);
}
.training-package-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.training-package-card span,
.training-package-card small {
  color: var(--muted);
  font-weight: 800;
}
.training-package-count strong {
  font-size: 28px;
  line-height: 1;
}
.compact-schedule-form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
}
.compact-schedule-form label {
  font-size: 13px;
}
.compact-schedule-form input,
.compact-schedule-form select,
.compact-schedule-form textarea {
  min-height: 38px;
  padding: 7px 9px;
}
.compact-schedule-form textarea {
  min-height: 84px;
}
.schedule-create-panel,
.coach-request-panel {
  margin-bottom: 16px;
}
.schedule-create-panel > summary,
.coach-request-panel > summary {
  display: inline-flex;
  cursor: pointer;
  list-style: none;
  margin-bottom: 10px;
}
.schedule-create-panel > summary::-webkit-details-marker,
.coach-request-panel > summary::-webkit-details-marker {
  display: none;
}
.schedule-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.schedule-form-grid p {
  margin: 0;
}
.schedule-days-field {
  grid-column: 1 / -1;
}
.schedule-days-field > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 6px;
}
.schedule-days-field label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  font-weight: 800;
  line-height: 1.2;
}
.schedule-days-field input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--blue);
}
:root[data-theme="light"] .schedule-days-field label {
  background: rgba(16, 24, 40, 0.025);
}
.schedule-form .helptext {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.schedule-more {
  margin: 0;
}
.coach-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(172px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.coach-calendar-day {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}
:root[data-theme="light"] .coach-calendar-day {
  background: rgba(16, 24, 40, 0.025);
}
.coach-calendar-day h3 {
  margin: 0;
  font-size: 15px;
}
.coach-calendar-slots {
  display: grid;
  gap: 8px;
}
.coach-slot-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.coach-slot-card.is-booked {
  border-color: rgba(0, 194, 171, 0.6);
  background: rgba(0, 194, 171, 0.12);
}
.coach-slot-time {
  color: var(--blue);
  font-weight: 900;
}
.coach-slot-card span,
.coach-slot-card small {
  color: var(--muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.coach-swap-form,
.coach-bookings-popover {
  display: grid;
  gap: 8px;
}
.coach-swap-form summary,
.coach-bookings-popover summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}
.coach-swap-form summary.btn {
  display: inline-flex;
  width: fit-content;
  list-style: none;
}
.coach-swap-form summary.btn::-webkit-details-marker {
  display: none;
}
.coach-swap-form form,
.coach-swap-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.detail-swap-form form {
  margin-top: 8px;
}
.coach-swap-form select,
.coach-swap-form input {
  min-width: 0;
  flex: 1 1 120px;
}
.coach-swap-row {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}
:root[data-theme="light"] .coach-swap-row {
  background: rgba(16, 24, 40, 0.025);
}
.coach-slot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.coach-slot-meta span,
.coach-bookings-popover summary {
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.coach-bookings-popover summary {
  cursor: pointer;
  list-style: none;
}
.coach-bookings-popover summary::-webkit-details-marker {
  display: none;
}
.coach-bookings-popover div {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}
.coach-slot-empty {
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.person-card {
  display: flex;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}
.person-card:hover,
.person-card:focus-visible {
  border-color: rgba(30, 136, 229, 0.48);
  transform: translateY(-1px);
}
.person-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e90ff, #006fe6);
  color: #fff;
  font-weight: 900;
}
.person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.person-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.person-body strong,
.person-body small {
  overflow-wrap: anywhere;
}
.person-body small {
  color: var(--muted);
  font-weight: 700;
}
.person-sports {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.person-sports span {
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.card-grid.compact { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.card:hover { background: var(--panel-strong); transform: translateY(-1px); }
.event-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.visibility-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.event-map-shell {
  position: relative;
  z-index: 1;
  margin: 18px 0 22px;
}
.events-map {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.venue-map {
  min-height: 300px;
}
.events-map .leaflet-pane,
.events-map .leaflet-top,
.events-map .leaflet-bottom {
  z-index: 5;
}
.distance-chip {
  align-self: start;
  justify-self: start;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(30, 136, 229, 0.35);
  background: rgba(30, 136, 229, 0.12);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}
.visibility-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.visibility-public {
  background: rgba(0, 194, 171, 0.12);
  border-color: rgba(0, 194, 171, 0.36);
  color: var(--teal);
}
.visibility-unlisted {
  background: rgba(255, 193, 7, 0.14);
  border-color: rgba(255, 193, 7, 0.42);
  color: #f6a700;
}
.visibility-private {
  background: rgba(217, 45, 32, 0.12);
  border-color: rgba(217, 45, 32, 0.36);
  color: #ff6b6b;
}
.event-card.visibility-unlisted {
  border-color: rgba(255, 193, 7, 0.36);
}
.event-card.visibility-private {
  border-color: rgba(217, 45, 32, 0.34);
}
.card-kicker { color: #80c8ff; font-weight: 900; font-size: 13px; margin-bottom: 9px; }
.event-card h3, .sport-card h3 { margin-bottom: 8px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.meta-row span, .status-pill {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.05);
}
.meta-participants-link,
.inline-count-link,
.participants-count-link {
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}
.meta-participants-link {
  border-color: rgba(30, 136, 229, 0.42) !important;
  background: rgba(30, 136, 229, 0.12) !important;
}
.meta-participants-link:hover,
.participants-count-link:hover,
.inline-count-link:hover {
  text-decoration: underline;
}
.participants-head {
  scroll-margin-top: 96px;
}
.sport-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.sport-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-weight: 800;
}
.sport-chip-mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sport-chip-mark img,
.sport-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.sport-mark {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  margin-bottom: 12px;
}
.sport-card .sport-mark {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 16px 30px rgba(0, 0, 0, 0.24);
}
.club-line { color: var(--muted); margin-top: -2px; }
.club-avatar {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(160deg, var(--teal), var(--blue));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: white;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.club-avatar.large {
  width: 74px;
  height: 74px;
  font-size: 32px;
  margin-bottom: 16px;
}
.club-cover {
  width: min(520px, 100%);
  aspect-ratio: 16 / 7;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.club-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.club-card-image {
  width: 100%;
  aspect-ratio: 16 / 8;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel-strong);
}
.club-card-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.club-console {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  margin: 0 0 20px;
}
.console-head {
  margin-top: 0;
}
.console-head p {
  color: var(--muted);
  margin: 4px 0 0;
}
.club-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.club-action-bar .btn {
  min-height: 42px;
}
.console-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.console-action {
  min-height: 112px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.console-action strong {
  font-size: 16px;
}
.console-action span {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}
.console-action.is-live {
  border-color: rgba(30, 136, 229, 0.44);
  background: rgba(30, 136, 229, 0.13);
}
.console-action.is-soon {
  opacity: 0.64;
}
.console-action.is-soon::after {
  content: "Скоро";
  align-self: flex-start;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.schedule-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.schedule-form p {
  margin: 0;
}
.schedule-form button {
  align-self: end;
}
.schedule-form.compact-schedule-form {
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
}
.package-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.package-strip span,
.package-list > span,
.package-row > span {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(30, 136, 229, 0.10);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}
.schedule-table-wrap {
  overflow-x: auto;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}
.schedule-table th,
.schedule-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.schedule-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.inline-booking-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 0;
}
.inline-booking-form select,
.inline-booking-form button {
  min-height: 38px;
  width: 100%;
  padding: 0 9px;
  font-size: 13px;
}
.package-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.package-row {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.package-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.package-actions form {
  margin: 0;
}
.payment-card {
  display: grid;
  gap: 12px;
}
.payment-actions {
  display: grid;
  gap: 10px;
}
.payment-bank-box {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(30, 136, 229, 0.08);
}
.payment-bank-box span {
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.package-offer-card {
  display: grid;
  gap: 10px;
}
.package-offer-card > strong {
  font-size: 24px;
  color: var(--accent);
}
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
}
.detail-main, .detail-side, .empty, .form-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}
.danger-zone {
  border-color: rgba(217, 45, 32, 0.34);
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.info-grid div { padding: 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); }
.info-grid strong, .info-grid span { display: block; }
.info-grid span { color: var(--muted); margin-top: 4px; }
.invite-box {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 193, 7, 0.36);
  border-radius: 8px;
  background: rgba(255, 193, 7, 0.08);
}
.invite-box strong,
.invite-box span {
  display: block;
}
.invite-box span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.invite-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.sport-visual {
  margin: 18px 0;
}
.sport-manager-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.sport-manager-bar-strong {
  padding: 12px;
  border: 1px solid rgba(30, 136, 229, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(30, 136, 229, 0.22), rgba(0, 194, 171, 0.12)),
    var(--panel);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}
.sport-action {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid transparent;
  letter-spacing: 0;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}
.sport-action-primary {
  background: linear-gradient(135deg, #1e90ff, #006fe6);
  color: #fff;
}
.sport-action-clear {
  background: linear-gradient(135deg, #ff7a18, #e64a19);
  color: #fff;
}
.sport-action-settings {
  background: var(--panel-strong);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
}
:root[data-theme="light"] .sport-action-settings {
  border-color: rgba(16, 24, 40, 0.16);
}
.sport-manager-bar form {
  margin: 0;
}
.format-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lineup-settings-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
}
.lineup-settings-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.lineup-settings-form select,
.team-lineup-toolbar select {
  min-height: 42px;
  width: auto;
  min-width: 112px;
}
.team-lineup-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}
.team-lineup-toolbar form {
  margin: 0;
}
.team-visual {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}
.sport-surface-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.sport-surface-card,
.tennis-match-card,
.volleyball-match-card,
.fitness-zone-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
}
.sport-surface-card > header,
.tennis-match-card > header,
.volleyball-match-card > header,
.fitness-zone-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.sport-surface-card header span,
.tennis-match-card header span,
.tennis-match-card header em,
.volleyball-match-card header span,
.fitness-zone-card header span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.pitch-container,
.basketball-court-container {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
}
.pitch-container {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06) 0 12.5%, transparent 12.5% 25%, rgba(255,255,255,0.06) 25% 37.5%, transparent 37.5% 50%, rgba(255,255,255,0.06) 50% 62.5%, transparent 62.5% 75%, rgba(255,255,255,0.06) 75% 87.5%, transparent 87.5%),
    linear-gradient(180deg, #2f9642 0%, #247f37 100%);
}
.pitch-container::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 2px solid rgba(255, 255, 255, 0.46);
}
.pitch-container::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  border: 2px solid rgba(255, 255, 255, 0.46);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.pitch-goal-top,
.pitch-goal-bottom,
.court-basket-top,
.court-basket-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.pitch-goal-top {
  top: 0;
  width: 42%;
  height: 18%;
  border: 2px solid rgba(255, 255, 255, 0.46);
  border-top: 0;
}
.pitch-goal-bottom {
  bottom: 0;
  width: 42%;
  height: 18%;
  border: 2px solid rgba(255, 255, 255, 0.46);
  border-bottom: 0;
}
.basketball-court-container {
  background:
    radial-gradient(circle at 50% 18%, transparent 0 42px, rgba(255,255,255,0.35) 43px 45px, transparent 46px),
    radial-gradient(circle at 50% 82%, transparent 0 42px, rgba(255,255,255,0.35) 43px 45px, transparent 46px),
    linear-gradient(180deg, #c58943 0%, #b7752e 50%, #c58943 100%);
}
.basketball-court-container::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 2px solid rgba(255, 255, 255, 0.38);
}
.basketball-court-container::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.court-basket-top {
  top: 0;
  width: 54%;
  height: 22%;
  border: 2px solid rgba(255, 255, 255, 0.40);
  border-top: 0;
  border-radius: 0 0 999px 999px;
}
.court-basket-bottom {
  bottom: 0;
  width: 54%;
  height: 22%;
  border: 2px solid rgba(255, 255, 255, 0.40);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}
.lineup-surface-inner {
  position: relative;
  z-index: 2;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 42px 14px;
}
.basketball-lineup {
  justify-content: space-evenly;
}
.lineup-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
}
.lineup-group {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
}
.lineup-group-left {
  justify-content: flex-start;
}
.lineup-group-center {
  justify-content: center;
}
.lineup-group-right {
  justify-content: flex-end;
}
.lineup-row-wide5 {
  grid-template-rows: auto auto;
  row-gap: 2px;
  column-gap: 6px;
  padding-inline: 6px;
}
.lineup-row-wide5 .lineup-group-left {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
}
.lineup-row-wide5 .lineup-group-center {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-content: center;
}
.lineup-row-wide5 .lineup-group-right {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
}
.lineup-row-label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.30);
  color: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.court-side,
.team-panel {
  display: grid;
  gap: 8px;
  align-content: start;
}
.court-side span,
.team-panel span,
.fitness-zones span {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 800;
}
.player-chip {
  display: grid;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-strong) 78%, transparent);
}
.player-badge {
  width: 118px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 8px 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  backdrop-filter: blur(4px);
}
.player-badge.is-me {
  border-color: rgba(110, 231, 134, 0.85);
  background: rgba(35, 132, 62, 0.72);
  box-shadow: 0 0 18px rgba(110, 231, 134, 0.40);
}
.chip-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  line-height: 1;
  white-space: nowrap;
}
.pos-label {
  color: #ffd700;
  font-size: 0.80rem;
  font-weight: 900;
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.35);
}
.chip-name {
  max-width: 100%;
  font-size: 0.80rem;
  line-height: 1.05;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.lineup-row-wide5 .player-badge {
  width: 78px;
  min-width: 58px;
  max-width: 88px;
  padding: 3px 5px 4px;
}
.lineup-row-wide5 .chip-name,
.lineup-row-wide5 .pos-label {
  font-size: 0.70rem;
}
.lineup-editor-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.player-chip-compact {
  min-width: 96px;
  max-width: 138px;
  padding: 7px 9px;
  border-color: rgba(255, 255, 255, 0.20);
  background: rgba(8, 16, 24, 0.54);
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.42);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(5px);
}
.player-chip-compact > div:first-child {
  display: grid;
  justify-items: center;
}
.player-chip-compact .profile-link {
  color: #fff;
}
.player-chip-compact span {
  color: #ffe082;
}
.player-chip-compact .assignment-form {
  grid-template-columns: 42px minmax(70px, 1fr) minmax(52px, 0.8fr) 38px;
}
.player-chip-compact .assignment-form select,
.player-chip-compact .assignment-form button {
  min-height: 28px;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
}
.player-chip-compact .assignment-form button {
  background: linear-gradient(135deg, #1e90ff, #006fe6);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 16px rgba(0, 111, 230, 0.28);
}
.player-chip > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.player-chip strong {
  min-width: 0;
}
.player-chip span,
.empty-chip {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.assignment-form {
  display: grid;
  grid-template-columns: 56px minmax(94px, 1fr) minmax(66px, 0.8fr) auto;
  gap: 6px;
  margin: 0;
}
.assignment-form select,
.assignment-form button {
  min-width: 0;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}
.assignment-form select {
  appearance: auto;
}
.assignment-form button {
  padding: 0 9px;
  border-color: rgba(30, 136, 229, 0.46);
  background: linear-gradient(135deg, #1e90ff, #006fe6);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0, 111, 230, 0.22);
}
.visual-unassigned {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
}
.team-visual,
.fitness-equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.team-panel {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.tennis-shared-court {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  background: linear-gradient(180deg, #3aa082 0%, #338f76 100%);
}
.tennis-court-lines {
  position: absolute;
  inset: 18px;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 4px;
}
.tennis-court-lines::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  border-left: 3px solid rgba(255, 255, 255, 0.65);
}
.tennis-court-lines::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 50%;
  border-top: 3px solid rgba(255, 255, 255, 0.72);
}
.tennis-service-top,
.tennis-service-bottom {
  position: absolute;
  left: 18%;
  width: 64%;
  border-left: 3px solid rgba(255, 255, 255, 0.62);
  border-right: 3px solid rgba(255, 255, 255, 0.62);
}
.tennis-service-top {
  top: 18px;
  height: calc(50% - 18px);
  border-bottom: 3px solid rgba(255, 255, 255, 0.62);
}
.tennis-service-bottom {
  bottom: 18px;
  height: calc(50% - 18px);
  border-top: 3px solid rgba(255, 255, 255, 0.62);
}
.tennis-court-net {
  position: absolute;
  left: 50%;
  top: 14%;
  bottom: 14%;
  width: 8px;
  transform: translateX(-50%);
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.14) 0 2px, transparent 2px 6px),
    linear-gradient(90deg, rgba(15,20,25,.95), rgba(35,40,48,.98), rgba(15,20,25,.95));
  z-index: 2;
}
.tennis-court-inner {
  position: relative;
  z-index: 3;
  min-height: 410px;
}
.tennis-side {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
}
.tennis-side-top {
  top: 54px;
  left: 56px;
}
.tennis-side-bottom {
  right: 56px;
  bottom: 54px;
}
.tennis-side.doubles {
  width: 138px;
  flex-direction: column;
  align-items: flex-start;
  gap: 126px;
}
.tennis-side-top.doubles .player-chip:nth-child(2) {
  margin-left: 96px;
}
.tennis-side-bottom.doubles .player-chip:nth-child(1) {
  margin-left: -96px;
}
.tennis-side-label {
  position: absolute;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0,0,0,0.28);
}
.tennis-side-label.top {
  top: 50%;
  left: 72px;
}
.tennis-side-label.bottom {
  right: 72px;
  bottom: 50%;
}
.volleyball-shared-court {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.30);
  border-radius: 8px;
  background: #66b046;
}
.volleyball-shared-court::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 18px;
  bottom: 18px;
  border: 3px solid rgba(255, 255, 255, 0.78);
  background: #264f98;
}
.volleyball-shared-court::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 8px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, rgba(25,25,25,0.95), rgba(55,55,55,0.98), rgba(25,25,25,0.95));
  z-index: 3;
}
.volleyball-court-inner {
  position: relative;
  z-index: 4;
  min-height: 470px;
}
.volleyball-court-inner::before,
.volleyball-court-inner::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  border-top: 3px solid rgba(255, 255, 255, 0.30);
}
.volleyball-court-inner::before { top: 32%; }
.volleyball-court-inner::after { top: 68%; }
.volleyball-side {
  position: absolute;
  left: 8%;
  right: 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.volleyball-side-top { top: 28px; }
.volleyball-side-bottom { bottom: 28px; }
.volleyball-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.volleyball-side-label {
  position: absolute;
  color: rgba(255,255,255,0.9);
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0,0,0,0.32);
}
.volleyball-side-label.top {
  left: 10%;
  top: 4px;
}
.volleyball-side-label.bottom {
  right: 10%;
  bottom: 4px;
}
.fitness-equipment {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 170px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 194, 171, 0.16), transparent 30%),
    rgba(255,255,255,0.045);
}
.fitness-people {
  display: grid;
  gap: 8px;
}
.sport-empty-lineup {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.participants { display: grid; gap: 8px; }
.participant {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.participant span { color: var(--muted); }
.participant-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.participant-badges span {
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 800;
}
.extra-response-bar {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}
.extra-response-bar form {
  margin: 0;
}
.extra-response-btn {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}
.extra-late {
  border-color: rgba(255, 179, 0, 0.46);
  background: rgba(255, 179, 0, 0.11);
}
.extra-transport {
  border-color: rgba(0, 194, 171, 0.46);
  background: rgba(0, 194, 171, 0.10);
}
.extra-early {
  border-color: rgba(124, 92, 255, 0.46);
  background: rgba(124, 92, 255, 0.11);
}
.extra-clear {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(148, 163, 184, 0.10);
}
.extra-response-btn.is-active {
  border-color: rgba(30, 136, 229, 0.42);
  background: rgba(30, 136, 229, 0.12);
  color: var(--blue);
}
.extra-popover {
  position: relative;
}
.extra-popover summary {
  list-style: none;
}
.extra-popover summary::-webkit-details-marker {
  display: none;
}
.extra-popover-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 6px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-strong);
}
.extra-popover-menu button {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
}
.friend-add {
  margin-top: 8px;
}
.friend-add summary {
  list-style: none;
}
.friend-add summary::-webkit-details-marker {
  display: none;
}
.compact-form {
  display: grid;
  gap: 8px;
}
.compact-form p {
  margin: 0;
}
.comment-thread {
  display: grid;
  gap: 10px;
}
.comment-item,
.comment-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}
.comment-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.comment-item strong {
  color: var(--text);
}
.comment-item p {
  margin: 8px 0 0;
}
.comment-form {
  margin-top: 12px;
}
.forum-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 16px;
}
.forum-panel,
.forum-post,
.chat-message,
.console-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.forum-panel h2 {
  margin-top: 0;
}
.forum-list {
  display: grid;
  gap: 10px;
}
.forum-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}
.forum-row span,
.forum-row small {
  min-width: 0;
  display: block;
}
.forum-row small,
.forum-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}
.forum-posts,
.chat-thread {
  display: grid;
  gap: 10px;
}
.forum-post-meta,
.chat-message > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.chat-message.is-mine {
  border-color: rgba(30, 136, 229, 0.36);
  background: rgba(30, 136, 229, 0.08);
}
.chat-message-notice {
  border-color: rgba(255, 179, 0, 0.38);
  background: rgba(255, 179, 0, 0.12);
}
.chat-message-notice p {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}
.typing-indicator {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.forum-row.is-unread {
  border-color: rgba(30, 136, 229, 0.42);
  background: rgba(30, 136, 229, 0.08);
}
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.inline-actions form {
  margin: 0;
}
.console-form {
  display: grid;
  gap: 10px;
  align-content: start;
}
.console-form p {
  margin: 0;
}
.form-shell { max-width: 720px; margin: 0 auto; }
.muted-form-note {
  color: var(--muted);
  font-weight: 700;
  margin: -4px 0 16px;
}
.form-card p { margin: 0 0 16px; }
.event-form-shell {
  max-width: 840px;
}
.event-compact-form {
  display: grid;
  gap: 18px;
}
.event-primary-fields {
  margin-bottom: 0;
}
.event-form-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.event-panel-button {
  min-height: 88px;
  padding: 14px;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-align: left;
  box-shadow: none;
}
:root[data-theme="light"] .event-panel-button {
  background: rgba(16, 24, 40, 0.035);
}
.event-panel-button:hover {
  border-color: rgba(30, 136, 229, 0.55);
  background: rgba(30, 136, 229, 0.1);
}
.event-panel-button strong {
  font-size: 17px;
}
.event-panel-button span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.event-form-actions {
  display: flex;
  justify-content: flex-end;
}
.event-form-actions .btn {
  min-width: 180px;
}
.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: #ff6b6b;
}
.form-field .errorlist {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  color: #ff9b9b;
  font-size: 13px;
  font-weight: 800;
}
.event-form-modal h3 {
  margin: 4px 0 0;
  font-size: 17px;
}
.form-section {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.form-section h2 {
  margin: 0;
  font-size: 20px;
}
.optional-section {
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 82%, var(--blue));
}
.optional-section summary {
  cursor: pointer;
  font-weight: 900;
}
.optional-section[open] summary {
  margin-bottom: 14px;
}
.club-venue-panel {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.club-venue-panel h2 {
  margin-bottom: 4px;
}
.section-kicker {
  margin: 0 0 4px;
  color: #80c8ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.club-venue-modal .profile-modal-body {
  gap: 12px;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}
.form-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 640px) {
  .club-venue-panel {
    grid-template-columns: 1fr;
  }
  .club-venue-panel .btn {
    width: 100%;
  }
  .modal-actions .btn {
    flex: 1 1 180px;
  }
  .form-grid.two {
    grid-template-columns: 1fr;
  }
}

.profile-page {
  display: grid;
  gap: 18px;
}
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.profile-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-avatar {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.profile-avatar-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--teal), var(--blue));
  color: white;
  font-size: 30px;
  font-weight: 900;
}
.profile-identity-text h1 {
  margin: 0 0 4px;
  font-size: clamp(28px, 5vw, 44px);
}
.muted {
  color: var(--muted);
}
.profile-stats-card,
.profile-settings-hub {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}
.profile-stats-head,
.profile-settings-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.profile-stats-head h2,
.profile-settings-heading h2,
.profile-settings-heading p {
  margin: 0;
}
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.profile-stat-box {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}
.profile-stat-value {
  font-size: 28px;
  font-weight: 900;
}
.profile-stat-label {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.profile-setting-row {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}
.profile-setting-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-setting-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}
.profile-setting-row h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.profile-setting-status {
  color: var(--muted);
  font-size: 14px;
}
.profile-setting-action {
  flex: 0 0 auto;
}
.profile-channel-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.profile-channel-summary span {
  padding: 4px 8px;
  border: 1px solid rgba(0, 194, 171, 0.32);
  border-radius: 8px;
  background: rgba(0, 194, 171, 0.08);
  font-size: 12px;
  font-weight: 800;
}
.profile-channel-summary span.is-off {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}
.profile-modal {
  width: min(680px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
  overflow: hidden;
}
:root[data-theme="light"] .profile-modal {
  border-color: rgba(16, 24, 40, 0.16);
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.18);
}
.profile-modal::backdrop {
  background: rgba(2, 8, 18, 0.78);
  backdrop-filter: blur(6px);
}
:root[data-theme="light"] .profile-modal::backdrop {
  background: rgba(16, 24, 40, 0.28);
}
.profile-modal-shell {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 28px);
  background: linear-gradient(180deg, rgba(13, 33, 58, 0.99), rgba(7, 17, 31, 0.99));
}
:root[data-theme="light"] .profile-modal-shell {
  background: rgba(255, 255, 255, 0.98);
}
.profile-modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 33, 58, 0.98);
}
:root[data-theme="light"] .profile-modal-header {
  background: linear-gradient(180deg, rgba(30, 136, 229, 0.1), rgba(255, 255, 255, 0.92));
}
.profile-modal-header h2,
.profile-modal-header p {
  margin: 0;
}
.profile-modal-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}
.profile-modal-close {
  width: 42px;
  min-height: 42px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
:root[data-theme="light"] .profile-modal-close {
  background: rgba(16, 24, 40, 0.05);
}
.profile-modal-body {
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.profile-modal-body p {
  margin: 0;
}
.profile-modal-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.profile-modal-body select,
.profile-modal-body textarea {
  background: rgba(255, 255, 255, 0.06);
}
:root[data-theme="light"] .profile-modal-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
:root[data-theme="light"] .profile-modal-body select,
:root[data-theme="light"] .profile-modal-body textarea {
  background: rgba(16, 24, 40, 0.04);
}
.profile-modal-body ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.profile-modal-body > div[id^="id_"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.profile-modal-body li {
  margin: 0;
}
.profile-modal-body li label,
.profile-modal-body > div[id^="id_"] > div > label {
  min-height: 34px;
  margin: 0;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  line-height: 1.2;
}
:root[data-theme="light"] .profile-modal-body li label,
:root[data-theme="light"] .profile-modal-body > div[id^="id_"] > div > label {
  background: rgba(16, 24, 40, 0.035);
}
.profile-modal-body input[type="checkbox"],
.profile-modal-body input[type="radio"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--blue);
}
.modal-section {
  display: grid;
  gap: 10px;
}
.profile-modal-body .package-actions form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-modal-body .package-actions select {
  min-width: 140px;
}
.profile-sport-summary {
  display: grid;
  gap: 8px;
}
.profile-sport-choice {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}
:root[data-theme="light"] .profile-sport-choice {
  background: rgba(16, 24, 40, 0.04);
}
.profile-sport-choice span {
  color: var(--muted);
  font-size: 13px;
}
.profile-fees-list {
  display: grid;
  gap: 10px;
}
.profile-fees-list h3 {
  margin: 4px 0 0;
  font-size: 17px;
}
.profile-fee-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}
:root[data-theme="light"] .profile-fee-item {
  background: rgba(16, 24, 40, 0.035);
}
.profile-fee-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.profile-fee-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.profile-fee-item.is-compact {
  padding: 10px 12px;
}
body.profile-modal-open {
  overflow: hidden;
}

.bot-widget {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1000;
}
.bot-fab {
  min-width: 78px;
  height: 54px;
  gap: 8px;
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(160deg, #2498ff, #0d63d8);
  color: white;
  box-shadow: 0 18px 40px rgba(30, 136, 229, 0.34);
}
.bot-fab-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.bot-fab-mark img {
  width: 30px;
  height: 22px;
  display: block;
  object-fit: contain;
}
.bot-fab-label {
  font-size: 14px;
  text-transform: uppercase;
}
.bot-widget.is-open .bot-fab {
  display: none;
}
.bot-panel {
  width: min(380px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 104px));
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(7, 17, 31, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(16px);
}
:root[data-theme="light"] .bot-panel {
  border-color: rgba(16, 24, 40, 0.14);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.18);
}
.bot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(30, 136, 229, 0.18), rgba(255, 255, 255, 0.02));
}
:root[data-theme="light"] .bot-head {
  background: linear-gradient(180deg, rgba(30, 136, 229, 0.12), rgba(255, 255, 255, 0.7));
}
.bot-head strong,
.bot-head span {
  display: block;
}
.bot-head span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}
.bot-close {
  width: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}
:root[data-theme="light"] .bot-close {
  background: rgba(16, 24, 40, 0.05);
  color: var(--text);
}
.bot-messages {
  display: grid;
  gap: 10px;
  max-height: 330px;
  overflow-y: auto;
  padding: 14px;
}
.bot-message {
  max-width: 88%;
  white-space: pre-line;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.42;
}
.bot-message-bot {
  justify-self: start;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
:root[data-theme="light"] .bot-message-bot {
  background: rgba(16, 24, 40, 0.06);
}
.bot-message-user {
  justify-self: end;
  background: linear-gradient(180deg, #2498ff, var(--blue));
  color: white;
}
.bot-answer-actions,
.bot-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bot-answer-actions {
  padding: 0 14px 4px;
}
.bot-answer-actions a,
.bot-answer-actions button,
.bot-quick button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
}
:root[data-theme="light"] .bot-answer-actions a,
:root[data-theme="light"] .bot-answer-actions button,
:root[data-theme="light"] .bot-quick button {
  background: rgba(16, 24, 40, 0.04);
}
.bot-quick {
  padding: 0 14px 12px;
}
.bot-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.bot-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
:root[data-theme="light"] .bot-form input {
  background: rgba(16, 24, 40, 0.04);
}
.bot-form input::placeholder {
  color: var(--muted);
}

@media (max-width: 640px) {
  .topbar-inner { align-items: flex-start; flex-direction: column; padding: 12px 0; }
  .navlinks, .top-actions, .searchbar, .filters, .page-title { width: 100%; }
  .top-actions { flex-wrap: wrap; }
  .support-card { align-items: stretch; flex-direction: column; }
  .account-menu { flex: 1; }
  .account-menu summary { width: 100%; justify-content: center; }
  .account-menu-panel { left: 0; right: auto; width: min(260px, 100%); }
  .more-menu-panel { left: 0; width: min(260px, calc(100vw - 36px)); }
  .navlinks { overflow-x: auto; padding-bottom: 2px; }
  .hero { min-height: 420px; padding: 28px 0; }
  .detail { grid-template-columns: 1fr; }
  .forum-grid { grid-template-columns: 1fr; }
  .participant { flex-direction: column; }
  .quick-filters { grid-template-columns: 1fr; }
  .profile-header,
  .profile-setting-row,
  .profile-sport-choice {
    align-items: stretch;
    flex-direction: column;
  }
  .bot-widget { right: 10px; bottom: 10px; }
  .floating-hint { display: none; }
  .install-banner {
    left: 10px;
    right: 10px;
    bottom: max(72px, calc(env(safe-area-inset-bottom) + 72px));
    width: auto;
    grid-template-columns: 1fr;
    transform: none;
  }
  .install-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .support-floating {
    left: 10px;
    bottom: 10px;
    min-height: 46px;
    padding: 0 12px;
  }
  .support-floating span:last-child {
    display: none;
  }
  .bot-panel { max-height: calc(100vh - 92px); }
  .bot-fab { min-width: 64px; height: 50px; }
  .bot-fab-label { display: none; }
  .event-form-panels {
    grid-template-columns: 1fr;
  }
  .event-form-actions .btn {
    width: 100%;
  }
  .lineup-surface-inner {
    min-height: 360px;
    padding: 36px 8px 12px;
    gap: 6px;
  }
  .lineup-row {
    gap: 4px;
    padding-inline: 4px;
  }
  .lineup-group {
    gap: 4px;
  }
  .player-badge {
    width: 82px;
    padding: 3px 5px 4px;
    border-radius: 10px;
  }
  .chip-name,
  .pos-label {
    font-size: 0.70rem;
    line-height: 1.02;
  }
  .lineup-row-wide5 .player-badge {
    width: 68px;
    min-width: 50px;
    max-width: 68px;
  }
}

@media (min-width: 641px) and (max-width: 860px) {
  .container { padding: 0 12px; }
  .topbar-inner { gap: 8px; flex-wrap: wrap; padding: 10px 0; }
  .brand { min-width: 142px; }
  .brand-mark { width: 148px; }
  .navlinks { order: 3; flex: 0 0 100%; gap: 2px; overflow-x: auto; }
  .navlinks a, .icon-btn { padding: 8px 7px; font-size: 14px; }
  .top-actions { gap: 6px; margin-left: auto; }
  .btn, button { padding: 0 10px; }
  .lineup-row {
    gap: 6px;
    padding-inline: 8px;
  }
  .lineup-group {
    gap: 6px;
  }
  .player-badge {
    width: 96px;
    padding: 4px 6px 5px;
    border-radius: 11px;
  }
  .chip-name,
  .pos-label {
    font-size: 0.72rem;
  }
  .lineup-row-wide5 .player-badge {
    width: 78px;
    min-width: 58px;
    max-width: 78px;
  }
}
