/* Pixel-oriented visual layer based on the approved match-management reference. */
:root {
  --ref-page: #1d2129;
  --ref-panel: #292e37;
  --ref-control: #373d47;
  --ref-control-hover: #414852;
  --ref-border: #454b55;
  --ref-divider: #3a4049;
  --ref-text: #f5f6f7;
  --ref-muted: #a1a8b2;
  --ref-faint: #737b86;
  --ref-green: #43c86d;
  --ref-green-dark: #24643c;
  --ref-orange: #ff7828;
  --ref-blue: #3f8df5;
  --ref-red: #ef5b62;
}

html,
body {
  color: var(--ref-text);
  background: var(--ref-page);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", sans-serif;
}

button,
input,
select {
  font-family: inherit;
  letter-spacing: 0;
}

.app-shell {
  width: min(100%, 560px);
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(86px + env(safe-area-inset-bottom));
}

.app-commandbar {
  grid-template-columns: 40px minmax(0, 1fr) 54px;
  gap: 8px;
  min-height: 48px;
  margin-bottom: 8px;
}

.command-back {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 6px;
  color: #aeb5be;
  background: #343a44;
}

.command-back svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.7;
}

.command-title .eyebrow {
  margin-bottom: 3px;
  color: #aeb4bc;
  font-size: 10px;
  font-weight: 450;
}

.command-title h1 {
  font-size: 20px;
  font-weight: 750;
  line-height: 1.05;
}

.command-role {
  width: auto;
  min-width: 49px;
  height: 23px;
  padding: 0 7px;
  justify-self: end;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: #505660;
  font-size: 10px;
  font-weight: 650;
}

/* The profile is intentionally a thin utility strip, not a second hero. */
.status-panel--compact {
  min-height: 58px;
  margin: 0 0 8px;
  padding: 7px 10px;
  border: 1px solid var(--ref-border);
  border-radius: 7px;
  background: #252a32;
  box-shadow: none;
}

.status-panel--compact .section-heading,
.status-panel--compact .match-info-alert {
  display: none;
}

.status-panel--compact .profile-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 42px;
}

.status-panel--compact .avatar {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #15191f;
  background: #d8dce1;
  font-size: 10px;
}

.status-panel--compact .profile-row > div:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.status-panel--compact .profile-row strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-panel--compact .profile-row span {
  color: var(--ref-muted);
  font-size: 9px;
}

.status-panel--compact .status-metrics {
  display: flex;
  gap: 4px;
  min-width: 0;
}

.status-panel--compact .rating-shortcut {
  display: flex;
  gap: 3px;
  align-items: baseline;
  min-width: 0;
  min-height: 29px;
  padding: 4px 6px;
  border: 1px solid var(--ref-border);
  border-radius: 5px;
  background: #343a44;
}

.status-panel--compact .rating-shortcut span {
  font-size: 8px;
}

.status-panel--compact .rating-shortcut b {
  color: #fff;
  font-size: 11px;
}

.match-workspace {
  overflow: visible;
  padding: 9px;
  border: 1px solid var(--ref-border);
  border-radius: 7px;
  background: var(--ref-panel);
  box-shadow: none;
}

.match-workspace::after {
  display: none;
}

.match-status-tools {
  grid-template-columns: minmax(0, 1fr) 38px 38px 38px;
  gap: 5px;
}

.match-status-tools .status-pill {
  justify-content: flex-start;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: #f7fff9;
  background: var(--ref-green);
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
}

.match-status-tools .status-pill::before {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #198043;
  background: #e3f8e9;
  content: "✓";
  font-size: 10px;
  font-weight: 900;
}

.match-edit-button,
.match-settings-button,
.match-save-button {
  width: 38px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--ref-control);
  box-shadow: none;
}

.match-edit-button {
  order: 1;
}

.match-settings-button {
  order: 2;
}

.match-save-button {
  order: 3;
}

.match-edit-button svg,
.match-settings-button svg,
.match-save-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.match-save-button {
  color: #78818c;
}

.match-save-button.is-visible {
  color: #e8f8ed;
  background: #3c6850;
}

.match-title-row {
  margin-top: 12px;
}

.card-kicker {
  margin-bottom: 4px;
  color: #aeb5bf;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}

.editable-match-title h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 780;
  line-height: 1.08;
}

.match-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px 12px;
  margin-top: 7px;
}

.match-facts button {
  min-width: 0;
  min-height: 20px;
  padding: 0;
  border: 0;
  color: #eff1f3;
  background: transparent;
  font-size: 11px;
  font-weight: 500;
}

.match-facts button:nth-child(3),
.match-facts button:nth-child(4) {
  grid-column: 1 / -1;
}

.match-facts button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: #9da5af;
  stroke-width: 2.2;
}

.match-facts button b {
  overflow: hidden;
  font-size: 11px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-payment-line {
  min-height: 34px;
  margin-top: 5px;
}

.pay-details-button {
  min-height: 29px;
  padding: 5px 9px;
  border: 0;
  border-radius: 6px;
  color: #f4f5f6;
  background: var(--ref-control);
  box-shadow: none;
}

.pay-details-button svg {
  width: 15px;
  height: 15px;
  color: #c5cbd2;
}

.pay-details-button strong {
  font-size: 10px;
}

.pay-details-button small {
  display: none;
}

.paid-progress {
  color: var(--ref-green);
  font-size: 11px;
  font-weight: 500;
}

.action-grid {
  gap: 7px;
  margin-top: 7px;
}

.toggle-action {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr 38px;
  gap: 7px;
  align-items: center;
  min-height: 39px;
  padding: 4px 6px 4px 8px;
  border: 1px solid #6a4548;
  border-radius: 6px;
  color: #f2f3f4;
  background: rgba(125, 48, 53, 0.14);
}

.toggle-action.is-active {
  border-color: #3aa861;
  background: rgba(35, 132, 69, 0.2);
}

.toggle-action__dot {
  position: static;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #8f969f;
  background: #424851;
}

.toggle-action__dot::after {
  display: none !important;
}

.toggle-action__dot svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.toggle-action.is-active .toggle-action__dot {
  color: #216f3c;
  background: var(--ref-green);
}

.toggle-action::after {
  position: absolute;
  top: 50%;
  right: 7px;
  display: block;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #59616b;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
  content: "";
  transform: translateY(-50%);
}

.toggle-action::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 24px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e9ebed;
  content: "";
  transform: translateY(-50%);
  transition: right 0.15s ease;
}

.toggle-action.is-active::after {
  background: var(--ref-green);
}

.toggle-action.is-active::before {
  right: 9px;
}

.toggle-action strong {
  font-size: 12px;
  font-weight: 700;
}

.toggle-action small {
  display: none;
}

.player-registration-note {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  margin-top: 7px;
  padding: 6px 9px;
  border-radius: 6px;
  background: var(--ref-control);
}

.player-registration-note__icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #535b65;
  background: #c7cbd0;
}

.player-registration-note__icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.player-registration-note > span:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.player-registration-note strong {
  font-size: 12px;
  font-weight: 650;
}

.player-registration-note small {
  overflow: hidden;
  color: var(--ref-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-registration-note > b {
  display: flex;
  gap: 4px;
  align-items: center;
  color: var(--ref-green);
  font-size: 10px;
  font-weight: 550;
}

.player-registration-note > b.is-unpaid {
  color: var(--ref-red);
}

.player-registration-note > b svg {
  width: 15px;
  height: 15px;
}

.roster-summary-toggle {
  min-height: 38px;
  margin: 8px 0 5px;
  padding: 3px;
  border: 1px solid var(--ref-border);
  border-radius: 6px;
  background: #252a32;
  box-shadow: none;
}

.roster-summary-toggle > span {
  display: flex;
  gap: 5px;
  justify-content: center;
  align-items: center;
  height: 30px;
  color: #dadde1;
  font-size: 11px;
  white-space: nowrap;
}

.roster-summary-toggle > span:first-child {
  border-radius: 5px;
  background: var(--ref-control);
}

.roster-summary-toggle em {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #f0f2f4;
  background: transparent;
}

.roster-summary-toggle em svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.3;
}

.roster-summary-toggle b {
  font-size: 12px;
}

.roster-summary-toggle > svg {
  width: 14px;
  height: 14px;
  color: #8d959f;
}

.home-breakdowns {
  gap: 2px;
}

.breakdown-card {
  padding: 4px 0;
}

.breakdown-card + .breakdown-card {
  border-top: 0;
}

.breakdown-card__head {
  min-height: 20px;
  margin-bottom: 3px;
}

.breakdown-card__head strong {
  font-size: 11px;
  font-weight: 650;
}

.breakdown-card__head span {
  min-width: 20px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  color: #1c2027;
  background: #d6d9dd;
  font-size: 9px;
}

.compact-roster-pills {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.player-pill {
  grid-template-columns: 20px minmax(0, 1fr) 15px;
  gap: 4px;
  height: 28px;
  padding: 3px 5px;
  border: 0;
  border-radius: 5px;
  color: #f5f6f7;
  background: var(--ref-control);
  box-shadow: none;
}

.player-pill__avatar {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  font-size: 6px;
}

.player-pill .player-pill__name {
  font-size: 9px;
  font-weight: 540;
}

.player-pill b {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  color: #22633a;
  background: #50ce79;
  font-size: 8px;
}

.team-distribution-launch {
  justify-content: flex-start;
  min-height: 40px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--ref-divider);
  border-radius: 0;
  color: #f4f5f6;
  background: transparent;
  font-size: 16px;
}

.team-distribution-launch svg {
  width: 19px;
  height: 19px;
  color: var(--ref-orange);
}

.team-distribution-panel {
  padding: 8px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.team-distribution-head strong {
  font-size: 17px;
}

.team-distribution-head span,
.distribution-team-count {
  color: var(--ref-muted);
  font-size: 10px;
}

.team-distribution-head button,
.distribution-team-count button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  color: #d4d8dd;
  background: var(--ref-control);
}

.team-distribution-head svg,
.distribution-team-count svg {
  width: 15px;
  height: 15px;
}

.distribution-pool,
.distribution-team {
  padding: 7px;
  border: 1px solid var(--ref-border);
  border-radius: 6px;
  background: #252a32;
}

.distribution-zone-title strong {
  font-size: 11px;
}

.distribution-team .distribution-zone-title strong {
  display: flex;
  gap: 6px;
  align-items: center;
}

.team-distribution-random,
.team-distribution-save {
  min-height: 39px;
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
}

.team-distribution-random {
  color: #f0f2f4;
  background: var(--ref-control);
}

.team-distribution-save {
  color: #fff;
  background: var(--ref-orange);
}

/* Final mobile interaction pass: stable editing, consistent controls and no accidental zoom/drag. */
html,
body,
button,
a {
  touch-action: manipulation;
}

.command-edit-actions {
  display: none;
  grid-template-columns: minmax(0, 1fr) 28px 28px;
  gap: 5px;
  align-items: center;
  justify-self: end;
  min-width: 178px;
}

.command-edit-actions.is-visible {
  display: grid;
}

.command-edit-actions > span {
  overflow: hidden;
  color: #f0f2f4;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-edit-actions button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  color: #e5e8eb;
  background: linear-gradient(180deg, #4b525d, #343a43);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.command-edit-actions button.is-save {
  color: #fff;
  border-color: rgba(67, 200, 109, 0.7);
  background: linear-gradient(180deg, #45c873, #278f4c);
}

.command-edit-actions svg {
  width: 15px;
  height: 15px;
}

.is-home-editing .app-commandbar {
  grid-template-columns: 40px minmax(0, 1fr) minmax(178px, auto);
}

.is-home-editing .command-role {
  display: none;
}

.is-team-distribution-focused .command-back {
  visibility: hidden;
}

.is-home-editing .command-title {
  min-width: 0;
  overflow: hidden;
}

.is-home-editing .command-title h1 {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-team-distribution-focused .status-panel--compact {
  display: none;
}

.is-team-distribution-focused .match-workspace > :not(.team-distribution-panel) {
  display: none !important;
}

.is-team-distribution-focused .match-workspace {
  margin-top: 0;
  padding: 8px;
}

.is-team-distribution-focused .team-distribution-panel {
  margin-top: 0;
  padding-top: 0;
}

.toggle-action,
.toggle-action.is-active {
  min-height: 42px;
  padding-top: 6px;
  padding-bottom: 6px;
  align-content: center;
}

.toggle-action strong {
  align-self: center;
  padding: 2px 0 0;
  font-size: 11px;
  line-height: 1;
  transform: translateY(3px);
}

.toggle-action small {
  align-self: center;
  font-size: 9px;
  line-height: 1;
  transform: translateY(1px);
}

.status-pill,
.pay-details-button strong,
.match-admin-actions button,
.match-admin-actions button > span,
.roster-summary-toggle > span {
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 0;
}

.roster-summary-toggle {
  grid-template-columns: repeat(3, minmax(0, 1fr)) 28px;
  padding-right: 10px;
}

.roster-summary-toggle > span {
  gap: 4px;
}

.roster-summary-toggle b {
  font-size: 11px !important;
  line-height: 1;
}

.roster-summary-toggle > svg:last-child {
  justify-self: center;
  margin: 0;
}

.breakdown-card__head span {
  width: 18px;
  height: 18px;
  padding: 0;
  line-height: 1;
}

.editable-match-title,
.match-title-row > div {
  box-sizing: border-box;
  width: 100%;
}

.team-distribution-launch {
  grid-template-columns: 22px minmax(0, 1fr) 22px;
  padding-right: 13px;
  padding-left: 13px;
}

.team-distribution-panel {
  scroll-margin-top: calc(env(safe-area-inset-top) + 66px);
}

.team-distribution-head__actions button.is-save {
  color: #fff;
  border-color: rgba(67, 200, 109, 0.7);
  background: linear-gradient(180deg, #45c873, #278f4c);
}

.team-distribution-head {
  top: calc(env(safe-area-inset-top) + 62px);
  margin-bottom: 7px;
}

.distribution-kit-button {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
}

.is-team-distribution-focused .player-pill[draggable="true"] {
  touch-action: none;
}

.match-edit-button,
.match-settings-button,
.match-save-button,
.pay-details-button,
.roster-summary-toggle,
.team-distribution-launch,
.match-admin-actions button {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.18);
}

@media (max-width: 430px) {
  .is-home-editing .app-commandbar {
    grid-template-columns: 34px minmax(88px, 1fr) minmax(154px, auto);
    gap: 5px;
  }

  .command-edit-actions {
    grid-template-columns: minmax(0, 1fr) 27px 27px;
    min-width: 154px;
  }

  .command-edit-actions > span {
    font-size: 9px;
  }

  .roster-summary-toggle > span,
  .roster-summary-toggle > span:nth-child(3) {
    font-size: 9px !important;
  }
}

/* Payment sheet. */

[data-payment-target-short] {
  display: none !important;
}

.match-result-scoreline > span {
  display: grid;
  grid-template-rows: 30px auto;
  justify-items: center;
  align-content: center;
  gap: 5px;
}

.match-result-scoreline > span small {
  line-height: 1.1;
}

.payment-popover {
  position: relative;
  width: min(calc(100% - 28px), 360px);
  gap: 12px;
  padding: 20px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: linear-gradient(160deg, #3b424c, #292f37 62%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.payment-popover .modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: #444b55;
}

.payment-popover .modal-close svg {
  width: 15px;
  height: 15px;
}

.payment-popover__icon {
  width: 48px;
  height: 48px;
  color: #123120;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 7px 18px rgba(50, 171, 101, 0.22);
}

.payment-popover__icon svg {
  width: 23px;
  height: 23px;
}

.payment-popover header {
  display: grid;
  gap: 2px;
  text-align: center;
}

.payment-popover header small,
.payment-recipient small,
.payment-phone-copy small,
.payment-copy-hint {
  color: #9da6b1;
  font-size: 9px;
}

.payment-popover header strong {
  font-size: 18px;
}

.payment-recipient,
.payment-phone-copy {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: linear-gradient(145deg, #414852, #343a43);
}

.payment-recipient {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.payment-recipient strong {
  font-size: 13px;
}

.payment-phone-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  padding: 9px 10px 9px 12px;
  color: #f7f8f9;
  text-align: left;
}

.payment-phone-copy > span {
  display: grid;
  gap: 3px;
}

.payment-phone-copy strong {
  font-size: 16px;
}

.payment-phone-copy > svg {
  width: 18px;
  height: 18px;
  justify-self: center;
  color: #79dca4;
}

.payment-copy-hint {
  margin-top: -5px;
}

/* Match card refinements: compact status, two team columns and a centered final result. */
.match-status-tools .status-pill {
  width: auto;
  min-width: 132px;
  max-width: 190px;
  justify-self: start;
  padding-right: 14px;
  padding-left: 14px;
}

.player-registration-note {
  display: none !important;
}

.assigned-team-card .compact-roster-pills,
.distribution-team .distribution-player-list {
  grid-template-columns: minmax(0, 1fr) !important;
}

.player-pill.is-current-player {
  border: 2px solid rgba(112, 239, 162, 0.94) !important;
  background: linear-gradient(180deg, rgba(62, 168, 105, 0.32), rgba(32, 101, 66, 0.24)) !important;
  box-shadow: inset 0 1px 0 rgba(160, 255, 199, 0.2), 0 0 0 1px rgba(78, 205, 132, 0.18), 0 0 10px rgba(54, 193, 111, 0.14);
}

.match-result-preview {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1.4fr) minmax(130px, 0.8fr);
  gap: 8px;
  align-items: stretch;
  margin-top: 9px;
  padding: 8px;
  text-align: center;
}

.match-result-scoreline {
  min-height: 82px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.1);
}

.match-result-scoreline > span {
  flex-direction: column;
}

.match-result-scoreline .kit-icon {
  width: 28px;
  height: 25px;
}

.match-result-scoreline strong {
  font-size: 28px;
  line-height: 1;
}

.match-result-mvp {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 209, 102, 0.28) !important;
  border-radius: 6px;
  color: #f5f7f8;
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.11), rgba(255, 209, 102, 0.035)) !important;
}

.match-result-mvp > small {
  color: #ffd166;
  font-size: 9px;
  text-transform: uppercase;
}

[data-home-result-mvp-leaders] {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

[data-home-result-mvp-leaders][data-count="2"] .result-mvp-avatar,
[data-home-result-mvp-leaders][data-count="3"] .result-mvp-avatar {
  width: 31px;
  height: 31px;
}

[data-home-result-mvp-leaders][data-count="3"] {
  gap: 4px;
}

[data-home-result-mvp-leaders][data-count="3"] .result-mvp-person b {
  max-width: 54px;
  font-size: 8px;
}

.result-mvp-person {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 3px;
}

.result-mvp-avatar {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 209, 102, 0.7);
  border-radius: 50%;
  background: #3c4148;
  font-size: 9px;
}

.result-mvp-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-mvp-person b {
  max-width: 95px;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-detail-navigation {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 5px;
}

.calendar-detail-navigation.is-visible {
  display: grid;
}

.calendar-detail-navigation button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  color: #e8ebee;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(0, 0, 0, 0.08));
  font-size: 9px;
  font-weight: 700;
}

.calendar-detail-navigation button:disabled {
  opacity: 0.32;
}

.calendar-detail-navigation svg {
  width: 13px;
  height: 13px;
}

.payment-popover {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.payment-popover__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: #112019;
  background: linear-gradient(180deg, #77dfa7, #42b878);
}

.payment-popover [data-payment-details] {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #e9ecef;
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 430px) {
  .match-result-preview {
    grid-template-columns: minmax(0, 1.3fr) minmax(112px, 0.7fr);
  }

  .calendar-detail-navigation {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .calendar-detail-navigation button {
    padding: 0 5px;
    font-size: 8px;
  }
}

.team-distribution-random svg,
.team-distribution-save svg {
  width: 16px;
  height: 16px;
}

.kit-icon {
  width: 35px;
  height: 33px;
  border: 0;
  border-radius: 0;
  clip-path: polygon(20% 0, 36% 0, 41% 9%, 59% 9%, 64% 0, 80% 0, 100% 23%, 83% 41%, 79% 35%, 79% 100%, 21% 100%, 21% 35%, 17% 41%, 0 23%);
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.35));
  box-shadow: inset 0 -7px 0 rgba(0, 0, 0, 0.13), inset 0 2px 0 rgba(255, 255, 255, 0.22);
}

.kit-icon::after {
  position: absolute;
  left: 38%;
  top: 0;
  width: 24%;
  height: 7px;
  border-radius: 0 0 8px 8px;
  background: rgba(36, 40, 47, 0.72);
  content: "";
}

.kit-icon--tiny {
  width: 20px;
  height: 19px;
}

.teams-preview-toggle {
  min-height: 29px;
  margin-top: 8px;
  border: 1px solid var(--ref-border);
  background: var(--ref-control);
}

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

.team-column {
  border: 1px solid var(--ref-border);
  border-radius: 6px;
  background: #30353e;
}

.team-column__head {
  grid-template-columns: 40px 1fr;
  min-height: 38px;
}

.team-column__head strong {
  font-size: 12px;
}

.team-column__head small {
  color: var(--ref-muted);
  font-size: 9px;
}

.match-admin-actions {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--ref-divider);
}

.match-admin-actions button {
  display: grid;
  grid-template-rows: 21px auto;
  gap: 3px;
  min-height: 54px;
  padding: 6px 2px;
  border: 1px solid var(--ref-border);
  border-radius: 6px;
  color: #e6e9ec;
  background: #262b33;
  font-size: 8px;
  line-height: 1.1;
}

.match-admin-actions button svg {
  width: 19px;
  height: 19px;
  margin: 0 auto;
  color: #aeb5be;
  stroke-width: 1.9;
}

.match-admin-actions button.is-danger {
  color: var(--ref-red);
  background: rgba(122, 46, 51, 0.2);
}

.match-admin-actions button.is-danger svg {
  color: var(--ref-red);
}

.match-outcome-grid {
  gap: 6px;
  margin-top: 7px;
}

.match-outcome-card {
  min-height: 82px;
  padding: 7px;
  border: 1px solid var(--ref-border);
  border-radius: 6px;
  background: #30353e;
}

.match-outcome-card > small {
  color: var(--ref-muted);
  font-size: 9px;
}

.match-outcome-card > strong,
.match-outcome-card--mvp strong {
  font-size: 11px;
}

.match-outcome-card button {
  min-height: 29px;
  border-radius: 5px;
  background: var(--ref-control);
  font-size: 9px;
}

.mini-mvp-avatar {
  color: #fff;
  background: var(--ref-orange);
}

.mini-mvp-avatar svg {
  width: 13px;
  height: 13px;
}

.bottom-nav {
  left: 50%;
  width: min(100%, 560px);
  gap: 0;
  padding: 5px 10px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--ref-divider);
  background: rgba(31, 35, 43, 0.98);
  box-shadow: none;
  transform: translateX(-50%);
}

.bottom-nav button {
  gap: 3px;
  min-height: 48px;
  padding: 3px;
  border-radius: 0;
  color: #8d949e;
  background: transparent !important;
  font-size: 9px;
  font-weight: 500;
}

.bottom-nav button svg {
  width: 21px;
  height: 21px;
  color: #8d949e;
  stroke-width: 2.25;
}

.bottom-nav button.is-active {
  color: #fff;
}

.bottom-nav button.is-active svg {
  color: #fff;
  fill: none;
}

.bottom-nav button[data-nav="rating"].is-active svg {
  fill: none;
}

.role-popover {
  border: 1px solid var(--ref-border);
  border-radius: 7px;
  background: var(--ref-panel);
}

.role-choice button {
  border: 1px solid var(--ref-border);
  border-radius: 6px;
  background: var(--ref-control);
}

.role-choice button.is-active {
  border-color: var(--ref-green);
  background: rgba(67, 200, 109, 0.15);
}

@media (max-width: 430px) {
  .app-shell {
    padding-right: 9px;
    padding-left: 9px;
  }

  .app-commandbar {
    grid-template-columns: 38px minmax(0, 1fr) 50px;
  }

  .command-title h1 {
    font-size: 18px;
  }

  .status-panel--compact .profile-row {
    grid-template-columns: 31px minmax(0, 1fr) auto;
  }

  .status-panel--compact .rating-shortcut span {
    display: none;
  }

  .editable-match-title h2 {
    font-size: 23px;
  }

  .match-status-tools {
    grid-template-columns: minmax(0, 1fr) 35px 35px 35px;
  }

  .match-edit-button,
  .match-settings-button,
  .match-save-button {
    width: 35px;
  }

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

  .player-pill {
    padding: 3px;
  }

  .player-pill .player-pill__name {
    font-size: 8px;
  }

  .match-admin-actions {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 365px) {
  .compact-roster-pills,
  .distribution-pool .distribution-player-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

/* Main workspace polish: stable, compact and touch-friendly. */
.status-panel--compact,
.match-workspace {
  background: linear-gradient(155deg, #303640 0%, #272c34 66%, #242930 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 10px 28px rgba(0, 0, 0, 0.22);
}

.status-panel--compact .rating-shortcut {
  display: grid;
  grid-template-rows: 13px 16px;
  align-content: center;
  width: 68px;
  min-height: 38px;
  padding: 4px 6px;
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, #3b424d, #2e343d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 3px 8px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.status-panel--compact .rating-shortcut span {
  display: flex;
  gap: 3px;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
}

.status-panel--compact .rating-shortcut span svg {
  width: 11px;
  height: 11px;
}

.status-panel--compact .rating-shortcut--stars span svg,
.status-panel--compact .rating-shortcut--stars b {
  color: #ffd166;
}

.match-facts button {
  gap: 6px;
}

.pay-details-button {
  justify-content: center;
  gap: 7px;
  padding-right: 13px;
  padding-left: 13px;
}

.status-pill--closed {
  color: #e1e4e8 !important;
  background: linear-gradient(180deg, #626a74, #4d545d) !important;
}

.status-pill--finished {
  color: #eef1f4 !important;
  border-color: #69717b !important;
  background: linear-gradient(180deg, #626a74, #474e57) !important;
}

.is-finished-match [data-player-actions],
.is-finished-match .player-registration-note,
.is-finished-match .team-distribution-launch,
.is-finished-match [data-team-distribution-panel] {
  display: none !important;
}

.match-result-preview {
  min-width: 170px;
  gap: 6px;
  text-align: center;
}

.match-result-scoreline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.match-result-scoreline > span {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.match-result-preview > button {
  display: grid;
  gap: 1px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: #f5f7f8;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(0, 0, 0, 0.08));
}

.home-mvp-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(255, 209, 102, 0.28);
  border-radius: 6px;
  background: rgba(255, 209, 102, 0.045);
}

.home-mvp-result {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px;
  color: #f5f7f8;
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.home-mvp-result.is-leader {
  border-color: rgba(255, 209, 102, 0.55);
  background: rgba(255, 209, 102, 0.1);
}

.home-mvp-result span,
.home-mvp-result strong,
.home-mvp-result small {
  display: block;
  min-width: 0;
}

.home-mvp-result strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-mvp-result small {
  color: var(--muted);
  font-size: 9px;
}

.home-mvp-result > svg {
  width: 13px;
  height: 13px;
  color: #ffd166;
}

.team-distribution-reset {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #e5e8eb;
  background: transparent;
  font-size: 11px;
  font-weight: 650;
}

.distribution-substitutions {
  margin-top: 7px;
  padding: 7px;
  border: 1px dashed rgba(255, 209, 102, 0.45);
  border-radius: 6px;
  background: rgba(255, 209, 102, 0.06);
}

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

.assigned-team-card {
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.assigned-team-card .breakdown-card__head strong {
  display: flex;
  gap: 5px;
  align-items: center;
}

@media (max-width: 430px) {
  .match-result-preview {
    min-width: 145px;
  }

  .match-result-scoreline small {
    font-size: 8px;
  }
}

.toggle-action strong {
  grid-column: 2;
  overflow: visible;
  white-space: nowrap;
}

.toggle-action.is-negative .toggle-action__dot {
  color: #fff;
  background: #e05b64;
}

.toggle-action.is-free {
  grid-template-columns: 20px 1fr;
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, #393f48, #30363e);
}

.toggle-action.is-free::before,
.toggle-action.is-free::after {
  display: none;
}

.toggle-action.is-free .toggle-action__dot {
  color: #1e5c35;
  background: var(--ref-green);
}

.roster-summary-toggle {
  overflow: hidden;
  gap: 0;
  padding: 0;
  background: linear-gradient(180deg, #343a43, #2c3139);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.roster-summary-toggle > span,
.roster-summary-toggle > span:first-child {
  border-radius: 0;
  background: transparent;
}

.roster-summary-toggle > span + span {
  border-left: 1px solid rgba(255, 255, 255, 0.075);
}

.roster-summary-toggle.is-active {
  margin-bottom: 0;
  border-color: rgba(67, 200, 109, 0.48);
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(56, 122, 77, 0.62), rgba(39, 82, 53, 0.62));
}

.home-breakdowns {
  overflow: hidden;
  margin-top: 0;
  padding: 6px;
  border: 1px solid rgba(67, 200, 109, 0.35);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #252a32;
}

.compact-roster-pills,
.distribution-pool .distribution-player-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.player-pill {
  width: 100%;
  height: 31px;
  padding: 4px 7px;
  background: linear-gradient(145deg, #414852, #353b44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 5px rgba(0, 0, 0, 0.15);
}

.player-pill .player-pill__name {
  font-size: 10px;
}

.distribution-team .distribution-player-list,
.team-column__players {
  grid-template-columns: 1fr;
}

.distribution-team .player-pill,
.team-column__players .player-pill {
  width: 100%;
}

.match-admin-actions button {
  background: linear-gradient(145deg, #303640, #252a31);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.bottom-nav button.is-active,
.bottom-nav button.is-active svg {
  color: #fff;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.22));
}

.is-editing-match [data-edit-field] {
  position: relative;
  outline: 0 !important;
  outline-offset: 0;
}

.popup-score-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.popup-score-editor > b {
  padding-bottom: 12px;
  color: var(--ref-muted);
  text-align: center;
}

/* Calendar, focused settings and touch-safe roster interactions. */
.player-pill {
  touch-action: pan-y !important;
  -webkit-user-drag: none;
  user-select: none;
}

.is-team-distribution-focused .player-pill[draggable="true"] {
  touch-action: none !important;
}

.player-pill__avatar,
.status-panel--compact .avatar,
.avatar,
.roster-avatar {
  display: grid;
  place-items: center;
  line-height: 1;
  text-align: center;
}

.profile-copy {
  min-width: 0;
}

.community-chat-link {
  display: inline-flex;
  max-width: 100%;
  gap: 5px;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: #f4f5f6;
  background: linear-gradient(180deg, #424954, #333943);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 3px 8px rgba(0, 0, 0, 0.16);
}

.community-chat-link strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-chat-link svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: var(--ref-green);
}

.command-edit-actions {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  gap: 7px;
  justify-self: stretch;
  padding: 7px;
  border: 1px solid rgba(245, 95, 105, 0.7);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(110, 36, 44, 0.96), rgba(64, 31, 37, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 18px rgba(0, 0, 0, 0.24);
}

.command-edit-actions > span {
  display: grid;
  gap: 1px;
  font-size: 12px;
  line-height: 1.1;
}

.command-edit-actions > span small {
  color: #f2a6ac;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

.command-edit-actions button {
  width: 34px;
  height: 34px;
}

.is-home-editing .app-commandbar {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
}

.is-home-editing .command-role {
  display: grid !important;
}

.is-home-editing .status-panel--compact .section-heading,
.is-home-editing .status-panel--compact .profile-row,
.is-home-editing .status-panel--compact .match-info-alert {
  display: none;
}

.is-home-editing .status-panel--compact {
  min-height: 52px;
  padding: 6px;
  border-color: rgba(245, 95, 105, 0.5);
}

.match-card-mount {
  display: contents;
}

.is-home-settings-focused .status-panel--compact {
  display: none;
}

.is-home-settings-focused .match-workspace > :not(.home-quick-settings) {
  display: none !important;
}

.is-home-settings-focused .match-workspace {
  margin-top: 0;
  padding: 8px;
  background: linear-gradient(155deg, #303640, #252a31);
}

.match-settings-workspace {
  display: none;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.match-settings-workspace.is-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
}

.match-settings-head {
  position: sticky;
  z-index: 5;
  top: calc(env(safe-area-inset-top) + 61px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: linear-gradient(145deg, #454c57, #333943);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.match-settings-head > div {
  display: grid;
  gap: 2px;
}

.match-settings-head small,
.match-settings-head strong {
  letter-spacing: 0;
}

.match-settings-head small {
  color: var(--ref-muted);
  font-size: 8px;
  text-transform: uppercase;
}

.match-settings-head strong {
  font-size: 15px;
}

.match-settings-head button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  color: #f0f2f4;
  background: linear-gradient(180deg, #555d68, #3b424c);
}

.match-settings-head svg {
  width: 16px;
  height: 16px;
}

.settings-group {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: linear-gradient(155deg, #303640, #292e36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 5px 12px rgba(0, 0, 0, 0.17);
}

.settings-group h3 {
  margin: 0 0 2px;
  color: #f2f3f5;
  font-size: 11px;
}

.settings-toggle,
.settings-stepper,
.settings-field,
.settings-command {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: linear-gradient(145deg, #3c434d, #323841);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.settings-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  color: #f1f3f4;
  text-align: left;
}

.settings-toggle > span:first-child,
.settings-stepper > span,
.settings-field > span {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 2px 6px;
  align-items: center;
}

.settings-toggle svg,
.settings-stepper svg,
.settings-field svg {
  grid-row: 1 / span 2;
  width: 15px;
  height: 15px;
  color: var(--ref-muted);
}

.settings-toggle b,
.settings-stepper b,
.settings-field b {
  font-size: 10px;
}

.settings-toggle small,
.settings-stepper small {
  color: var(--ref-muted);
  font-size: 8px;
}

.settings-toggle.is-on {
  border-color: rgba(67, 200, 109, 0.42);
  background: linear-gradient(145deg, rgba(47, 101, 65, 0.92), rgba(38, 73, 49, 0.92));
}

.settings-toggle.is-on .mini-switch {
  background: var(--ref-green);
}

.settings-field {
  display: grid;
  gap: 7px;
  padding: 8px;
}

.settings-field input,
.settings-field textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: #f3f4f5;
  background: #242a31;
  font: inherit;
}

.settings-field input {
  height: 34px;
  padding: 0 9px;
}

.settings-field textarea {
  min-height: 72px;
  padding: 8px 9px;
  resize: vertical;
}

.settings-command {
  min-height: 36px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.settings-command svg {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: middle;
}

.settings-stepper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
}

.settings-stepper > div {
  display: grid;
  grid-template-columns: 28px minmax(48px, auto) 28px;
  gap: 4px;
  align-items: center;
}

.settings-stepper button {
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: #fff;
  background: #454c57;
}

.settings-stepper strong {
  font-size: 10px;
  text-align: center;
}

.settings-readonly-note {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0;
  padding: 8px;
  border-radius: 6px;
  color: #aab2bc;
  background: rgba(16, 21, 27, 0.45);
  font-size: 8px;
  line-height: 1.35;
}

.settings-readonly-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.is-home-settings-focused .app-commandbar {
  z-index: 42;
  margin-bottom: 0;
}

.is-home-settings-focused .match-card-mount,
.is-home-settings-focused .match-workspace {
  margin-top: 0;
}

.is-home-settings-focused .match-workspace {
  border-width: 1px;
  box-shadow: none;
}

.match-settings-workspace {
  gap: 10px;
}

.match-settings-head {
  top: calc(env(safe-area-inset-top) + 58px);
  margin: -8px -8px 0;
  border-width: 0 0 1px;
  border-radius: 0 0 7px 7px;
}

.match-settings-head__actions {
  display: flex !important;
  gap: 6px !important;
}

.match-settings-head__actions .is-save {
  border-color: rgba(67, 200, 109, 0.48);
  color: #effff4;
  background: linear-gradient(180deg, #3f9e60, #2f7448);
}

.settings-drilldown {
  grid-template-columns: minmax(0, 1fr) 22px;
}

.settings-drilldown > svg {
  width: 16px;
  height: 16px;
  justify-self: end;
  color: #b8c0ca;
}

.settings-toggle .mini-switch,
.settings-modal-toggle .mini-switch {
  width: 34px;
  height: 20px;
}

.settings-toggle .mini-switch::after,
.settings-modal-toggle .mini-switch::after {
  width: 16px;
  height: 16px;
}

.settings-toggle.is-on .mini-switch::after,
.settings-modal-toggle.is-on .mini-switch::after {
  transform: translateX(14px);
}

.settings-modal {
  z-index: 120;
  align-items: flex-end;
  padding: 0;
}

.settings-popover {
  display: grid;
  width: min(100%, 520px);
  max-height: min(82dvh, 760px);
  gap: 10px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px 10px 0 0;
  background: linear-gradient(165deg, #343b45, #252a31 58%);
  box-shadow: 0 -14px 38px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.settings-popover > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settings-popover > header > div {
  display: grid;
  gap: 2px;
}

.settings-popover > header small,
.settings-popover > header strong {
  letter-spacing: 0;
}

.settings-popover > header small {
  color: var(--ref-muted);
  font-size: 8px;
  text-transform: uppercase;
}

.settings-popover > header strong {
  font-size: 15px;
}

.settings-modal-content,
.settings-subgroup {
  display: grid;
  gap: 7px;
}

.settings-subgroup {
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(15, 19, 24, 0.28);
}

.settings-subgroup > small,
.settings-modal-content label > span {
  color: #aeb6c0;
  font-size: 9px;
}

.settings-modal-toggle,
.settings-attachment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  color: #f3f4f5;
  background: linear-gradient(155deg, #414852, #333942);
  text-align: left;
}

.settings-modal-toggle > span:first-child {
  display: grid;
  gap: 2px;
}

.settings-modal-toggle b {
  font-size: 10px;
}

.settings-modal-toggle small {
  color: var(--ref-muted);
  font-size: 8px;
}

.settings-modal-toggle.is-on {
  border-color: rgba(67, 200, 109, 0.45);
  background: linear-gradient(155deg, rgba(49, 112, 69, 0.94), rgba(36, 77, 51, 0.94));
}

.settings-modal-toggle.is-on .mini-switch {
  background: var(--ref-green);
}

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

.settings-modal-content label,
.settings-modal-message {
  display: grid;
  gap: 5px;
}

.settings-modal-content input,
.settings-modal-content select,
.settings-modal-content textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  color: #f5f6f7;
  background: #20262d;
  font: inherit;
}

.settings-modal-content textarea {
  min-height: 88px;
  resize: vertical;
}

.settings-attachment {
  grid-template-columns: 20px minmax(0, 1fr);
  font-size: 10px;
}

.settings-attachment svg {
  width: 16px;
  height: 16px;
}

.settings-popover .match-edit-confirm {
  position: sticky;
  bottom: 0;
  min-height: 42px;
}

.settings-modal-hint {
  color: var(--ref-muted);
  font-size: 8px;
  line-height: 1.4;
}

.player-pill__avatar {
  display: flex !important;
  box-sizing: border-box;
  align-items: center !important;
  justify-content: center !important;
  padding: 1px 0 0 !important;
  line-height: 1 !important;
  text-indent: 0 !important;
}

@media (min-width: 680px) {
  .settings-modal {
    align-items: center;
    justify-content: center;
    padding: 20px;
  }

  .settings-popover {
    border-radius: 10px;
  }
}

[data-screen="match"] > :not(.calendar-shell) {
  display: none !important;
}

.calendar-shell {
  display: grid;
  gap: 8px;
}

.calendar-panel {
  padding: 10px;
}

.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-head > div:first-child {
  display: grid;
  gap: 2px;
}

.calendar-head small {
  color: var(--ref-orange);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.calendar-head h2 {
  margin: 0;
  font-size: 20px;
  text-transform: capitalize;
}

.calendar-head > div:last-child {
  display: flex;
  gap: 5px;
}

.calendar-head button,
.calendar-detail-back {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  color: #eef0f2;
  background: linear-gradient(180deg, #484f5a, #353b44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 10px rgba(0, 0, 0, 0.18);
}

.calendar-head button {
  width: 34px;
  height: 34px;
}

.calendar-head svg,
.calendar-detail-back svg {
  width: 15px;
  height: 15px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-weekdays {
  margin-bottom: 5px;
}

.calendar-weekdays span {
  color: #8e98a4;
  font-size: 8px;
  font-weight: 700;
  text-align: center;
}

.calendar-day {
  position: relative;
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 6px;
  color: #d9dde1;
  background: linear-gradient(145deg, #343a43, #2a3037);
  font-size: 11px;
  font-weight: 700;
}

.calendar-day:disabled {
  opacity: 0.62;
}

.calendar-day.is-other-month {
  opacity: 0.3;
}

.calendar-day i {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  width: 9px;
  height: 9px;
  place-items: center;
  border-radius: 50%;
  color: #173923;
  background: var(--ref-green);
  font-size: 6px;
  font-style: normal;
}

.calendar-day.has-past-match i {
  color: #dce0e4;
  background: #747d88;
}

.calendar-day.is-selected {
  border-color: var(--ref-orange);
  box-shadow: 0 0 0 1px rgba(255, 106, 42, 0.34);
}

.calendar-legend {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  color: #98a2ad;
  font-size: 8px;
}

.calendar-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.calendar-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ref-green);
}

.calendar-legend i.is-past {
  background: #747d88;
}

.calendar-detail-back {
  display: none;
  grid-template-columns: 16px auto;
  justify-self: start;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  font-size: 10px;
  font-weight: 700;
}

.calendar-detail-back.is-visible {
  display: inline-grid;
}

.calendar-match-mount {
  display: none;
}

.calendar-match-mount.is-visible {
  display: contents;
}

@media (max-width: 430px) {
  .command-edit-actions {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 34px 34px;
  }

  .calendar-day {
    min-height: 42px;
  }
}

/* Final precedence for Telegram's narrow WebView. */
.match-status-tools {
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) 38px 38px;
}

.match-status-tools .status-pill { grid-column: 1; justify-self: start; }
.match-status-tools .match-edit-button { grid-column: 3; }
.match-status-tools .match-settings-button { grid-column: 4; }
.match-status-tools .match-save-button { display: none !important; }

.status-panel--compact .profile-row {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.status-panel--compact .avatar {
  width: 36px;
  height: 36px;
}

.status-panel--compact .status-metrics {
  align-items: center;
}

.status-panel--compact .rating-shortcut--rating {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  grid-template-rows: 1fr;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  border-color: rgba(105, 175, 255, 0.52);
  background: linear-gradient(145deg, #3c6388, #29445f);
}

.status-panel--compact .rating-shortcut--rating span { display: none; }
.status-panel--compact .rating-shortcut--rating b { color: #f7fbff; font-size: 11px; }

.status-panel--compact .rating-shortcut--stars {
  width: auto;
  min-width: 62px;
  min-height: 30px;
  grid-template-columns: auto auto;
  grid-template-rows: 1fr;
  gap: 4px;
  padding: 0 9px;
  border-radius: 999px;
  border-color: rgba(255, 209, 102, 0.42);
  background: linear-gradient(145deg, rgba(130, 102, 37, 0.58), rgba(72, 61, 37, 0.62));
}

.status-panel--compact .rating-shortcut--stars span { font-size: 0; }
.status-panel--compact .rating-shortcut--stars b { font-size: 12px; }

.match-result-scoreline > span {
  display: grid;
  grid-template-rows: 30px auto;
  justify-items: center;
  align-content: center;
  gap: 5px;
}

.settings-group,
.settings-toggle,
.settings-stepper,
.settings-command,
.settings-modal-content,
.settings-popover,
.settings-subgroup,
.settings-toggle > span:first-child,
.settings-stepper > span,
.settings-modal-toggle > span:first-child {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.settings-toggle b,
.settings-toggle small,
.settings-stepper b,
.settings-stepper small,
.settings-command,
.settings-modal-toggle b,
.settings-modal-toggle small {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.settings-drilldown > span:first-child {
  grid-column: 1;
  grid-row: 1;
  width: auto;
}

.settings-drilldown > svg:last-child {
  grid-column: 2;
  grid-row: 1;
}

.calendar-day.has-open-match {
  border-color: rgba(79, 208, 132, 0.64);
  color: #f3fff7;
  background: linear-gradient(145deg, rgba(48, 128, 77, 0.86), rgba(33, 82, 53, 0.88));
}

.calendar-day.has-played-match {
  border-color: rgba(83, 214, 139, 0.74);
  box-shadow: inset 0 0 0 1px rgba(83, 214, 139, 0.1);
}

.calendar-day em {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 9px;
  font-style: normal;
  line-height: 1;
}

.calendar-legend { flex-wrap: wrap; }
.calendar-legend em { font-size: 10px; font-style: normal; }

@media (max-width: 430px) {
  .settings-modal-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-toggle { grid-template-columns: minmax(0, 1fr) 34px; }
  .settings-stepper { grid-template-columns: minmax(0, 1fr); }
  .settings-stepper > div {
    width: 100%;
    min-width: 0;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
  }
}

/* July 22 polish: compact profile, calm football artwork and safer touch editing. */
.app-shell,
.modal-backdrop,
.bottom-nav {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input,
textarea,
select {
  -webkit-user-select: text;
  user-select: text;
}

html.is-drag-locked,
html.is-drag-locked body {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none !important;
}

.match-workspace {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(165deg, rgba(35, 42, 50, 0.9) 0%, rgba(27, 33, 40, 0.94) 52%, rgba(24, 30, 36, 0.97) 100%),
    url("./assets/evening-football-pitch.jpg") center / cover no-repeat;
}

.match-workspace > * {
  position: relative;
  z-index: 1;
}

.is-home-settings-focused .match-workspace {
  background: linear-gradient(155deg, #303640, #252a31);
}

.status-panel--compact {
  padding: 8px 9px;
}

.status-panel--compact .profile-row {
  grid-template-columns: 36px minmax(82px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.status-panel--compact .status-metrics {
  display: flex;
  gap: 5px;
  align-items: center;
}

.status-panel--compact .rating-shortcut--rating,
.status-panel--compact .rating-shortcut--stars {
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 30px;
  gap: 5px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-panel--compact .rating-shortcut--rating {
  border-color: rgba(105, 175, 255, 0.36);
  background: linear-gradient(145deg, rgba(55, 91, 124, 0.88), rgba(39, 61, 82, 0.94));
}

.status-panel--compact .rating-shortcut--rating span {
  display: inline;
  color: #b9c9d8;
  font-size: 8px;
}

.status-panel--compact .rating-shortcut--rating b,
.status-panel--compact .rating-shortcut--stars b {
  font-size: 12px;
  line-height: 1;
}

.status-panel--compact .rating-shortcut--stars {
  min-width: 43px;
  border-color: rgba(255, 209, 102, 0.4);
  background: linear-gradient(145deg, rgba(113, 88, 31, 0.72), rgba(61, 53, 35, 0.86));
}

.status-panel--compact .rating-shortcut--stars span {
  display: grid;
  place-items: center;
  font-size: 0;
}

.status-panel--compact .rating-shortcut--stars span svg {
  width: 14px;
  height: 14px;
  color: #ffd166;
  fill: currentColor;
}

.payment-popover {
  width: min(calc(100% - 40px), 310px);
  gap: 9px;
  padding: 18px 15px 14px;
}

.payment-popover header {
  text-align: center;
}

.payment-details-card {
  display: grid;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: linear-gradient(145deg, #3d444e, #323840);
}

.payment-recipient,
.payment-phone-copy {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.payment-recipient {
  padding: 10px 12px 8px;
}

.payment-phone-copy {
  padding: 8px 10px 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.payment-recipient strong,
.payment-phone-copy strong {
  font-size: 14px;
  line-height: 1.25;
}

.payment-copy-hint {
  margin: 0;
  text-align: center;
}

.match-result-scoreline {
  width: 100%;
  padding: 3px;
  border: 0;
  color: inherit;
  background: transparent;
}

.is-finished-match [data-finished-outcome-duplicates] {
  display: none !important;
}

.team-distribution-random,
.team-distribution-reset,
.team-distribution-save {
  display: inline-flex;
  min-height: 39px;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  line-height: 1;
  text-align: center;
}

.team-distribution-random svg,
.team-distribution-reset svg,
.team-distribution-save svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.is-team-distribution-focused .command-role {
  min-width: 70px;
  color: #fff;
  background: linear-gradient(180deg, #ff813f, #dc5620);
}

.settings-stepper__value {
  min-width: 64px;
  padding: 0 5px;
  border-color: rgba(255, 209, 102, 0.3) !important;
  color: #ffd166 !important;
  font-size: 10px;
  font-weight: 750;
}

.settings-modal-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 7px;
  background: rgba(13, 17, 22, 0.38);
}

.settings-modal-tabs button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--ref-muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.settings-modal-tabs button.is-active {
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  background: linear-gradient(180deg, #4b535e, #383f48);
}

.calendar-day em {
  top: 4px;
  right: auto;
  left: 4px;
}

@media (max-width: 380px) {
  .status-panel--compact .rating-shortcut--rating span {
    display: none;
  }

  .status-panel--compact .rating-shortcut--rating {
    min-width: 34px;
    padding: 0 8px;
  }
}

/* Player status card and match-state hierarchy. */
.status-panel--compact {
  min-height: 0;
  padding: 11px;
  border-color: rgba(255, 255, 255, 0.36);
  background: linear-gradient(155deg, rgba(54, 61, 71, 0.98), rgba(34, 40, 48, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.035),
    0 8px 24px rgba(0, 0, 0, 0.28),
    0 0 16px rgba(232, 240, 248, 0.07);
}

.status-panel--compact .profile-row {
  grid-template-columns: 60px minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: start;
  min-height: 64px;
}

.profile-avatar-stack {
  display: grid;
  gap: 5px;
  justify-items: center;
}

.status-panel--compact .profile-avatar-stack .avatar {
  width: 50px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08), 0 5px 14px rgba(0, 0, 0, 0.3);
  font-size: 12px;
}

.status-panel--compact .profile-copy {
  display: grid;
  gap: 6px;
  align-content: center;
  min-height: 56px;
}

.status-panel--compact .profile-copy > strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-panel--compact .profile-copy .profile-match-status {
  color: #e4e9ee;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.28;
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating {
  display: inline-flex;
  width: 60px;
  min-width: 60px;
  min-height: 21px;
  gap: 3px;
  padding: 0 5px;
  border-radius: 999px;
  border-color: rgba(145, 194, 239, 0.36);
  background: linear-gradient(145deg, rgba(55, 91, 124, 0.9), rgba(35, 56, 76, 0.95));
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating span {
  display: inline;
  max-width: none;
  overflow: visible;
  color: #b9c9d8;
  font-size: 6.5px;
  text-overflow: clip;
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating b {
  color: #fff;
  font-size: 9px;
}

.status-panel--compact .status-metrics {
  justify-content: flex-end;
  padding-top: 7px;
}

.status-panel--compact .rating-shortcut--stars {
  min-width: 44px;
  min-height: 34px;
  border-color: rgba(255, 217, 118, 0.56);
  background: linear-gradient(120deg, rgba(96, 73, 25, 0.9), rgba(154, 116, 37, 0.78), rgba(75, 59, 27, 0.92));
  background-size: 180% 180%;
  box-shadow: inset 0 1px 0 rgba(255, 243, 188, 0.22), 0 0 12px rgba(255, 209, 102, 0.15);
  animation: star-pill-shimmer 4.8s ease-in-out infinite;
}

.status-panel--compact .rating-shortcut--stars span svg {
  width: 15px;
  height: 15px;
  animation: status-star-turn 5.5s ease-in-out infinite;
  transform-origin: center;
}

.profile-community-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin-top: 9px;
  padding: 8px 9px;
  border-color: rgba(255, 255, 255, 0.11);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.06));
  text-align: left;
}

.profile-community-link > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-community-link small {
  color: #949eaa;
  font-size: 7px;
  font-weight: 650;
  text-transform: uppercase;
}

.profile-community-link strong {
  font-size: 10px;
}

.profile-community-link__action {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: #d9e1e8 !important;
  font-size: 9px !important;
  font-weight: 700;
}

.profile-community-link__action svg {
  width: 13px;
  height: 13px;
  color: #76d99f;
}

.status-panel--compact .match-info-alert.is-overdue {
  display: grid;
  margin-top: 9px;
  border-color: rgba(255, 92, 112, 0.72);
  background: linear-gradient(145deg, rgba(112, 35, 47, 0.94), rgba(65, 30, 37, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 0 14px rgba(255, 70, 94, 0.18);
  animation: overdue-alert-pulse 1.8s ease-in-out infinite;
}

.match-status-tools .status-pill.status-pill--live {
  border: 1px solid rgba(234, 255, 242, 0.62);
  color: #f4fff8;
  background: linear-gradient(180deg, rgba(64, 151, 94, 0.62), rgba(43, 104, 65, 0.68));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.match-status-tools .status-pill.status-pill--live::before {
  color: #effff4;
  background: rgba(255, 255, 255, 0.13);
}

.match-workspace {
  background: linear-gradient(165deg, #2d343d 0%, #252b33 58%, #21272e 100%);
}

.match-workspace::before {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: 560px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(22, 29, 35, 0.34) 0%, rgba(26, 33, 39, 0.55) 52%, #252b33 100%),
    url("./assets/evening-football-pitch.jpg") 70% 61% / cover no-repeat;
  content: "";
  opacity: 0.76;
}

.is-home-settings-focused .match-workspace::before {
  display: none;
}

.home-breakdowns .breakdown-card__head > span {
  display: none;
}

.match-result-preview.is-score-only {
  grid-template-columns: minmax(0, 1fr);
}

[data-player-actions] [data-action="toggle-play"].is-negative {
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd2d9;
  background: linear-gradient(180deg, rgba(82, 90, 100, 0.48), rgba(52, 58, 66, 0.55));
}

@keyframes status-star-turn {
  0%, 72%, 100% { transform: rotate(0deg) scale(1); }
  84% { transform: rotate(180deg) scale(1.08); }
}

@keyframes star-pill-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes overdue-alert-pulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 0 8px rgba(255, 70, 94, 0.12); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 0 18px rgba(255, 70, 94, 0.3); }
}

@media (prefers-reduced-motion: reduce) {
  .status-panel--compact .rating-shortcut--stars,
  .status-panel--compact .rating-shortcut--stars span svg,
  .status-panel--compact .match-info-alert.is-overdue {
    animation: none;
  }
}

/* Unified compact controls and focused workspace headers. */
:root {
  --miniapp-line: rgba(255, 255, 255, 0.11);
  --miniapp-line-soft: rgba(255, 255, 255, 0.075);
  --miniapp-radius: 6px;
  --miniapp-surface-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.075));
}

.status-panel--compact .profile-row {
  grid-template-columns: 58px minmax(0, 1fr) 46px;
  min-height: 58px;
  align-items: center;
}

.profile-avatar-stack {
  position: relative;
  display: block;
  width: 54px;
  height: 54px;
}

.status-panel--compact .profile-avatar-stack .avatar {
  width: 52px;
  height: 52px;
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating {
  position: absolute;
  right: -4px;
  bottom: -3px;
  display: grid;
  width: 23px;
  min-width: 23px;
  min-height: 23px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(171, 211, 248, 0.62);
  border-radius: 50%;
  background: linear-gradient(145deg, #496f91, #273f55);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating span {
  display: none;
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating b {
  font-size: 8px;
  line-height: 1;
}

.is-home-editing .status-panel--compact .profile-community-link {
  display: none;
}

.team-distribution-head,
.match-settings-head,
.command-edit-actions {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 7px;
  border: 1px solid var(--miniapp-line);
  border-radius: var(--miniapp-radius);
  background: linear-gradient(180deg, rgba(65, 72, 83, 0.98), rgba(42, 47, 56, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 6px 16px rgba(0, 0, 0, 0.22);
}

.team-distribution-head {
  position: sticky;
  z-index: 20;
  top: calc(env(safe-area-inset-top) + 62px);
  display: grid;
  margin-bottom: 8px;
}

.team-distribution-head > div:first-child,
.match-settings-head > div:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.team-distribution-head strong,
.match-settings-head strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-distribution-head span,
.match-settings-head small {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-distribution-head__actions,
.match-settings-head__actions {
  display: flex;
  grid-auto-flow: column;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.team-distribution-head > .team-distribution-head__actions,
.match-settings-head > .match-settings-head__actions {
  display: flex;
}

.command-edit-actions {
  grid-template-columns: minmax(0, 1fr) 30px 30px;
}

.team-distribution-head__actions button,
.match-settings-head__actions button,
.command-edit-actions button {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border: 1px solid var(--miniapp-line);
  border-radius: var(--miniapp-radius);
  background: linear-gradient(180deg, #4a515c, #353b44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.team-distribution-head__actions button.is-save,
.match-settings-head__actions button.is-save,
.command-edit-actions button.is-save {
  border-color: rgba(88, 205, 126, 0.55);
  background: linear-gradient(180deg, #43ad68, #2d7848);
}

.is-home-editing .status-panel--compact {
  padding: 6px;
}

.is-home-editing .command-edit-actions {
  display: grid;
}

.match-workspace::before {
  background:
    linear-gradient(180deg, rgba(22, 29, 35, 0.22) 0%, rgba(26, 33, 39, 0.41) 54%, #252b33 100%),
    url("./assets/evening-football-pitch.jpg") 70% 61% / cover no-repeat;
  opacity: 0.9;
}

.status-panel--compact,
.match-workspace,
.profile-community-link,
.toggle-action,
.roster-summary-toggle,
.team-distribution-launch,
.breakdown-card,
.distribution-pool,
.distribution-team,
.distribution-substitutions,
.settings-group,
.settings-toggle,
.settings-command,
.settings-stepper {
  border-width: 1px;
  border-style: solid;
  border-color: var(--miniapp-line);
  border-radius: var(--miniapp-radius);
}

.profile-community-link,
.toggle-action,
.roster-summary-toggle,
.team-distribution-launch,
.breakdown-card,
.distribution-pool,
.distribution-team,
.distribution-substitutions,
.settings-toggle,
.settings-command,
.settings-stepper {
  background-image: var(--miniapp-surface-gradient);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075), 0 3px 9px rgba(0, 0, 0, 0.15);
}

.toggle-action:disabled {
  border-color: var(--miniapp-line-soft);
  color: #89929c;
  background-color: rgba(52, 58, 66, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  opacity: 0.72;
}

/* Neon pitch design system based on the approved player and match references. */
:root {
  --neon-page: #03090d;
  --neon-panel: #071219;
  --neon-panel-strong: #091720;
  --neon-surface: #0b1922;
  --neon-surface-hover: #10232d;
  --neon-line: rgba(143, 196, 205, 0.2);
  --neon-line-strong: rgba(143, 196, 205, 0.32);
  --neon-accent: #25d7c4;
  --neon-accent-soft: rgba(37, 215, 196, 0.14);
  --neon-green: #24cf78;
  --neon-amber: #ffb842;
  --neon-red: #ff6675;
  --neon-text: #f4f8fa;
  --neon-muted: #9eabb2;
  --neon-radius: 10px;
}

html,
body {
  color: var(--neon-text);
  background: var(--neon-page);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

body {
  background-image: linear-gradient(180deg, #02070a 0%, #061117 46%, #02070a 100%);
}

.app-shell {
  width: min(100%, 560px);
  padding: calc(10px + env(safe-area-inset-top)) 10px calc(84px + env(safe-area-inset-bottom));
}

.app-commandbar {
  min-height: 48px;
  margin-bottom: 10px;
  border: 0;
  background: #03090d !important;
  box-shadow: none;
  backdrop-filter: none;
}

.command-back,
.command-role,
.match-edit-button,
.match-settings-button,
.match-save-button {
  border: 1px solid var(--neon-line) !important;
  color: #c8d2d7;
  background: linear-gradient(180deg, rgba(18, 34, 43, 0.94), rgba(7, 17, 23, 0.96)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 5px 14px rgba(0, 0, 0, 0.26) !important;
}

.command-title .eyebrow {
  color: #82939b;
  font-size: 8px;
  text-transform: uppercase;
}

.command-title h1 {
  color: var(--neon-text);
  font-size: 18px;
  font-weight: 720;
}

.command-role {
  color: #dffcf8;
  border-color: rgba(37, 215, 196, 0.32) !important;
  background: linear-gradient(180deg, rgba(28, 120, 114, 0.7), rgba(10, 61, 60, 0.82)) !important;
}

.status-panel--compact,
.match-workspace,
.panel,
.calendar-shell,
.bottom-nav {
  border: 1px solid var(--neon-line) !important;
  border-radius: var(--neon-radius) !important;
  background-color: rgba(5, 15, 21, 0.96) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 12px 32px rgba(0, 0, 0, 0.24) !important;
}

.status-panel--compact {
  position: relative;
  top: auto !important;
  min-height: 0;
  margin-bottom: 10px;
  padding: 14px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(7, 26, 33, 0.98), rgba(4, 13, 18, 0.98) 54%, rgba(4, 22, 27, 0.98)) !important;
}

.status-panel--compact::before,
.status-panel--compact::after {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  content: "";
}

.status-panel--compact::before {
  top: -22px;
  left: -18px;
  width: 150px;
  height: 82px;
  clip-path: polygon(0 0, 100% 0, 66% 28%, 31% 100%, 0 76%);
  background: linear-gradient(135deg, rgba(37, 215, 196, 0.28), rgba(37, 215, 196, 0.02));
}

.status-panel--compact::after {
  top: -20px;
  right: -24px;
  width: 150px;
  height: 92px;
  clip-path: polygon(22% 0, 100% 0, 100% 82%, 56% 100%, 0 62%);
  background: linear-gradient(145deg, rgba(37, 215, 196, 0.16), rgba(37, 215, 196, 0.015));
}

.status-panel--compact > * {
  position: relative;
  z-index: 1;
}

.status-panel--compact .profile-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 44px;
  gap: 12px;
  min-height: 92px;
  align-items: center;
}

.profile-avatar-stack {
  position: relative;
  width: 88px;
  height: 88px;
}

.status-panel--compact .profile-avatar-stack .avatar {
  width: 84px;
  height: 84px;
  border: 2px solid rgba(37, 215, 196, 0.78);
  color: #dffbf8;
  background: #0b2028;
  box-shadow: 0 0 0 3px rgba(37, 215, 196, 0.06), 0 8px 22px rgba(0, 0, 0, 0.36);
  font-size: 16px;
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating {
  right: 0;
  bottom: 1px;
  width: 29px;
  min-width: 29px;
  min-height: 29px;
  border: 1px solid rgba(37, 215, 196, 0.72);
  color: #fff;
  background: #0a2028;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.36), 0 0 12px rgba(37, 215, 196, 0.1);
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating b {
  font-size: 9px;
}

.status-panel--compact .profile-copy {
  display: grid;
  gap: 7px;
  align-content: center;
  min-width: 0;
  min-height: 84px;
}

.profile-name-line {
  display: flex;
  min-width: 0;
  gap: 7px;
  align-items: center;
}

.profile-name-line > strong {
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 720;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-role-badge {
  min-height: 24px;
  flex: 0 0 auto;
  padding: 0 8px;
  border: 1px solid rgba(37, 215, 196, 0.36);
  border-radius: 5px;
  color: #ecfffc;
  background: linear-gradient(180deg, rgba(29, 175, 162, 0.9), rgba(11, 102, 97, 0.9));
  box-shadow: 0 0 12px rgba(37, 215, 196, 0.12);
  font-size: 9px;
  font-weight: 700;
}

.profile-match-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: #b7c1c6;
}

.profile-match-line > span,
.profile-community-brand {
  display: inline-flex;
  min-width: 0;
  gap: 6px;
  align-items: center;
}

.profile-match-line svg,
.profile-community-brand svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--neon-accent);
  stroke-width: 1.8;
}

.profile-match-line b,
.profile-community-brand strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-community-brand {
  color: #acb9bf;
}

.profile-community-brand svg {
  color: #4fc1ff;
}

.status-panel--compact .status-metrics {
  align-self: start;
  justify-content: flex-end;
  padding-top: 5px;
}

.status-panel--compact .rating-shortcut--stars {
  min-width: 43px;
  min-height: 34px;
  border: 1px solid rgba(255, 184, 66, 0.25);
  color: #ffd05a;
  background: rgba(255, 184, 66, 0.055);
  box-shadow: none;
}

.status-panel--compact .rating-shortcut--stars span svg {
  color: #ffbd42;
  fill: currentColor;
}

.profile-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  margin: 10px 0 0 100px;
  padding-top: 10px;
  border-top: 1px solid var(--neon-line);
}

.profile-stat {
  display: grid;
  gap: 2px;
  place-items: center;
  border-right: 1px solid var(--neon-line);
}

.profile-stat strong {
  color: var(--neon-accent);
  font-size: 16px;
  font-weight: 560;
  line-height: 1;
}

.profile-stat span {
  color: #829099;
  font-size: 7px;
  text-transform: uppercase;
}

.profile-chat-button {
  display: inline-flex;
  min-width: 61px;
  min-height: 34px;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-left: 9px;
  padding: 0 9px;
  border: 1px solid rgba(37, 215, 196, 0.55);
  border-radius: 7px;
  color: #eafffc;
  background: rgba(8, 28, 34, 0.72);
  font-size: 10px;
}

.profile-chat-button svg {
  width: 16px;
  height: 16px;
  color: var(--neon-accent);
}

.is-home-editing .status-panel--compact .profile-row,
.is-home-editing .status-panel--compact .profile-footer {
  display: none;
}

.match-workspace {
  position: relative;
  padding: 14px;
  overflow: hidden;
  background: rgba(5, 15, 21, 0.98) !important;
}

.match-workspace::before {
  height: 500px;
  background:
    linear-gradient(90deg, rgba(3, 10, 14, 0.97) 0%, rgba(3, 10, 14, 0.82) 46%, rgba(3, 10, 14, 0.2) 100%),
    linear-gradient(180deg, rgba(3, 10, 14, 0.08) 0%, rgba(3, 10, 14, 0.28) 66%, #050f15 100%),
    url("./assets/evening-football-pitch.jpg") 72% 48% / cover no-repeat;
  opacity: 1;
}

.match-workspace > * {
  position: relative;
  z-index: 1;
}

.match-status-tools {
  margin-bottom: 15px;
}

.match-status-tools .status-pill.status-pill--live {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(37, 215, 196, 0.48);
  border-radius: 7px;
  color: #eafffb;
  background: rgba(14, 85, 76, 0.28);
  box-shadow: inset 0 0 18px rgba(37, 215, 196, 0.05);
}

.match-title-row h2,
.editable-match-title h2 {
  color: #fff;
  font-size: 25px;
  font-weight: 760;
  line-height: 1.08;
}

.match-facts {
  max-width: 78%;
  gap: 4px;
  margin-top: 10px;
}

.match-facts button {
  min-height: 26px;
  color: #c6d0d5 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.match-facts button svg {
  color: #a8bbc3;
}

.match-payment-line {
  margin-top: 8px;
}

.pay-details-button {
  border: 1px solid var(--neon-line) !important;
  border-radius: 7px !important;
  color: #e5edef !important;
  background: rgba(10, 24, 31, 0.86) !important;
}

.paid-progress {
  color: var(--neon-green);
}

.action-grid {
  gap: 8px;
  margin-top: 12px;
}

.toggle-action,
.toggle-action.is-active {
  min-height: 48px;
  border: 1px solid var(--neon-line) !important;
  border-radius: 7px;
  background: rgba(8, 21, 28, 0.88) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
}

.toggle-action.is-active {
  border-color: rgba(36, 207, 120, 0.42) !important;
  background: linear-gradient(90deg, rgba(22, 105, 70, 0.24), rgba(7, 25, 25, 0.88)) !important;
}

.toggle-action__dot {
  background: var(--neon-green);
}

.toggle-action.is-negative .toggle-action__dot {
  background: var(--neon-red);
}

.toggle-action:disabled {
  border-color: rgba(143, 196, 205, 0.12) !important;
  background: rgba(8, 17, 22, 0.72) !important;
  opacity: 0.62;
}

.player-registration-note {
  display: none;
}

.roster-summary-toggle {
  min-height: 48px;
  margin-top: 12px;
  padding: 0 8px;
  border: 1px solid var(--neon-line) !important;
  border-radius: 7px;
  background: rgba(7, 20, 27, 0.9) !important;
  box-shadow: none !important;
}

.roster-summary-toggle > span {
  min-height: 46px;
  border-right: 1px solid var(--neon-line);
  color: #aebac0;
}

.roster-summary-toggle > span:first-child {
  color: #e8fffc;
  background: linear-gradient(90deg, rgba(14, 116, 102, 0.35), rgba(14, 116, 102, 0.05));
}

.roster-summary-toggle em svg {
  color: var(--neon-accent);
}

.home-breakdowns {
  gap: 8px;
  padding-top: 9px;
}

.breakdown-card {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.breakdown-card__head {
  min-height: 24px;
  padding: 0 5px;
}

.breakdown-card__head strong {
  color: #ecf4f6;
  font-size: 12px;
}

.compact-roster-pills {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.player-pill {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto auto;
  min-height: 36px;
  gap: 6px;
  align-items: center;
  padding: 4px 6px;
  border: 1px solid rgba(143, 196, 205, 0.1) !important;
  border-radius: 7px;
  color: #dce5e8;
  background: rgba(11, 27, 36, 0.9) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018) !important;
}

.player-pill:hover {
  border-color: rgba(37, 215, 196, 0.26) !important;
  background: rgba(13, 34, 43, 0.96) !important;
}

.player-pill.is-current-player {
  border-color: rgba(37, 215, 196, 0.62) !important;
  background: linear-gradient(90deg, rgba(20, 101, 91, 0.34), rgba(9, 25, 32, 0.94)) !important;
}

.player-pill__avatar {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(37, 215, 196, 0.22);
  background: #102731;
  font-size: 7px;
}

.player-pill .player-pill__name {
  font-size: 9px;
  font-weight: 520;
}

.player-pill > b {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  color: #03100b;
  background: var(--neon-green);
  font-size: 8px;
}

.player-pill__rating {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(37, 215, 196, 0.42);
  border-radius: 50%;
  color: #dffbf8;
  font-size: 8px;
  font-style: normal;
}

.team-distribution-launch,
.team-distribution-panel,
.match-outcome-card,
.mvp-preview,
.home-mvp-result,
.settings-group,
.settings-toggle,
.settings-command,
.settings-stepper {
  border-color: var(--neon-line) !important;
  background-color: rgba(7, 20, 27, 0.94) !important;
}

.team-distribution-launch svg,
.home-edit-shortcuts svg,
.settings-group svg {
  color: var(--neon-accent) !important;
}

.bottom-nav {
  left: 50%;
  bottom: 6px;
  width: min(calc(100% - 20px), 540px);
  padding: 5px 7px calc(6px + env(safe-area-inset-bottom));
  border-color: var(--neon-line-strong) !important;
  background: rgba(3, 12, 17, 0.94) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.bottom-nav button {
  color: #7f8e95;
  background: transparent !important;
}

.bottom-nav button svg {
  color: #7f8e95;
  stroke-width: 1.8;
}

.bottom-nav button.is-active,
.bottom-nav button.is-active svg {
  color: #dffffb;
}

.bottom-nav button.is-active {
  background: linear-gradient(180deg, rgba(37, 215, 196, 0.12), rgba(37, 215, 196, 0.015)) !important;
  box-shadow: inset 0 1px 0 rgba(37, 215, 196, 0.18);
}

@media (max-width: 390px) {
  .status-panel--compact {
    padding: 12px;
  }

  .status-panel--compact .profile-row {
    grid-template-columns: 76px minmax(0, 1fr) 40px;
    gap: 9px;
    min-height: 80px;
  }

  .profile-avatar-stack {
    width: 76px;
    height: 76px;
  }

  .status-panel--compact .profile-avatar-stack .avatar {
    width: 72px;
    height: 72px;
  }

  .profile-name-line > strong {
    font-size: 14px;
  }

  .profile-role-badge {
    min-height: 21px;
    padding: 0 6px;
    font-size: 8px;
  }

  .profile-match-line {
    display: grid;
    gap: 4px;
  }

  .profile-footer {
    margin-left: 85px;
  }

  .profile-stat strong {
    font-size: 14px;
  }

  .profile-chat-button {
    min-width: 54px;
    margin-left: 6px;
    padding: 0 7px;
  }

  .match-facts {
    max-width: 88%;
  }
}

/* Player sheet reuses the exact compact status-card geometry. */
.player-profile-popover.status-panel--compact {
  width: min(calc(100% - 20px), 540px);
  gap: 0;
  margin: 0 0 max(10px, env(safe-area-inset-bottom));
  padding: 6px 12px;
  text-align: left;
}

.player-profile-popover .player-profile-avatar-link {
  width: 88px;
  height: 88px;
}

.player-profile-popover .player-profile-avatar-link .avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  color: #dffbf8;
  background: #0b2028;
}

.player-profile-popover .player-profile-footer {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 28px;
}

.player-profile-popover .player-profile-footer .profile-stat:last-child {
  border-right: 0;
}

.player-profile-modal-actions {
  margin-top: 7px;
}

.player-profile-popover .avatar:not(.has-loaded-avatar) {
  color: #effcfb;
  background: linear-gradient(145deg, #102a34, #07171e);
  text-shadow: 0 1px 8px rgba(37, 215, 196, 0.24);
}

@media (max-width: 390px) {
  .player-profile-popover .player-profile-avatar-link {
    width: 88px;
    height: 88px;
  }

  .player-profile-popover .player-profile-avatar-link .avatar {
    width: 84px;
    height: 84px;
  }
}

@media (max-width: 350px) {
  .profile-footer {
    margin-left: 0;
  }

  .status-panel--compact .profile-row {
    grid-template-columns: 70px minmax(0, 1fr) 38px;
  }

}

/* Keep every focused admin workspace in the same neon visual language. */
.is-home-editing .app-commandbar,
.is-home-settings-focused .app-commandbar,
.is-team-distribution-focused .app-commandbar {
  color: var(--neon-text) !important;
  background: #03090d !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.is-team-distribution-focused .command-role {
  color: #dffcf8 !important;
  border-color: rgba(37, 215, 196, 0.32) !important;
  background: linear-gradient(180deg, rgba(28, 120, 114, 0.7), rgba(10, 61, 60, 0.82)) !important;
}

.is-home-editing .status-panel--compact {
  border-color: rgba(255, 102, 117, 0.35) !important;
  background: linear-gradient(135deg, rgba(35, 14, 20, 0.98), rgba(7, 15, 20, 0.98)) !important;
}

.command-edit-actions,
.team-distribution-head,
.match-settings-head {
  border: 1px solid var(--neon-line-strong) !important;
  border-radius: 7px !important;
  color: var(--neon-text);
  background: linear-gradient(180deg, rgba(12, 29, 38, 0.98), rgba(5, 16, 22, 0.98)) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

.team-distribution-head,
.match-settings-head {
  position: relative !important;
  top: auto !important;
  margin: 0 0 8px !important;
}

.command-edit-actions {
  border-color: rgba(255, 102, 117, 0.38) !important;
}

.command-edit-actions > span small {
  color: var(--neon-red);
}

.team-distribution-head span,
.match-settings-head small {
  color: var(--neon-muted);
}

.team-distribution-head__actions button,
.match-settings-head__actions button,
.command-edit-actions button {
  border: 1px solid var(--neon-line) !important;
  color: #cfdadd !important;
  background: rgba(12, 29, 37, 0.96) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

.team-distribution-head__actions button.is-save,
.match-settings-head__actions button.is-save,
.command-edit-actions button.is-save {
  border-color: rgba(36, 207, 120, 0.45) !important;
  color: #eafff2 !important;
  background: linear-gradient(180deg, rgba(29, 153, 91, 0.9), rgba(10, 84, 52, 0.94)) !important;
}

.is-home-settings-focused .match-workspace,
.is-team-distribution-focused .match-workspace {
  padding: 8px !important;
  border: 1px solid var(--neon-line) !important;
  background: rgba(4, 14, 19, 0.98) !important;
  box-shadow: none !important;
}

.is-home-settings-focused .match-workspace::before,
.is-team-distribution-focused .match-workspace::before {
  display: none;
}

.match-settings-workspace,
.team-distribution-panel {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.settings-group,
.distribution-pool,
.distribution-team,
.distribution-substitutions,
.distribution-team-count {
  border: 1px solid var(--neon-line) !important;
  border-radius: 7px !important;
  color: var(--neon-text);
  background: rgba(7, 20, 27, 0.94) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02) !important;
}

.settings-group h3,
.distribution-zone-title strong,
.distribution-team-count > span {
  color: #eaf2f4;
}

.settings-toggle,
.settings-command,
.settings-stepper,
.settings-field,
.settings-drilldown,
.team-distribution-random,
.team-distribution-reset,
.team-distribution-save {
  border: 1px solid var(--neon-line) !important;
  border-radius: 6px !important;
  color: #e9f1f3 !important;
  background: rgba(9, 25, 33, 0.96) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
}

.settings-toggle.is-on {
  border-color: rgba(36, 207, 120, 0.38) !important;
  background: linear-gradient(90deg, rgba(20, 99, 68, 0.38), rgba(7, 25, 28, 0.96)) !important;
}

.settings-toggle svg,
.settings-command svg,
.settings-stepper svg,
.settings-field svg,
.settings-drilldown svg,
.team-distribution-random svg,
.team-distribution-reset svg,
.team-distribution-save svg {
  color: var(--neon-accent) !important;
}

.settings-toggle .mini-switch,
.settings-modal-toggle .mini-switch {
  border: 1px solid var(--neon-line) !important;
  background: #17262e !important;
}

.settings-toggle.is-on .mini-switch,
.settings-modal-toggle.is-on .mini-switch {
  border-color: rgba(36, 207, 120, 0.48) !important;
  background: var(--neon-green) !important;
}

.settings-stepper button,
.distribution-team-count button {
  border: 1px solid var(--neon-line) !important;
  color: #e9f5f5 !important;
  background: #10232d !important;
}

.settings-stepper__value {
  border-color: rgba(37, 215, 196, 0.25) !important;
  color: var(--neon-accent) !important;
}

.settings-readonly-note {
  color: #7f8e95;
  background: transparent;
}

.distribution-zone-title > span {
  color: #05100c !important;
  background: var(--neon-accent) !important;
}

.distribution-team-count {
  padding: 8px;
}

.distribution-kit-button {
  border-color: transparent !important;
  background: transparent !important;
}

.team-distribution-random,
.team-distribution-reset,
.team-distribution-save {
  min-height: 42px;
}

.team-distribution-save {
  border-color: rgba(36, 207, 120, 0.45) !important;
  color: #eafff2 !important;
  background: linear-gradient(180deg, rgba(29, 153, 91, 0.88), rgba(10, 84, 52, 0.94)) !important;
}

.is-home-editing [data-edit-field] {
  border: 1px solid var(--neon-line) !important;
  border-radius: 6px !important;
  color: var(--neon-text) !important;
  background: rgba(9, 25, 33, 0.9) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
}

.is-home-editing [data-edit-field]:active,
.is-home-editing [data-edit-field]:focus-visible {
  border-color: rgba(37, 215, 196, 0.6) !important;
  box-shadow: 0 0 0 2px rgba(37, 215, 196, 0.1) !important;
}

.home-edit-shortcuts button,
.match-outcome-card,
.mvp-preview {
  border: 1px solid var(--neon-line) !important;
  color: #e4edef !important;
  background: rgba(8, 22, 29, 0.92) !important;
  box-shadow: none !important;
}

/* Compact status card and one shared rhythm for primary controls. */
:root {
  --neon-control-height: 38px;
}

.status-panel--compact {
  padding: 10px 12px;
}

.status-panel--compact .profile-row {
  grid-template-columns: 72px minmax(0, 1fr) 42px;
  gap: 9px;
  min-height: 70px;
  align-items: start;
}

.profile-avatar-stack {
  width: 70px;
  height: 70px;
}

.status-panel--compact .profile-avatar-stack .avatar {
  width: 68px;
  height: 68px;
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating {
  right: -1px;
  bottom: -2px;
  width: 31px;
  min-width: 31px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  clip-path: polygon(25% 0, 75% 0, 100% 24%, 100% 72%, 50% 100%, 0 72%, 0 24%);
  color: #171004;
  background: linear-gradient(145deg, #ffe176, #ffad2f 68%, #d98213) !important;
  box-shadow: none !important;
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating b {
  color: #171004;
  font-size: 10px;
  font-weight: 850;
}

.status-panel--compact .profile-copy {
  min-height: 66px;
  gap: 4px;
  align-content: start;
  padding-top: 2px;
}

.profile-name-line {
  gap: 6px;
}

.profile-name-line > strong {
  font-size: 14px;
}

.profile-role-badge {
  min-height: 21px;
  padding: 0 6px;
  font-size: 8px;
}

.profile-match-line {
  gap: 3px 8px;
}

.profile-match-line svg,
.profile-community-brand svg {
  width: 12px;
  height: 12px;
}

.profile-match-line b,
.profile-community-brand strong {
  font-size: 9px;
}

.status-panel--compact .status-metrics {
  padding-top: 1px;
}

.status-panel--compact .rating-shortcut--stars {
  min-width: 40px;
  min-height: 31px;
  padding: 4px 6px;
  overflow: visible;
}

.status-panel--compact .rating-shortcut--stars span,
.status-panel--compact .rating-shortcut--stars span svg {
  width: 17px;
  height: 17px;
  overflow: visible;
}

.profile-footer {
  grid-template-columns: repeat(3, minmax(0, 1fr)) 58px;
  margin: 1px 0 0 79px;
  padding-top: 6px;
}

.profile-stat {
  gap: 1px;
}

.profile-stat strong {
  font-size: 13px;
}

.profile-stat span {
  font-size: 6px;
}

.profile-chat-button {
  min-width: 58px;
  min-height: 30px;
  margin-left: 0;
  padding: 0 7px;
  font-size: 9px;
}

.profile-chat-button svg {
  width: 14px;
  height: 14px;
}

.match-workspace {
  padding: 12px;
}

.match-status-tools .status-pill,
.toggle-action,
.toggle-action.is-active,
.roster-summary-toggle,
.team-distribution-launch {
  box-sizing: border-box;
  min-height: var(--neon-control-height) !important;
  height: var(--neon-control-height);
  border: 1px solid var(--neon-line) !important;
  border-radius: 7px !important;
  box-shadow: none !important;
}

.match-status-tools .status-pill.status-pill--live {
  min-height: var(--neon-control-height);
}

.toggle-action,
.toggle-action.is-active {
  padding-top: 4px;
  padding-bottom: 4px;
}

.toggle-action strong {
  transform: none;
}

.toggle-action small {
  font-size: 7px;
}

.roster-summary-toggle {
  padding: 0 !important;
  overflow: hidden;
}

.roster-summary-toggle > span {
  min-height: calc(var(--neon-control-height) - 2px);
  height: calc(var(--neon-control-height) - 2px);
}

.roster-summary-toggle > span:first-child {
  background: rgba(14, 116, 102, 0.34) !important;
}

.roster-summary-toggle > svg:last-child {
  margin-right: 10px;
}

.team-distribution-launch {
  margin-top: 8px;
  padding: 0 12px !important;
  background: rgba(7, 20, 27, 0.9) !important;
}

.player-pill {
  grid-template-columns: 25px minmax(0, 1fr) auto;
}

.player-pill__rating {
  display: none !important;
}

.modal-backdrop {
  z-index: 1200 !important;
}

.toast {
  z-index: 1300 !important;
}

.bottom-nav {
  bottom: 0;
  width: min(100%, 560px);
  padding: 7px 9px calc(8px + env(safe-area-inset-bottom));
  border-width: 1px 0 0 !important;
  border-radius: 10px 10px 0 0 !important;
  background: #03090d !important;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: none;
}

.bottom-nav button {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border-radius: 999px;
}

.bottom-nav button.is-active {
  background: radial-gradient(ellipse at center, rgba(37, 215, 196, 0.2) 0%, rgba(37, 215, 196, 0.08) 42%, transparent 74%) !important;
  box-shadow: none !important;
}

@media (max-width: 390px) {
  .status-panel--compact {
    padding: 10px 12px;
  }

  .status-panel--compact .profile-row {
    grid-template-columns: 68px minmax(0, 1fr) 40px;
    gap: 8px;
    min-height: 66px;
  }

  .profile-avatar-stack {
    width: 66px;
    height: 66px;
  }

  .status-panel--compact .profile-avatar-stack .avatar {
    width: 64px;
    height: 64px;
  }

  .profile-footer {
    margin-left: 74px;
  }
}

.toast {
  top: calc(66px + env(safe-area-inset-top));
  right: 12px;
  left: 12px;
  max-width: 536px;
  padding: 10px 12px;
  border: 1px solid rgba(37, 215, 196, 0.45) !important;
  border-radius: 7px;
  color: #eafffc;
  background: rgba(7, 23, 30, 0.98) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
  font-size: 11px;
  text-align: center;
}

/* Header, compact identity card and connected roster/distribution surfaces. */
.app-commandbar {
  box-sizing: border-box;
  width: calc(100% + 20px);
  min-height: 64px;
  margin-right: -10px;
  margin-bottom: 4px;
  margin-left: -10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--neon-line) !important;
  border-radius: 0 0 10px 10px;
  background: #03090d !important;
}

.command-back,
.match-edit-button,
.match-settings-button,
.match-save-button {
  box-sizing: border-box;
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
}

.screen[data-screen="home"].is-active {
  gap: 4px !important;
}

.status-panel--compact {
  margin-bottom: 0;
  padding: 8px 12px;
}

.status-panel--compact .profile-row {
  grid-template-columns: 62px minmax(0, 1fr) 40px;
  gap: 7px;
  min-height: 60px;
}

.profile-avatar-stack {
  width: 60px;
  height: 60px;
}

.status-panel--compact .profile-avatar-stack .avatar {
  width: 58px;
  height: 58px;
  box-shadow:
    0 0 0 2px rgba(37, 215, 196, 0.08),
    0 0 16px rgba(37, 215, 196, 0.2),
    0 7px 18px rgba(0, 0, 0, 0.34);
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating {
  right: -1px;
  bottom: -4px;
  width: 32px;
  min-width: 32px;
  height: 36px;
  min-height: 36px;
  clip-path: polygon(50% 0, 88% 13%, 88% 58%, 74% 79%, 50% 100%, 26% 79%, 12% 58%, 12% 13%);
  color: #171004;
  background: var(--neon-accent) !important;
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating::before {
  position: absolute;
  inset: 2px;
  z-index: 0;
  clip-path: inherit;
  background: linear-gradient(145deg, #ffe176, #ffad2f 68%, #d98213);
  content: "";
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating b {
  position: relative;
  z-index: 1;
}

.status-panel--compact .profile-copy {
  min-height: 56px;
  gap: 2px;
  padding-top: 0;
}

.profile-role-badge {
  min-height: 18px;
  padding: 0 5px;
  font-size: 7px;
}

.profile-community-brand svg {
  color: var(--neon-accent);
}

.profile-footer {
  grid-template-columns: repeat(3, minmax(0, 1fr)) 54px;
  margin: -1px 0 0 67px;
  padding-top: 4px;
}

.profile-stat {
  gap: 0;
}

.profile-stat:nth-child(3) {
  border-right: 0;
}

.profile-stat strong {
  font-size: 12px;
}

.profile-stat span {
  font-size: 5.5px;
}

.profile-chat-button {
  min-width: 54px;
  min-height: 27px;
  padding: 0 6px;
  font-size: 8px;
}

.status-panel--compact .rating-shortcut--stars {
  min-width: 38px;
  min-height: 29px;
  padding: 3px 5px;
}

.match-status-tools {
  grid-template-columns: auto minmax(0, 1fr) 38px 38px;
}

.roster-summary-toggle {
  border-color: var(--neon-line) !important;
  background: rgba(14, 85, 76, 0.28) !important;
}

.roster-summary-toggle > span,
.roster-summary-toggle > span:first-child,
.roster-summary-toggle > span + span {
  border: 0 !important;
  background: transparent !important;
}

.roster-summary-toggle.is-active {
  margin-bottom: 0;
  border-color: var(--neon-line) !important;
  border-radius: 7px 7px 0 0 !important;
  background: rgba(14, 85, 76, 0.28) !important;
}

.roster-summary-toggle.is-active + .home-breakdowns,
.home-breakdowns:not(.is-hidden) {
  margin-top: 0;
  padding: 6px;
  border: 1px solid var(--neon-line) !important;
  border-top: 0 !important;
  border-radius: 0 0 7px 7px !important;
  background: rgba(6, 22, 25, 0.94) !important;
}

.team-distribution-panel.is-visible {
  gap: 6px !important;
  padding: 0 !important;
  transform: none !important;
}

.team-distribution-head {
  margin-bottom: 0 !important;
}

.distribution-team-count,
.distribution-pool,
.distribution-team,
.distribution-substitutions {
  margin: 0 !important;
}

.distribution-teams {
  gap: 6px !important;
}

.distribution-zone-title > span {
  display: none !important;
}

.player-pill.is-dragging {
  background: rgba(11, 27, 36, 0.9) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018) !important;
  transform: none !important;
}

.drag-ghost {
  box-sizing: border-box;
  z-index: 1400;
  max-width: none;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 4px 6px;
  overflow: hidden;
  border: 1px solid rgba(37, 215, 196, 0.68);
  border-radius: 7px;
  color: #dce5e8;
  background: rgba(11, 27, 36, 0.98);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.46), 0 0 15px rgba(37, 215, 196, 0.12);
  font-size: 9px;
  font-weight: 520;
}

.drag-ghost.is-visible {
  display: grid;
}

.drag-ghost .player-pill__name {
  overflow: hidden;
  font-size: 9px;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drag-ghost > b {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  color: #03100b;
  background: var(--neon-green);
  font-size: 8px;
}

@media (max-width: 390px) {
  .status-panel--compact .profile-row {
    grid-template-columns: 60px minmax(0, 1fr) 38px;
    gap: 6px;
    min-height: 58px;
  }

  .profile-avatar-stack {
    width: 58px;
    height: 58px;
  }

  .status-panel--compact .profile-avatar-stack .avatar {
    width: 56px;
    height: 56px;
  }

  .profile-footer {
    margin-left: 64px;
  }
}

/* Enlarged profile portrait and stable touch drag preview. */
.status-panel--compact {
  position: relative;
}

.status-panel--compact .profile-row {
  position: static;
  grid-template-columns: 102px minmax(0, 1fr) 38px;
  gap: 8px;
  min-height: 76px;
  align-items: start;
}

.profile-avatar-stack {
  position: absolute !important;
  top: 50%;
  left: 22px;
  z-index: 3;
  width: 86px;
  height: 86px;
  transform: translateY(-50%);
}

.status-panel--compact .profile-avatar-stack .avatar {
  width: 84px;
  height: 84px;
  box-shadow:
    0 0 0 2px rgba(37, 215, 196, 0.1),
    0 0 18px rgba(37, 215, 196, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.36);
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating {
  right: -5px;
  bottom: 1px;
  width: 27px;
  min-width: 27px;
  height: 28px;
  min-height: 28px;
  clip-path: polygon(50% 0, 89% 13%, 89% 55%, 77% 76%, 50% 100%, 23% 76%, 11% 55%, 11% 13%);
  filter: drop-shadow(0 0 2px #02070a);
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating::before {
  inset: 2px;
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating b {
  font-size: 8px;
}

.status-panel--compact .profile-copy {
  grid-column: 2;
  min-height: 72px;
  padding-top: 0;
}

.status-panel--compact .status-metrics {
  grid-column: 3;
}

.profile-name-line {
  position: relative;
  min-height: 34px;
  align-items: flex-start;
}

.profile-role-badge {
  position: absolute;
  bottom: 0;
  left: -30px;
  z-index: 1;
  min-width: 64px;
  min-height: 16px;
  justify-content: flex-end;
  padding: 0 7px 0 27px;
  font-size: 6.5px;
}

.profile-footer {
  margin-left: 102px;
}

.player-pill__avatar.has-loaded-avatar,
.status-panel--compact .avatar.has-loaded-avatar,
.drag-ghost .player-pill__avatar.has-loaded-avatar {
  color: transparent;
}

.is-team-distribution-focused .player-pill,
.is-team-distribution-focused .distribution-pool,
.is-team-distribution-focused .distribution-team {
  touch-action: none !important;
  overscroll-behavior: none;
}

.player-pill.is-dragging,
.drag-ghost {
  opacity: 1 !important;
}

.drag-ghost {
  background: #0b1b24 !important;
}

@media (max-width: 390px) {
  .status-panel--compact .profile-row {
    grid-template-columns: 100px minmax(0, 1fr) 36px;
    gap: 7px;
  }

  .profile-avatar-stack {
    width: 86px;
    height: 86px;
  }

  .status-panel--compact .profile-avatar-stack .avatar {
    width: 84px;
    height: 84px;
  }

  .profile-footer {
    margin-left: 107px;
  }
}

/* Unified player statistics typography and Telegram-safe team dragging. */
.app-commandbar {
  grid-template-columns: 38px minmax(0, 1fr) 72px;
}

.command-role {
  position: relative;
  width: auto;
  min-width: 58px;
  max-width: 72px;
  height: 28px;
  align-self: center;
  justify-self: end;
  overflow: hidden;
  padding: 0 8px;
  font-size: 8px;
  line-height: 1;
}

.command-role::after {
  position: absolute;
  top: -55%;
  bottom: -55%;
  left: -45%;
  width: 24%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(226, 255, 251, 0.68), transparent);
  content: "";
  transform: translateX(-180%) rotate(16deg);
  animation: command-role-shine 4.2s ease-in-out infinite;
}

@keyframes command-role-shine {
  0%, 58% { transform: translateX(-180%) rotate(16deg); }
  78%, 100% { transform: translateX(650%) rotate(16deg); }
}

.profile-name-line {
  min-height: auto;
}

.profile-name-line > strong,
.profile-match-line b,
.profile-community-brand strong {
  font-size: 11px;
  font-weight: 650 !important;
  line-height: 1.15;
}

.status-panel--compact .profile-copy {
  gap: 5px;
  align-content: center;
}

.status-panel--compact .rating-shortcut--stars {
  min-width: 48px;
  min-height: 36px;
  gap: 4px;
  padding: 2px 3px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.status-panel--compact .rating-shortcut--stars span,
.status-panel--compact .rating-shortcut--stars span svg {
  width: 21px;
  height: 21px;
}

.status-panel--compact .rating-shortcut--stars b {
  font-size: 15px;
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating {
  width: 30px;
  min-width: 30px;
  height: 26px;
  min-height: 26px;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  color: #fff;
  background: var(--neon-accent) !important;
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating::before {
  inset: 1.5px;
  background: linear-gradient(145deg, #13262d, #07151b 72%);
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating b {
  color: #fff;
  font-size: 8px;
}

.toggle-action strong {
  align-self: center;
  line-height: 18px;
  transform: translateY(3.5px);
}

body.is-team-distribution-focused,
body.is-team-distribution-focused .team-distribution-panel {
  overscroll-behavior: none;
}

body.is-dragging-player,
html.is-drag-locked,
html.is-drag-locked body {
  overflow: hidden !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .command-role::after {
    animation: none;
  }
}

/* Header curtain, tighter status card and reusable player profile sheet. */
.toast {
  box-sizing: border-box;
  top: 0;
  right: auto;
  left: 50%;
  display: grid;
  width: min(100%, 560px);
  max-width: none;
  min-height: calc(64px + env(safe-area-inset-top));
  place-items: center;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  border-width: 0 1px 1px !important;
  border-radius: 0 0 10px 10px;
  opacity: 1;
  transform: translate(-50%, calc(-100% - 4px));
  transition: transform 0.34s cubic-bezier(0.22, 0.82, 0.3, 1);
}

.toast.is-visible {
  transform: translate(-50%, 0);
}

.status-panel--compact {
  padding: 6px 12px;
}

.status-panel--compact .profile-row {
  grid-template-columns: 90px minmax(0, 1fr) 46px;
  min-height: 62px;
  gap: 7px;
}

.profile-avatar-stack {
  left: 6px;
}

.status-panel--compact .profile-copy {
  min-height: 58px;
  gap: 3px;
  align-content: start;
  padding-top: 2px;
}

.profile-footer {
  min-height: 24px;
  margin: -2px 0 0 87px;
  padding-top: 3px;
}

.profile-stat strong {
  font-size: 11px;
}

.profile-stat span {
  font-size: 5px;
}

.profile-chat-button {
  min-height: 24px;
}

.status-panel--compact .profile-avatar-stack .rating-shortcut--rating::before {
  background: linear-gradient(145deg, rgba(28, 91, 80, 0.98), rgba(9, 40, 39, 0.98) 72%);
}

.player-profile-popover {
  box-sizing: border-box;
  width: min(calc(100% - 20px), 370px);
  gap: 9px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--neon-line) !important;
  border-radius: 10px;
  color: var(--neon-text);
  background:
    linear-gradient(135deg, rgba(7, 28, 34, 0.99), rgba(4, 13, 18, 0.99) 58%, rgba(5, 25, 28, 0.99)) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.6) !important;
  text-align: left;
}

.player-profile-popover::before {
  position: absolute;
  top: -18px;
  right: -20px;
  width: 150px;
  height: 86px;
  clip-path: polygon(18% 0, 100% 0, 100% 78%, 58% 100%, 0 62%);
  background: linear-gradient(145deg, rgba(37, 215, 196, 0.16), rgba(37, 215, 196, 0.015));
  pointer-events: none;
  content: "";
}

.player-profile-popover .modal-close {
  top: 8px;
  right: 8px;
  z-index: 4;
  width: 30px;
  height: 30px;
  border: 1px solid var(--neon-line);
  border-radius: 7px;
  color: #c8d4d8;
  background: rgba(8, 23, 30, 0.9);
}

.player-profile-popover .modal-close svg {
  width: 15px;
  height: 15px;
}

.player-profile-summary {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 42px;
  gap: 9px;
  min-height: 76px;
  align-items: center;
}

.player-profile-avatar-link {
  position: relative;
  display: block;
  width: 74px;
  height: 74px;
  color: inherit;
  text-decoration: none;
}

.player-profile-avatar-link .avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(37, 215, 196, 0.72);
  box-shadow: 0 0 16px rgba(37, 215, 196, 0.18), 0 8px 20px rgba(0, 0, 0, 0.34);
}

.player-profile-rating {
  position: absolute;
  right: -4px;
  bottom: 2px;
  z-index: 2;
  display: grid !important;
  width: 30px;
  height: 26px;
  place-items: center;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  color: #fff !important;
  background: linear-gradient(145deg, rgba(28, 91, 80, 0.98), rgba(9, 40, 39, 0.98));
  font-size: 8px !important;
  font-weight: 800;
  filter: drop-shadow(0 0 2px #02070a);
}

.player-profile-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.player-profile-copy > strong,
.player-profile-copy > span,
.player-profile-community b {
  overflow: hidden;
  color: #f3f8f9 !important;
  font-size: 11px !important;
  font-weight: 650;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-profile-community {
  display: flex !important;
  gap: 5px;
  align-items: center;
}

.player-profile-community svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: var(--neon-accent);
}

.player-profile-stars {
  display: flex !important;
  gap: 3px;
  align-items: center;
  justify-content: flex-end;
  padding-right: 3px;
  color: #ffd05a !important;
}

.player-profile-stars svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.player-profile-stars b {
  font-size: 14px;
}

.player-profile-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 5px;
  border-top: 1px solid var(--neon-line);
}

.player-profile-stats > span {
  display: grid !important;
  gap: 1px;
  place-items: center;
  border-right: 1px solid var(--neon-line);
}

.player-profile-stats > span:last-child {
  border-right: 0;
}

.player-profile-stats strong {
  color: var(--neon-accent);
  font-size: 12px;
}

.player-profile-stats small {
  color: #829099;
  font-size: 6px;
  text-transform: uppercase;
}

.player-profile-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.player-profile-actions button,
.player-profile-actions a {
  display: inline-flex;
  min-height: 38px;
  gap: 6px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--neon-line);
  border-radius: 7px;
  color: #eafffc;
  background: rgba(8, 28, 34, 0.78);
  font-size: 9px;
  font-weight: 650;
  text-decoration: none;
}

.player-profile-actions svg {
  width: 14px;
  height: 14px;
  color: var(--neon-accent);
}

.player-profile-actions .is-disabled,
.player-profile-avatar-link.is-disabled {
  opacity: 0.45;
}

@media (max-width: 390px) {
  .status-panel--compact .profile-row {
    grid-template-columns: 90px minmax(0, 1fr) 42px;
  }

  .profile-footer {
    margin-left: 87px;
  }
}
