:root {
  --bg: #101419;
  --panel: #191d22;
  --line: #42484f;
  --text: #e1e3e6;
  --muted: #bec0c8;
  --lime: #00ef88;
  --blue: #a3cafa;
  --screen-width: min(100vw, 590px);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body {
  background: #080c10;
}
.reference-app {
  max-width: 590px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  padding-bottom: 150px;
  overflow-x: hidden;
}
.ref-header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 89px;
  padding: 17px 22px 12px;
  background: var(--bg);
}
.ref-title {
  display: block;
  flex: 1;
  text-align: left;
  position: relative;
  padding: 0;
  font-size: 18px;
  line-height: 1.3;
}
.ref-title small {
  font-size: 16px;
  display: block;
}
.ref-title > .icon {
  position: absolute;
  left: 110px;
  top: 16px;
  width: 16px;
}
.ref-header-actions {
  display: flex;
  gap: 23px;
}
.ref-icon {
  padding: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 35px;
}
.ref-icon .icon {
  width: 25px;
  height: 25px;
}
.ref-header > .ref-icon[data-action="ref-back"] .icon {
  transform: rotate(180deg);
}
.ref-page-title {
  font-size: 25px;
  flex: 1;
}
.ref-tabs {
  display: flex;
  justify-content: space-around;
  height: 56px;
  align-items: stretch;
  background: var(--bg);
}
.ref-tabs button {
  position: relative;
  flex: 1;
  color: #c2c3cc;
  font-size: 16px;
  letter-spacing: 0.3px;
  padding: 0 7px;
}
.ref-tabs button.active {
  color: var(--blue);
}
.ref-tabs button.active:after {
  content: "";
  height: 4px;
  width: 76px;
  max-width: 80%;
  border-radius: 8px 8px 0 0;
  background: var(--blue);
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}
.ref-pitch-wrap {
  position: relative;
}
.pitch {
  min-height: 0;
  border-radius: 0;
  isolation: isolate;
  padding: 8px 3px 0;
  background:
    repeating-linear-gradient(
      0deg,
      #0b593944 0px,
      #0b593944 110px,
      #0f5f3400 110px,
      #0f5f3400 220px
    ),
    radial-gradient(ellipse at 50% 38%, #13884e, #00452f);
  overflow: hidden;
}
.pitch-lines {
  inset: 57px 11px 115px;
  border: 2px solid #87c4a46e;
}
.pitch-lines:before {
  top: 70%;
}
.pitch-lines:after {
  top: 70%;
  width: 32%;
  height: auto;
  aspect-ratio: 1;
}
.box {
  height: 75px;
  width: 49%;
  left: 25.5%;
}
.box:after {
  height: 38px;
}
.pitch-row {
  min-height: 0;
  margin: 0 0 8px;
  display: flex;
  justify-content: space-around;
  gap: 4px;
}
.player {
  width: 19%;
  max-width: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-width: 0;
  padding: 0;
}
.kit,
.bench .kit,
.mobile-five .kit {
  --kit-width: calc(var(--screen-width) * 0.174);
  width: var(--kit-width);
  height: calc(var(--kit-width) * 0.96);
  filter: none;
  object-fit: contain;
  display: block;
  margin: 0;
  flex-shrink: 0;
}
.mini-kit,
.table-player .kit {
  --kit-width: 31px;
  width: var(--kit-width);
  height: 35px;
}
.club-fallback {
  display: grid;
  place-items: center;
  background: #3b4952;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}
.player-label {
  background: #101419;
  border: 0;
  border-bottom: 5px solid #deded0;
  border-radius: 5px 5px 2px 2px;
  font-size: 15px;
  box-shadow: none;
  margin: 0;
  width: 100%;
  display: block;
}
.player-label strong {
  font-weight: 400;
  padding: 3px 3px;
  line-height: 1.4;
}
.player-label span {
  background: #36393e;
  color: #e3e3e9;
  padding: 2px;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.4px;
}
.player-label .difficulty-4,
.player-label .difficulty-5 {
  background: #353a3d;
  color: #eceef2;
}
.player:has(.injury) .player-label {
  border-image: linear-gradient(
      90deg,
      #fa0063 0 33%,
      #deded0 33% 66%,
      #00e992 66%
    )
    1;
}
.captain,
.injury,
.bench .captain,
.bench .injury,
.mobile-five .captain,
.mobile-five .injury {
  top: auto;
  bottom: 61px;
  width: 24px;
  height: 24px;
  font-size: 15px;
  border: 1px solid #eee;
  right: 5px;
  background: #101719;
}
.injury {
  left: 6px;
  right: auto;
  background: #fff080;
  color: #132516;
  border: 0;
  font-size: 12px;
}
.bench {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  border-radius: 0;
  position: relative;
}
.bench-head {
  margin: 0;
  position: absolute;
  top: -27px;
  left: 6px;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: none;
  color: #bac9bb;
}
.bench-head span:last-child {
  display: none;
}
.bench .pitch-row {
  margin: 0;
  min-height: 0;
  padding-bottom: 0;
}
.bench .player {
  width: 19%;
  max-width: 112px;
}
.ref-pitch-wrap .pitch-row:nth-child(4) {
  justify-content: space-around;
}
.ref-pitch-wrap .pitch-row {
  padding-bottom: 0;
  margin-bottom: 7px;
}
.ref-add {
  position: absolute;
  right: 7%;
  top: 4%;
  width: 70px;
  height: 70px;
  background: #1c5078;
  border-radius: 21px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px #001d2555;
}
.ref-add .icon {
  width: 30px;
  height: 30px;
}
.ref-nav {
  height: 96px;
  position: fixed;
  bottom: 75px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 590px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #1d2127;
  z-index: 25;
  border-top: 0;
}
.ref-nav button {
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #c1c5cf;
  padding: 5px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 20%;
}
.ref-nav button span {
  width: 78px;
  max-width: 95%;
  height: 41px;
  border-radius: 30px;
  display: grid;
  place-items: center;
}
.ref-nav button.active span {
  background: #435464;
  color: #d3e0f8;
}
.ref-nav .icon {
  width: 29px;
  height: 29px;
  stroke-width: 2.5;
}
.ref-promo {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 590px;
  width: 100%;
  height: 75px;
  background: #101419;
  padding: 14px;
  z-index: 24;
  text-align: center;
  font-size: 14px;
}
.ref-promo b,
.ref-promo span {
  display: block;
  line-height: 1.6;
}
.ref-promo button {
  padding: 0;
  color: #d3d3dc;
}
.reference-app:has(.ref-nav):not(:has(.ref-promo)) {
  padding-bottom: 95px;
}
.reference-app:not(:has(.ref-promo)) .ref-nav {
  bottom: 0;
}
.reference-app:not(:has(.ref-nav)) {
  padding-bottom: 20px;
}
.reference-app .button {
  font-size: 16px;
  font-weight: 400;
  padding: 10px 22px;
  border-radius: 26px;
}
.reference-app .button.blue,
.reference-app .button.primary {
  background: var(--blue);
  border: 0;
  color: #162b3d;
}
.ref-panel {
  background: var(--panel);
  border: 1px solid #484c52;
  border-radius: 15px;
  margin: 14px 14px 0;
  padding: 14px 12px;
  overflow: hidden;
}
.ref-panel h2 {
  color: var(--blue);
  font-family: var(--font);
  font-size: 21px;
  letter-spacing: 0.5px;
  font-weight: 750;
  margin: 0 0 16px;
}
.status-row {
  border-color: #3c3f45;
  padding: 13px 0;
  font-size: 18px;
  font-weight: 400;
}
.status-row span:first-child {
  color: #d4d5dc;
  flex: 1;
}
.status-row span:last-child,
.status-row b {
  width: 40%;
  font-weight: 400;
}
.status-row b {
  font-weight: 700;
}
.ref-panel table {
  font-size: 16px;
}
.ref-panel th {
  background: #3e4a59;
  color: #d6dbe3;
  text-decoration: underline;
  font-size: 16px;
  padding: 7px 8px;
}
.ref-panel td {
  padding: 12px 8px;
  font-size: 16px;
  border-color: #3c3f45;
}
.general-leagues button {
  display: grid;
  grid-template-columns: 30px 1fr 60%;
  width: 100%;
  text-align: left;
  border-top: 1px solid #41464c;
  align-items: center;
  padding: 13px 18px;
  font-size: 18px;
  gap: 4px;
}
.general-leagues span {
  color: #707178;
}
.general-leagues b {
  font-weight: 400;
}
.general-private {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  font-size: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.general-private span {
  color: var(--muted);
  margin-left: auto;
  font-size: 12px;
}
.ref-gameweek {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 2px 19px 10px;
}
.ref-gameweek b {
  font-size: 21px;
  display: block;
  letter-spacing: 0.5px;
}
.ref-gameweek small {
  font-size: 14px;
  display: block;
}
.round-button {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  background: #415163;
  display: grid;
  place-items: center;
}
.round-button:first-child .icon {
  transform: rotate(180deg);
}
.fixture-card h2 {
  text-align: center;
  margin: 0 0 12px;
}
.fixture-row {
  grid-template-columns: 1fr 74px 1fr;
  padding: 10px 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  gap: 6px;
}
.fixture-row .mini-kit {
  --kit-width: 39px;
  height: 46px;
}
.fixture-time {
  border: 1px solid #9099a6;
  border-radius: 26px;
  background: #3e4b5d;
  color: #e8ebf2;
  font-size: 16px;
  padding: 7px 5px;
}
.ref-finance {
  border-radius: 18px 18px 0 0;
  background: #191d22;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 15px 14px;
  margin-top: 0;
  align-items: center;
}
.ref-finance p {
  border-bottom: 1px solid #45474b;
  margin: 0;
  padding: 5px 0;
  font-size: 20px;
}
.ref-finance p:last-child {
  border: 0;
}
.ref-finance b {
  color: var(--lime);
  font-weight: 750;
}
.ref-finance > div:last-child {
  text-align: center;
  font-size: 19px;
}
.ref-finance strong {
  display: block;
}
.ref-finance span {
  display: block;
  font-size: 17px;
  line-height: 1.5;
}
.ref-finance .button {
  font-size: 12px;
  padding: 7px 12px;
  margin-top: 8px;
}
.selection-pitch .pitch-row {
  margin-bottom: 14px;
}
.selection-pitch .kit {
  --kit-width: calc(var(--screen-width) * 0.19);
  height: calc(var(--kit-width) * 1.12);
}
.selection-pitch .player-label strong {
  min-height: 33px;
}
.selection-pitch .player-label span {
  font-weight: 700;
}
.squad-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 0 14px 12px;
}
.squad-fields input,
.squad-fields select {
  background: transparent;
  border: 1px solid #adb4c0;
  border-radius: 4px;
  font-size: 19px;
  padding: 14px;
  width: 100%;
  height: 59px;
}
.floating {
  position: relative;
}
.floating > span {
  position: absolute;
  top: -12px;
  left: 14px;
  background: var(--bg);
  padding: 0 5px;
  font-size: 14px;
  color: #b6bcc7;
}
.ref-bank {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 32px 14px 15px;
  background: #191d22;
  border-radius: 18px 18px 0 0;
}
.ref-bank > div {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 1px;
}
.ref-bank b {
  display: block;
  color: var(--lime);
  font-size: 28px;
  letter-spacing: 0;
  margin-top: 10px;
}
.ref-bank .negative {
  color: #fa0063;
}
.ref-bank .button {
  padding: 12px 24px;
}
.empty-player .player-label {
  border-bottom-color: transparent;
}
.market-bank {
  font-size: 18px;
  text-align: center;
  margin-left: auto;
  line-height: 1.3;
}
.market-bank b {
  color: var(--lime);
  font-size: 18px;
  display: block;
}
.ref-market-table {
  padding-bottom: 110px;
}
.ref-market-table table {
  font-size: 18px;
}
.ref-market-table th {
  font-size: 18px;
  background: #3c495a;
  color: #c9d5e6;
  padding: 12px 6px;
}
.ref-market-table th:not(:first-child),
.ref-market-table td:not(:first-child) {
  text-align: center;
  width: 24%;
}
.ref-market-table td {
  padding: 11px 7px;
  border-color: #353a40;
  font-size: 18px;
  height: 70px;
}
.ref-market-table .table-player {
  width: 100%;
  gap: 8px;
}
.ref-market-table .table-player .kit {
  --kit-width: 38px;
}
.ref-market-table .table-player b {
  font-size: 18px;
  font-weight: 400;
}
.ref-market-table .table-player small {
  font-size: 12px;
  white-space: nowrap;
  font-weight: 700;
  display: block;
  color: #e3e8ec;
}
.ref-market-table .table-player small b {
  font-size: 13px;
  font-weight: 700;
  display: inline;
}
.position {
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  padding: 2px 7px;
  color: #03170e;
}
.position.GKP {
  background: #dcfa00;
}
.position.DEF {
  background: #00ef84;
}
.position.MID {
  background: #00e5df;
}
.position.FWD {
  background: #fa0063;
  color: #fff;
}
.ref-market-table .position {
  font-size: 13px;
}
.ref-market-controls {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 590px;
  width: 100%;
  background: #3c495a;
  display: grid;
  grid-template-columns: 1fr 1fr 80px;
  z-index: 25;
  height: 90px;
  padding: 8px 0 14px;
}
.ref-market-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 19px;
  line-height: 1.3;
  border-right: 1px solid #93a0b1;
}
.ref-market-controls button:last-child {
  border: 0;
}
.ref-market-controls small {
  font-size: 12px;
  display: block;
  color: #b8c5d7;
}
.ref-search {
  padding: 0 14px 12px;
}
.ref-search input {
  font-size: 18px;
}
dialog {
  position: fixed;
  top: auto;
  left: 50%;
  right: auto;
  bottom: 0;
  transform: translateX(-50%);
  margin: 0;
  width: min(590px, 100vw);
  max-width: 590px;
  max-height: 94dvh;
  border: 0;
  border-radius: 20px 20px 0 0;
  background: #191d22;
  padding-top: 24px;
  color: #cdd0d9;
}
dialog:before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 45px;
  height: 5px;
  background: #bfc0c8;
  border-radius: 4px;
}
dialog::backdrop {
  background: #0008;
  backdrop-filter: none;
}
.modal-head {
  border: 0;
  padding: 32px 26px 18px;
  text-align: center;
  color: var(--blue);
  font-size: 23px;
  gap: 12px;
}
.modal-head h2 {
  font-size: 24px;
  text-align: center;
  width: 100%;
  font-weight: 800;
}
.modal-head .icon-button {
  position: absolute;
  right: 14px;
  top: 31px;
  border: 0;
}
.modal-body {
  padding: 12px 14px 25px;
}
.modal-body p {
  font-size: 18px;
  color: #c9cbd4;
}
.modal-body label {
  font-size: 17px;
}
.modal-body input,
.modal-body select {
  font-size: 18px;
}
.modal-footer {
  justify-content: center;
  padding: 0 20px 20px;
}
.modal-footer .button,
.modal-body .button {
  border-radius: 25px;
  background: var(--blue);
  color: #163149;
  font-size: 17px;
  font-weight: 400;
  padding: 11px 24px;
}
.modal-body .button.danger {
  background: #30242a;
  color: #ff839f;
}
.sheet-position {
  position: absolute;
  left: 25px;
  top: 65px;
  display: grid;
  gap: 3px;
  line-height: 1;
}
.sheet-position .position {
  font-size: 14px;
  font-weight: 700;
  width: max-content;
}
.sheet-position small {
  font-size: 14px;
  color: var(--lime);
}
.sheet-player-name {
  display: block;
  margin-left: 67px;
  font-size: 24px;
  letter-spacing: 0.3px;
}
.sheet-actions {
  display: grid;
  gap: 0;
  margin-bottom: 30px;
}
.sheet-actions button {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 23px;
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0.2px;
  text-align: left;
}
.sheet-actions .icon {
  width: 26px;
  height: 26px;
  stroke-width: 2;
}
.sheet-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid #474b51;
  margin-top: 10px;
}
.sheet-stats div {
  border-right: 1px solid #474b51;
  text-align: center;
  padding: 8px 2px;
  font-size: 13px;
}
.sheet-stats div:last-child {
  border: 0;
}
.sheet-stats b {
  display: block;
  font-size: 19px;
  font-weight: 750;
}
.sheet-fixtures {
  display: flex;
  gap: 7px;
  margin-top: 12px;
  justify-content: flex-end;
}
.sheet-fixtures > div {
  display: grid;
  text-align: center;
  gap: 3px;
  font-size: 12px;
}
.fdr {
  border-radius: 20px;
  background: #e9e9df;
  color: #141817;
  font-size: 15px;
  font-weight: 700;
  padding: 5px 13px;
  min-width: 53px;
  white-space: nowrap;
}
.fdr-2 {
  background: #00ef83;
}
.fdr-4 {
  background: #fa0063;
  color: #fff;
}
.fdr-5 {
  background: #901c45;
  color: #fff;
}
.ref-injury {
  background: #ffed71;
  color: #080c10;
  text-align: center;
  font-size: 18px;
  margin: 0 0 10px;
}
.price-range {
  display: flex;
  gap: 22px;
  align-items: center;
  border-bottom: 1px solid #45474f;
  padding: 0 14px 20px;
}
.price-range span {
  text-align: center;
  font-size: 17px;
  flex-shrink: 0;
}
.price-range b {
  display: block;
  color: var(--lime);
  font-size: 17px;
}
.price-range input {
  padding: 0;
  accent-color: var(--blue);
}
.filter-pills {
  display: flex;
  justify-content: space-around;
  gap: 14px;
  margin: 15px 0;
}
.filter-pills button {
  border: 1px solid #aeb5be;
  border-radius: 40px;
  height: 58px;
  min-width: 75px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  font-size: 17px;
  padding: 5px 13px;
}
.filter-pills .active {
  background: #3e4c5d;
  border: 0;
}
.slate-heading {
  background: #3c495a;
  padding: 9px;
  text-align: center;
  position: relative;
  font-size: 17px;
  letter-spacing: 0.5px;
}
.slate-heading button {
  position: absolute;
  right: 8px;
  top: 6px;
}
.filter-positions {
  display: flex;
  justify-content: space-around;
  gap: 10px;
  margin: 18px 0;
}
.filter-positions button {
  border: 1px solid #b3bcc4;
  border-radius: 30px;
  padding: 11px 23px;
  font-size: 16px;
  color: #88929d;
}
.filter-positions button.active {
  background: #e4fc00;
  color: #101419;
  border-color: #e4fc00;
}
.filter-positions button.DEF {
  background: #00ef83;
  border-color: #00ef83;
}
.filter-positions button.MID {
  background: #00e5df;
  border-color: #00e5df;
}
.filter-positions button.FWD {
  background: #fa0063;
  border-color: #fa0063;
}
.filter-clubs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  margin: 12px 0;
}
.filter-clubs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #3d4b5c;
  border: 1px solid transparent;
  border-radius: 50%;
  padding: 6px 2px;
  font-size: 16px;
  aspect-ratio: 1;
}
.filter-clubs button.active {
  border-color: var(--blue);
  background: #64788c;
}
.filter-clubs .mini-kit {
  --kit-width: 37px;
  height: 43px;
}
.filter-apply {
  display: flex !important;
  margin: 20px auto 0;
}
.sort-options button {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
  border-bottom: 1px solid #3b3f45;
  padding: 17px 26px;
  font-size: 18px;
  text-align: left;
}
.radio {
  width: 24px;
  height: 24px;
  border: 2px solid #bdc4cd;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}
.radio.checked {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 4px #191d22;
  background: var(--blue);
}
.ref-detail-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 12px 0 18px;
}
.ref-detail-hero .kit {
  --kit-width: 94px;
}
.ref-detail-hero b {
  display: block;
  font-size: 18px;
  letter-spacing: 0.4px;
}
.ref-detail-hero .position {
  font-size: 19px;
  font-weight: 700;
}
.ref-watch {
  display: flex;
  margin: 18px auto;
}
.blue-text {
  color: var(--blue);
}
.ref-panel .fixture-team .mini-kit {
  --kit-width: 31px;
  height: 36px;
}
.ref-points {
  background: #191d22;
  text-align: center;
  padding: 13px;
  font-size: 16px;
}
.ref-points b {
  font-size: 32px;
  color: var(--blue);
  display: block;
}
.ref-points small {
  font-size: 12px;
  color: var(--muted);
}
.ref-news-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5px;
  border-top: 1px solid #464a51;
  color: #d5d9df;
  text-decoration: none;
  font-size: 18px;
}
.ref-panel textarea {
  width: 100%;
  padding: 12px;
  font: inherit;
  background: #101419;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 5px;
}
.rss-label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.rss-label input {
  width: 24px;
  height: 24px;
  accent-color: var(--blue);
}
.login-page {
  padding-bottom: 0 !important;
  background: #0a79a4;
  min-height: 100dvh;
}
.ref-login {
  min-height: 100dvh;
  background-image: url("/assets/login-reference.jpeg");
  background-size: 100% auto;
  background-position: center top;
  position: relative;
  padding: 0 27px 110px;
  display: flex;
  flex-direction: column;
}
.ref-logo {
  height: calc(var(--screen-width) * 0.92);
  margin: 0 -27px;
  background-image: url("/assets/login-reference.jpeg");
  background-size: 100% auto;
  background-position: center -75px;
  background-color: #062a57;
}
.ref-login form {
  margin-top: 70px;
  position: relative;
  background: #1188aa;
  padding: 0 0 16px;
}
.ref-login label {
  background: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 7px 16px;
  margin-bottom: 12px;
  color: #087cbc;
}
.ref-login input {
  background: #fff;
  color: #283337;
  border: 0;
  font-size: 19px;
  padding: 10px 0;
  border-radius: 0;
  outline: none;
}
.login-button {
  background: #222;
  border-radius: 40px;
  width: 100%;
  font-size: 18px;
  color: white;
  height: 50px;
}
.ref-login p {
  margin: 0 -10px;
  padding: 12px 0 10px;
  text-align: center;
  font-size: 18px;
  background: #1388a6;
  color: #bedae5;
}
.ref-login p button,
.registration-panel p button {
  color: white;
  font-weight: 700;
  padding: 0;
}
.login-tools {
  position: absolute;
  bottom: 42px;
  left: 27px;
  right: 27px;
  display: flex;
  justify-content: space-between;
}
.login-tools button {
  background: #202225;
  border-radius: 17px;
  width: 51px;
  height: 51px;
  box-shadow: 0 6px 8px #0004;
  display: grid;
  place-items: center;
}
.login-tools .icon {
  width: 29px;
  height: 29px;
}
.local-auth-note {
  font-size: 12px;
  text-align: center;
  display: block;
  background: #1188aa;
  color: #d7eef6;
  padding: 8px;
}
.registration-panel {
  margin-top: 4px;
  padding: 14px 13px 20px;
}
.registration-panel input {
  border-radius: 4px;
  background: #191d22;
  border-color: #aab0ba;
  font-size: 20px;
}
.registration-panel .button {
  width: 100%;
  margin: 18px 0 10px;
}
.registration-panel p {
  text-align: center;
  font-size: 18px;
  margin-top: 15px;
}
.registration-panel p button {
  color: var(--blue);
}
.registration-panel .local-auth-note {
  background: none;
  color: #8896a4;
}
.ref-panel .table-player b {
  font-size: 16px;
}
.ref-panel .table-player small {
  font-size: 12px;
}
#toast {
  bottom: 180px;
}
.gw-grid button.active {
  background: #3c4b5a;
  color: #dce7f6;
  border-color: #a5b5c3;
}
.modal-body .note,
.ref-panel .note {
  font-size: 14px;
  color: #a5a9b4;
}
@media (max-width: 450px) {
  .ref-header {
    height: 69px;
    padding: 12px 15px 9px;
    gap: 10px;
  }
  .ref-title {
    font-size: 15px;
  }
  .ref-title small {
    font-size: 14px;
  }
  .ref-header-actions {
    gap: 20px;
  }
  .ref-icon {
    width: 25px;
    height: 29px;
  }
  .ref-icon .icon {
    width: 23px;
    height: 23px;
  }
  .ref-page-title {
    font-size: 21px;
  }
  .ref-tabs {
    height: 45px;
  }
  .ref-tabs button {
    font-size: 14px;
  }
  .ref-tabs button.active:after {
    height: 3px;
    width: 51px;
  }
  .player-label {
    font-size: 12px;
    border-bottom-width: 4px;
  }
  .player-label span {
    font-size: 12px;
    padding: 2px;
  }
  .player-label strong {
    padding: 2px 1px;
  }
  .pitch-row {
    margin-bottom: 7px;
  }
  .bench-head {
    font-size: 11px;
    top: -20px;
  }
  .captain,
  .injury,
  .bench .captain,
  .bench .injury,
  .mobile-five .captain,
  .mobile-five .injury {
    bottom: 47px;
    width: 19px;
    height: 19px;
    font-size: 12px;
  }
  .injury {
    font-size: 10px;
  }
  .ref-add {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    right: 7%;
  }
  .ref-add .icon {
    width: 24px;
    height: 24px;
  }
  .pitch-lines {
    inset: 39px 8px 82px;
  }
  .box {
    height: 52px;
  }
  .box:after {
    height: 29px;
  }
  .ref-nav {
    height: 74px;
    bottom: 64px;
  }
  .ref-nav button {
    font-size: 11px;
    gap: 4px;
  }
  .ref-nav button span {
    height: 34px;
    width: 59px;
  }
  .ref-nav .icon {
    width: 25px;
    height: 25px;
  }
  .ref-promo {
    height: 64px;
    font-size: 12px;
    padding: 9px;
  }
  .reference-app {
    padding-bottom: 138px;
  }
  .reference-app:has(.ref-nav):not(:has(.ref-promo)) {
    padding-bottom: 74px;
  }
  .ref-panel {
    margin: 11px 10px 0;
    padding: 13px 9px;
    border-radius: 12px;
  }
  .ref-panel h2 {
    font-size: 18px;
    margin-bottom: 13px;
  }
  .status-row {
    font-size: 15px;
    padding: 11px 0;
  }
  .ref-panel th,
  .ref-panel td {
    font-size: 14px;
    padding: 7px 5px;
  }
  .general-leagues button {
    font-size: 16px;
    padding: 12px 12px;
  }
  .fixture-row {
    font-size: 12px;
    grid-template-columns: 1fr 57px 1fr;
    gap: 5px;
    padding: 9px 0;
  }
  .fixture-row .mini-kit {
    --kit-width: 28px;
    height: 36px;
  }
  .fixture-row .home,
  .fixture-row .away {
    gap: 5px;
  }
  .fixture-time {
    font-size: 14px;
    padding: 5px 3px;
  }
  .ref-gameweek {
    padding: 0 13px 8px;
  }
  .ref-gameweek b {
    font-size: 19px;
  }
  .ref-gameweek small {
    font-size: 12px;
  }
  .round-button {
    height: 41px;
    width: 41px;
  }
  .ref-finance {
    padding: 11px 10px;
  }
  .ref-finance p {
    font-size: 17px;
  }
  .ref-finance > div:last-child {
    font-size: 17px;
  }
  .ref-finance span {
    font-size: 15px;
  }
  .ref-finance .button {
    font-size: 11px;
    padding: 6px 10px;
  }
  .squad-fields {
    padding: 0 10px 10px;
    gap: 5px;
  }
  .squad-fields input,
  .squad-fields select {
    font-size: 16px;
    padding: 10px 12px;
    height: 49px;
  }
  .floating > span {
    font-size: 12px;
    top: -10px;
    left: 9px;
  }
  .selection-pitch .pitch-row {
    margin-bottom: 12px;
  }
  .selection-pitch .player-label strong {
    min-height: 25px;
  }
  .ref-bank {
    padding: 25px 10px 15px;
  }
  .ref-bank > div {
    font-size: 18px;
  }
  .ref-bank b {
    font-size: 25px;
    margin-top: 8px;
  }
  .ref-bank .button {
    padding: 10px 19px;
    font-size: 15px;
  }
  .market-bank {
    font-size: 15px;
  }
  .market-bank b {
    font-size: 15px;
  }
  .ref-market-table th,
  .ref-market-table td {
    font-size: 15px;
  }
  .ref-market-table td {
    height: 57px;
    padding: 9px 5px;
  }
  .ref-market-table .table-player .kit {
    --kit-width: 31px;
  }
  .ref-market-table .table-player b {
    font-size: 16px;
  }
  .ref-market-table .table-player small {
    font-size: 11px;
  }
  .ref-market-table .table-player .position {
    font-size: 11px;
    padding: 1px 5px;
  }
  .ref-market-controls {
    height: 74px;
    grid-template-columns: 1fr 1fr 62px;
  }
  .ref-market-controls button {
    font-size: 16px;
    gap: 9px;
  }
  .ref-market-controls small {
    font-size: 10px;
  }
  .modal-head {
    padding: 26px 20px 13px;
  }
  .modal-head h2 {
    font-size: 21px;
  }
  .modal-body {
    padding: 10px 10px 22px;
  }
  .modal-body p {
    font-size: 16px;
  }
  .modal-head .icon-button {
    top: 27px;
    right: 8px;
  }
  .sheet-position {
    left: 17px;
    top: 57px;
  }
  .sheet-position .position,
  .sheet-position small {
    font-size: 12px;
  }
  .sheet-player-name {
    font-size: 20px;
    margin-left: 58px;
  }
  .sheet-actions {
    margin-bottom: 21px;
  }
  .sheet-actions button {
    font-size: 19px;
    padding: 13px 16px;
    gap: 9px;
  }
  .sheet-actions .icon {
    width: 23px;
    height: 23px;
  }
  .sheet-stats div {
    font-size: 11px;
    padding: 7px 1px;
  }
  .sheet-stats b {
    font-size: 17px;
  }
  .ref-injury {
    font-size: 15px;
  }
  .price-range {
    gap: 12px;
    padding: 0 8px 16px;
  }
  .price-range span,
  .price-range b {
    font-size: 15px;
  }
  .filter-pills {
    gap: 10px;
    margin: 12px 0;
  }
  .filter-pills button {
    height: 47px;
    min-width: 60px;
    font-size: 14px;
    padding: 4px 10px;
  }
  .filter-pills .icon {
    width: 20px;
    height: 20px;
  }
  .slate-heading {
    font-size: 15px;
    padding: 7px;
  }
  .filter-positions button {
    font-size: 14px;
    padding: 9px 17px;
  }
  .filter-clubs {
    gap: 6px;
  }
  .filter-clubs button {
    font-size: 13px;
    padding: 4px 1px;
  }
  .filter-clubs .mini-kit {
    --kit-width: 27px;
    height: 34px;
  }
  .sort-options button {
    font-size: 16px;
    gap: 25px;
    padding: 16px 20px;
  }
  .radio {
    width: 21px;
    height: 21px;
  }
  .ref-detail-hero {
    margin: 10px 0 14px;
    gap: 10px;
  }
  .ref-detail-hero .kit {
    --kit-width: 75px;
  }
  .ref-detail-hero b {
    font-size: 16px;
  }
  .ref-detail-hero .position {
    font-size: 16px;
  }
  .ref-panel .fixture-team .mini-kit {
    --kit-width: 26px;
    height: 31px;
  }
  .fdr {
    font-size: 13px;
    padding: 3px 10px;
    min-width: 43px;
  }
  .ref-login {
    padding: 0 20px 95px;
  }
  .ref-logo {
    margin: 0 -20px;
    height: calc(var(--screen-width) * 0.86);
    background-position: center -49px;
  }
  .ref-login form {
    margin-top: 70px;
  }
  .ref-login label {
    gap: 12px;
    padding: 5px 14px;
    margin-bottom: 10px;
  }
  .ref-login input {
    font-size: 17px;
    padding: 8px 0;
  }
  .ref-login p {
    font-size: 15px;
    padding: 11px 0;
  }
  .login-button {
    height: 43px;
    font-size: 16px;
  }
  .login-tools {
    bottom: 30px;
    left: 20px;
    right: 20px;
  }
  .login-tools button {
    width: 45px;
    height: 45px;
    border-radius: 13px;
  }
  .local-auth-note {
    font-size: 10px;
  }
  .registration-panel input {
    font-size: 17px;
  }
  .registration-panel p {
    font-size: 15px;
  }
  .ref-news-link {
    font-size: 16px;
  }
  .ref-panel .table-player b {
    font-size: 14px;
  }
  #toast {
    bottom: 150px;
  }
}

.empty-kit {
  object-fit: contain;
}
.modal-head button {
  flex-shrink: 0;
}

@font-face {
  font-family: Mulish;
  src: url("/assets/mulish_regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
:root {
  --font: Mulish, system-ui, sans-serif;
}
body,
button,
input,
select,
textarea {
  font-family: var(--font);
}
.pitch-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}
.pitch-row .player {
  width: 100%;
  max-width: none;
  grid-row: 1;
}
.pitch-row[data-count="1"] .player {
  grid-column: 3;
}
.pitch-row[data-count="2"] .player:nth-child(1) {
  grid-column: 2;
}
.pitch-row[data-count="2"] .player:nth-child(2) {
  grid-column: 4;
}
.pitch-row[data-count="3"] .player:nth-child(1) {
  grid-column: 2;
}
.pitch-row[data-count="3"] .player:nth-child(2) {
  grid-column: 3;
}
.pitch-row[data-count="3"] .player:nth-child(3) {
  grid-column: 4;
}
.pitch-row[data-count="4"] .player:nth-child(1),
.bench-row .player:nth-child(1) {
  grid-column: 1;
}
.pitch-row[data-count="4"] .player:nth-child(2) {
  grid-column: 2;
}
.pitch-row[data-count="4"] .player:nth-child(3) {
  grid-column: 4;
}
.pitch-row[data-count="4"] .player:nth-child(4) {
  grid-column: 5;
}
.bench-row .player:nth-child(2) {
  grid-column: 3;
}
.bench-row .player:nth-child(3) {
  grid-column: 4;
}
.bench-row .player:nth-child(4) {
  grid-column: 5;
}
.ref-nav .icon path {
  stroke-linecap: round;
}
.ref-nav [data-view="status"] .icon {
  stroke-width: 5;
}
.squad-fields label {
  min-width: 0;
}
.squad-fields .field-error input,
.squad-fields .field-error select {
  border-color: #e3a3a5;
  color: #e3a3a5;
}
.squad-fields .field-error > span {
  color: #e3a3a5;
}
.squad-fields label > small {
  display: block;
  color: #e3a3a5;
  font-size: 16px;
  padding: 5px 18px 0;
  white-space: nowrap;
}
#alert {
  top: 50%;
  bottom: auto;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, 82vw);
  border-radius: 34px;
  background: #272b30;
  padding: 20px 28px 18px;
  max-height: 80dvh;
}
#alert:before {
  display: none;
}
#alert p {
  margin: 0 0 34px;
  font-size: 20px;
  line-height: 1.4;
}
#alert button {
  display: block;
  margin-left: auto;
  padding: 10px 25px;
  font-size: 20px;
  color: var(--blue);
}
.sheet-fixtures {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}
.sheet-fixtures > div {
  min-width: 0;
}
.sheet-fixtures .fdr {
  padding: 7px 0;
  min-width: 0;
  font-size: 15px;
}
.sheet-fixtures .past-fixture {
  background: #2d3034;
  color: #e1e3e6;
  border-radius: 30px;
  padding: 4px 0;
  line-height: 1.3;
}
.past-fixture span {
  display: block;
  color: var(--lime);
  font-size: 13px;
  font-weight: 700;
}
.ref-market-table th button {
  padding: 0;
  color: inherit;
  text-decoration: underline;
}
.ref-market-table table.expanded {
  min-width: 840px;
  table-layout: fixed;
}
.ref-market-table table.expanded th:first-child {
  width: 210px;
}
.ref-market-table table.expanded td:not(:first-child),
.ref-market-table table.expanded th:not(:first-child) {
  width: 90px;
}
.ref-market-table table.expanded th:first-child,
.ref-market-table table.expanded td:first-child {
  position: sticky;
  left: 0;
  background: #101419;
  z-index: 1;
}
.ref-market-table table.expanded th:first-child {
  background: #3c495a;
}
.result-pill {
  display: inline-block;
  border-radius: 22px;
  min-width: 70px;
  padding: 4px 9px;
  color: white;
  background: #0bab00;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}
.result-pill.loss {
  background: #ff3e47;
}
.result-pill.draw {
  background: #6e7889;
}
.history-totals td {
  background: #101419;
  font-weight: 700;
}
.history-totals td:not(:first-child) {
  color: var(--blue);
}
.ref-panel .history-table {
  min-width: 535px;
}
.ref-panel .history-table th,
.ref-panel .history-table td {
  white-space: nowrap;
}
.ref-panel .history-table th {
  text-decoration: underline;
}
.league-manager {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.general-private {
  width: 100%;
  display: flex;
  gap: 10px;
  text-align: left;
  align-items: center;
  padding: 17px 4px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}
.general-private span {
  margin-left: auto;
  font-size: 14px;
}
.ref-login {
  padding-top: calc(var(--screen-width) * 0.04);
  background-image:
    linear-gradient(
      142deg,
      transparent 45%,
      #04a4c155 45% 62%,
      transparent 62%
    ),
    linear-gradient(
      35deg,
      #118daf 15%,
      #0b6a9c 38%,
      #003d76 38% 50%,
      #042753 50% 75%,
      #075d8f 75%
    );
  background-size: auto;
}
.ref-logo {
  height: calc(var(--screen-width) * 0.661);
  background-size: var(--screen-width) auto;
  background-position: center calc(var(--screen-width) * -0.16949);
  background-color: transparent;
  flex-shrink: 0;
}
.ref-login form {
  margin-top: calc(var(--screen-width) * 0.285);
  background: transparent;
  padding-bottom: 0;
}
.ref-login label {
  height: calc(var(--screen-width) * 0.112);
}
.ref-login input {
  width: 100%;
  min-width: 0;
}
.ref-login .login-button {
  margin-top: 8px;
}
.ref-login p {
  background: transparent;
  margin-top: 21px;
}
.registration-panel p {
  margin-bottom: 5px;
}
.registration-panel .button {
  border-radius: 30px;
  font-weight: 400;
  font-size: 20px;
}
#account-league-create .button,
#account-league-join .button {
  margin: 18px 0;
}
@media (max-width: 450px) {
  .squad-fields label > small {
    font-size: 11px;
    padding: 4px 10px 0;
  }
  #alert {
    border-radius: 24px;
    padding: 17px 20px 14px;
  }
  #alert p {
    font-size: 16px;
    margin-bottom: 28px;
  }
  #alert button {
    font-size: 16px;
    padding: 8px 18px;
  }
  .sheet-fixtures .fdr {
    font-size: 11px;
  }
  .sheet-fixtures small {
    font-size: 10px;
  }
  .past-fixture span {
    font-size: 10px;
  }
  .result-pill {
    font-size: 14px;
    min-width: 48px;
    padding: 4px 6px;
  }
  .ref-panel .history-table {
    min-width: 370px;
  }
  .ref-panel .history-table td,
  .ref-panel .history-table th {
    padding: 8px 4px;
    font-size: 13px;
  }
  .ref-market-table table.expanded {
    min-width: 650px;
  }
  .ref-market-table table.expanded th:first-child {
    width: 155px;
  }
  .ref-market-table table.expanded td:not(:first-child),
  .ref-market-table table.expanded th:not(:first-child) {
    width: 70px;
  }
  .registration-panel .button {
    font-size: 17px;
  }
}

@font-face {
  font-family: Mulish;
  src: url("/assets/mulish_regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
.player-label {
  border-bottom: 0;
}
.player-label .fixture-strip {
  display: flex;
  gap: 3px;
  padding: 0;
  height: 5px;
  background: none;
}
.fixture-strip i {
  display: block;
  flex: 1;
  height: 5px;
  background: #deded0;
}
.fixture-strip .fdr-2 {
  background: #00ef83;
}
.fixture-strip .fdr-4,
.fixture-strip .fdr-5 {
  background: #fa0063;
}
.player-label .past-match {
  background: #c5a742;
}
.empty-player .player-label {
  border-bottom: 5px solid #36393e;
}
.player:has(.injury) .player-label {
  border-image: none;
}
.dream-star {
  position: absolute;
  bottom: 61px;
  right: 35%;
  display: grid;
  place-items: center;
  background: #244df6;
  border: 1px solid #fff;
  color: white;
  border-radius: 50%;
  width: 23px;
  height: 23px;
  font-size: 19px;
  line-height: 1;
}
.panel-action-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-action-heading .round-button {
  width: 43px;
  height: 43px;
}
.dual-price {
  position: relative;
  flex: 1;
  height: 28px;
  background: linear-gradient(var(--blue), var(--blue)) center / 100% 7px
    no-repeat;
}
.dual-price input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  background: none;
  padding: 0;
  border: 0;
  appearance: none;
  pointer-events: none;
}
.dual-price input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--blue);
  pointer-events: auto;
  cursor: pointer;
}
.dual-price input[type="range"]::-moz-range-thumb {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  pointer-events: auto;
  cursor: pointer;
}
.filter-pills {
  gap: 20px;
}
.filter-pills button:first-child {
  min-width: 130px;
}
.filter-pills button {
  min-width: 85px;
}
@media (max-width: 450px) {
  .dream-star {
    width: 19px;
    height: 19px;
    bottom: 47px;
    font-size: 15px;
  }
  .filter-pills {
    gap: 14px;
  }
  .filter-pills button:first-child {
    min-width: 92px;
  }
  .filter-pills button {
    min-width: 57px;
  }
  .dual-price input[type="range"]::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
  }
}

.injury,
.bench .injury,
.mobile-five .injury {
  background: #fff080;
  color: #132516;
}
.player-label span.difficulty-4,
.player-label span.difficulty-5 {
  background: #36393e;
  color: #eceef2;
}
.player-label span.past-match {
  background: #c5a742;
}
.detail-header {
  position: sticky;
  top: 0;
  z-index: 20;
}
.detail-header + .ref-tabs {
  position: sticky;
  top: 89px;
  z-index: 19;
}
@media (max-width: 450px) {
  .detail-header + .ref-tabs {
    top: 69px;
  }
}


.name-field:not(.filled) > span {
  display: none;
}
.market-shirt {
  position: relative;
  display: block;
  flex-shrink: 0;
}
.market-shirt .market-star,
.market-shirt .market-injury {
  position: absolute;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-style: normal;
  font-size: 12px;
  line-height: 1;
}
.market-shirt .market-star {
  right: 0;
  background: #244df4;
  color: white;
  border: 1px solid white;
}
.market-shirt .market-injury {
  left: 0;
  background: #ffed71;
  color: #101419;
  font-size: 10px;
}
.armband {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 18px;
}
.sheet-actions [data-action="ref-transfer"] .icon,
.sheet-actions [data-action="switch"] .icon {
  border: 2px solid currentColor;
  border-radius: 50%;
  padding: 2px;
}
@media (max-width: 450px) {
  .market-shirt .market-star,
  .market-shirt .market-injury {
    width: 16px;
    height: 16px;
    font-size: 10px;
  }
  .armband {
    width: 23px;
    height: 23px;
    font-size: 15px;
  }
}

/* Full shirt images share the screenshot tile frame. */
.pitch .kit,
.pitch .bench .kit,
.pitch .mobile-five .kit {
  --kit-width: calc(var(--screen-width) * 109 / 590);
  --kit-height: calc(var(--screen-width) * 96 / 590);
  width: var(--kit-width);
  height: var(--kit-height);
}
.selection-pitch .kit,
.selection-pitch .mobile-five .kit {
  --kit-width: calc(var(--screen-width) * 112 / 590);
  --kit-height: calc(var(--screen-width) * 122 / 590);
}
.ref-pitch-wrap .pitch {
  padding-top: calc(var(--screen-width) * 6 / 590);
}
.ref-pitch-wrap .pitch-row {
  margin-bottom: calc(var(--screen-width) * 7 / 590);
}
.ref-pitch-wrap .bench-row {
  margin-bottom: 0;
}
.ref-pitch-wrap .player-label strong,
.ref-pitch-wrap .player-label > span:not(.fixture-strip) {
  font-size: calc(var(--screen-width) * 16 / 590);
  line-height: calc(var(--screen-width) * 22 / 590);
  padding-top: calc(var(--screen-width) * 3 / 590);
  padding-bottom: calc(var(--screen-width) * 3 / 590);
}
.ref-pitch-wrap .player-label .fixture-strip,
.ref-pitch-wrap .fixture-strip i {
  height: calc(var(--screen-width) * 5 / 590);
}
.pitch .player:hover .kit {
  transform: none;
}
.ref-pitch-wrap .captain,
.ref-pitch-wrap .injury,
.ref-pitch-wrap .dream-star {
  bottom: calc(var(--screen-width) * 61 / 590);
}

/* Complete transparent shirt images retain their natural aspect ratio. */
img.club-kit {
  object-fit: contain;
  object-position: center bottom;
  clip-path: none;
  background: none;
}

/* Append after reference.css. Scoped to comparison dialogs and their launcher. */
.compare-launcher .icon {
  width: 27px;
  height: 27px;
}
.player-sheet .compare-launcher {
  position: absolute;
  top: 64px;
  right: 25px;
}
dialog.compare-sheet {
  max-height: 92dvh;
  padding-top: 24px;
  background: #191d22;
  overflow-y: auto;
}
.compare-sheet .modal-head {
  padding: 30px 45px 18px;
}
.compare-sheet .modal-head h2 {
  color: var(--blue);
  font-size: 25px;
  font-weight: 800;
}
.compare-card-sheet .modal-head > .icon-button {
  top: 25px;
  right: 14px;
  opacity: 0.65;
}
.compare-sheet .modal-body {
  padding: 8px 24px 24px;
}
.compare-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(340px, 100%);
  margin: 0 auto;
  min-height: 176px;
}
.compare-cards > :first-child {
  border-right: 1px solid #8d9299;
}
.compare-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  min-width: 0;
  padding: 0 17px 4px;
  line-height: 1.2;
}
.compare-card .kit {
  --kit-width: 84px;
  width: var(--kit-width);
  height: 94px;
  margin: 0 auto 3px;
  object-fit: contain;
}
.compare-name {
  max-width: 100%;
  font-size: 20px;
  text-align: center;
  overflow-wrap: anywhere;
}
.compare-card .position {
  display: block;
  max-width: 100%;
  margin: 3px 0;
  padding: 2px 14px;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 800;
  border-radius: 25px;
  text-align: center;
}
.compare-price {
  font-size: 19px;
  letter-spacing: 0.2px;
}
.compare-remove {
  position: absolute;
  right: 9px;
  top: 0;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--text);
  border: 2px solid currentColor;
  border-radius: 50%;
}
.compare-remove .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2.5;
}
.compare-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 27px;
  width: 100%;
  min-height: 176px;
  padding: 17px 8px;
  color: var(--text);
  font-size: 20px;
}
.compare-add .icon {
  width: 39px;
  height: 39px;
  stroke-width: 2;
}
.compare-sheet .modal-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding-bottom: 22px;
}
.compare-sheet .modal-footer .compare-run {
  min-width: 150px;
  margin-top: 3px;
  font-size: 20px;
  padding: 14px 30px;
  border-radius: 34px;
}
.compare-picker-controls input,
.compare-picker-controls select {
  width: 100%;
  min-width: 0;
  font-size: 16px;
}
.compare-picker-selects {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.compare-picker-selects > * {
  flex: 1;
  min-width: 0;
}
.compare-picker-selects label {
  font-size: 12px;
}
.compare-sheet .compare-picker-count {
  margin: 10px 0;
  font-size: 13px;
  color: var(--muted);
}
.compare-pick-list {
  max-height: min(420px, 44dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.compare-candidate {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  text-align: left;
}
.compare-candidate > span {
  flex: 1;
  min-width: 0;
}
.compare-candidate strong,
.compare-candidate small {
  display: block;
}
.compare-candidate strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.compare-candidate small {
  margin-top: 3px;
  font-size: 12px;
}
.compare-candidate small .position {
  display: inline-block;
}
.compare-candidate > b {
  font-size: 16px;
  font-weight: 400;
}
.compare-section-title {
  margin: 20px 0 10px;
  color: var(--blue);
  font-size: 19px;
}
.compare-stats-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 15px;
}
.compare-stats-table th,
.compare-stats-table td {
  padding: 11px 7px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.compare-stats-table thead th {
  background: #3e4a59;
  font-weight: 400;
}
.compare-stats-table th:first-child {
  width: 44%;
  text-align: left;
}
.compare-stats-table tbody th {
  font-weight: 400;
}
.compare-stats-table td,
.compare-stats-table th:not(:first-child) {
  text-align: center;
}
.compare-stats-table td {
  color: var(--blue);
  font-weight: 700;
}
.compare-reset {
  color: var(--blue);
  font-size: 16px;
  padding: 10px 12px;
}
.compare-sheet .compare-empty {
  padding: 18px 4px;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}
@media (max-width: 450px) {
  .compare-sheet .modal-head h2 { font-size: 21px; }
  .compare-sheet .modal-body { padding-inline: 14px; }
  .compare-cards { width: 290px; }
  .compare-card .kit { --kit-width: 74px; height: 83px; }
  .compare-name, .compare-add { font-size: 17px; }
  .compare-card .position { font-size: 16px; padding-inline: 9px; }
  .compare-price { font-size: 17px; }
  .compare-sheet .modal-footer .compare-run { min-width: 130px; padding: 12px 24px; font-size: 17px; }
  .compare-stats-table { font-size: 13px; }
}

/* Transfer screens keep the same pitch frame as the reference My Team. */
.transfer-pitch .pitch-row { margin-bottom: calc(var(--screen-width) * 7 / 590); }
.transfer-pitch .player-label > span:not(.fixture-strip) { font-weight: 700; }
.transfer-confirm { color: var(--blue); }
.market-outgoing { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.market-outgoing .mini-kit { width: calc(var(--screen-width) * 43 / 590); height: calc(var(--screen-width) * 48 / 590); flex-shrink: 0; }
.market-outgoing > span { min-width: 0; font-size: calc(var(--screen-width) * 17 / 590); }
.market-outgoing small { display: block; font-size: calc(var(--screen-width) * 14 / 590); white-space: nowrap; }
.market-outgoing small b { color: #fa0063; }
.player-sheet .modal-head [data-action="compare-player"] { top: 64px; right: 25px; }
.loading-fixture { min-height: 46px; display: grid; place-items: center; }
.compare-card-sheet .modal-head > .icon-button { display: none; }
.compare-cards { width: calc(var(--screen-width) * 310 / 590); min-height: calc(var(--screen-width) * 178 / 590); }
.compare-card .kit { --kit-width: calc(var(--screen-width) * 92 / 590); width: var(--kit-width); height: calc(var(--screen-width) * 94 / 590); }
.compare-add { min-height: calc(var(--screen-width) * 178 / 590); }
.compare-add .icon { width: calc(var(--screen-width) * 39 / 590); height: calc(var(--screen-width) * 39 / 590); }
.compare-card-sheet .modal-body { padding-top: 8px; padding-bottom: 24px; }
body:has(.ref-market-controls) #toast { bottom: calc(132px + var(--screen-width) * 64 / 590); }
#toast { width: calc(var(--screen-width) - 28px); max-width: 562px; background: #e1e2e8; border: none; border-radius: 6px; color: #282b31; text-align: center; padding: 16px; font-size: 18px; box-shadow: none; }

.ref-icon .reference-action-icon { object-fit: contain; width: 28px; height: 30px; }
.sheet-actions .reference-action-icon { object-fit: contain; width: 26px; height: 26px; }

/* October 3 reference updates: pending transfers and full-profile player sheets. */
.ref-pitch-wrap .incoming-player .player-label strong,
.ref-pitch-wrap .incoming-player .player-label > span:not(.fixture-strip) {
  background: #c4a741;
  color: #eceef2;
}
.ref-finance b.negative,
.market-bank b.negative { color: #fa0063; }
.ref-pitch-wrap .injury,
.pitch .bench .injury,
.pitch .mobile-five .injury {
  display: grid;
  place-items: center;
  width: calc(var(--screen-width) * 27 / 590);
  height: calc(var(--screen-width) * 28 / 590);
  left: calc(var(--screen-width) * 9 / 590);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #ffe86c;
}
.warning-icon { width: 100%; height: 100%; flex-shrink: 0; }
.ref-pitch-wrap .dream-star {
  width: calc(var(--screen-width) * 30 / 590);
  height: calc(var(--screen-width) * 30 / 590);
  font-size: calc(var(--screen-width) * 24 / 590);
  background: #101419;
  color: #f7d047;
  border: 1px solid #ece6d3;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}
.market-shirt .market-star {
  background: #101419;
  color: #f7d047;
  border-color: #ece6d3;
}
.market-shirt .market-injury {
  width: calc(var(--screen-width) * 21 / 590);
  height: calc(var(--screen-width) * 22 / 590);
  background: transparent;
  color: #ffe86c;
  border: 0;
  border-radius: 0;
}
.market-outgoing .market-shirt { flex: 0 0 auto; }
.market-outgoing .market-star { display: none; }
.player-sheet .modal-head { padding: calc(var(--screen-width) * 48 / 590) calc(var(--screen-width) * 14 / 590) calc(var(--screen-width) * 16 / 590); }
.player-sheet .modal-head h2 {
  display: grid;
  grid-template-columns: calc(var(--screen-width) * 77 / 590) minmax(0, 1fr) calc(var(--screen-width) * 84 / 590);
  gap: calc(var(--screen-width) * 8 / 590);
  align-items: center;
  margin: 0;
}
.player-sheet .modal-head > .icon-button { display: none; }
.player-sheet .sheet-position {
  position: static;
  gap: calc(var(--screen-width) * 4 / 590);
  justify-items: start;
  padding-left: calc(var(--screen-width) * 5 / 590);
}
.player-sheet .sheet-position small {
  color: var(--text);
  font-size: calc(var(--screen-width) * 16 / 590);
  padding-left: calc(var(--screen-width) * 3 / 590);
}
.player-sheet .sheet-position .position { font-size: calc(var(--screen-width) * 15 / 590); padding: 3px 9px; }
.player-sheet .sheet-player-name { margin: 0; font-size: calc(var(--screen-width) * 25 / 590); line-height: 1.15; }
.player-sheet .sheet-price { display: grid; justify-items: center; gap: calc(var(--screen-width) * 4 / 590); }
.player-sheet .sheet-price b { color: var(--lime); font-size: calc(var(--screen-width) * 17 / 590); white-space: nowrap; }
.player-sheet .sheet-price small { color: #101419; background: #efefe6; border-radius: 18px; padding: 1px 8px; font-size: calc(var(--screen-width) * 15 / 590); line-height: 1.25; }
.player-sheet .modal-body { padding: 0 calc(var(--screen-width) * 14 / 590) calc(var(--screen-width) * 17 / 590); }
.player-sheet .sheet-actions { margin-bottom: calc(var(--screen-width) * 17 / 590); }
.player-sheet .sheet-actions button { min-height: calc(var(--screen-width) * 78 / 590); font-size: calc(var(--screen-width) * 23 / 590); padding: calc(var(--screen-width) * 17 / 590) calc(var(--screen-width) * 16 / 590); gap: calc(var(--screen-width) * 12 / 590); }
.player-sheet .sheet-actions .icon { width: calc(var(--screen-width) * 27 / 590); height: calc(var(--screen-width) * 27 / 590); }
.player-sheet .sheet-actions [data-action="ref-transfer-out"] .icon,
.player-sheet .sheet-actions [data-action="ref-transfer"] .icon,
.player-sheet .sheet-actions [data-action="ref-remove"] .icon { border: 2px solid currentColor; border-radius: 50%; padding: 2px; }
.player-sheet .ref-injury { display: flex; gap: calc(var(--screen-width) * 8 / 590); align-items: center; text-align: left; padding: calc(var(--screen-width) * 7 / 590); margin: 0 0 calc(var(--screen-width) * 6 / 590); font-size: calc(var(--screen-width) * 19 / 590); line-height: 1.4; background: #ffe76a; }
.player-sheet .ref-injury .warning-icon { color: #101419; width: calc(var(--screen-width) * 22 / 590); height: calc(var(--screen-width) * 24 / 590); }
.player-sheet .ref-injury .warning-icon path:last-child { fill: #ffe76a; }
.sheet-profile-actions { display: flex; align-items: center; gap: calc(var(--screen-width) * 16 / 590); padding-inline: calc(var(--screen-width) * 13 / 590); margin-bottom: calc(var(--screen-width) * 24 / 590); }
.player-sheet .sheet-full-profile { display: flex; align-items: center; justify-content: center; flex: 1; gap: calc(var(--screen-width) * 12 / 590); height: calc(var(--screen-width) * 56 / 590); font-size: calc(var(--screen-width) * 21 / 590); border-radius: 35px; padding: 0; }
.sheet-full-profile .icon { width: calc(var(--screen-width) * 22 / 590); height: calc(var(--screen-width) * 22 / 590); }
.player-sheet .sheet-compare { display: grid; place-items: center; width: calc(var(--screen-width) * 56 / 590); height: calc(var(--screen-width) * 56 / 590); border-radius: 50%; background: #3b4a59; }
.player-sheet .sheet-compare .icon { width: calc(var(--screen-width) * 24 / 590); height: calc(var(--screen-width) * 33 / 590); object-fit: contain; }
.player-sheet .sheet-stats { margin-top: 0; }
.player-sheet .sheet-stats div { padding: calc(var(--screen-width) * 8 / 590) 2px; font-size: calc(var(--screen-width) * 17 / 590); }
.player-sheet .sheet-stats b { font-size: calc(var(--screen-width) * 22 / 590); }
.player-sheet .sheet-fixtures { gap: calc(var(--screen-width) * 5 / 590); margin-top: calc(var(--screen-width) * 12 / 590); justify-content: center; }
.player-sheet .sheet-fixtures > div { flex: 1; min-width: 0; }
.player-sheet .sheet-fixtures .fdr,
.player-sheet .sheet-fixtures .past-fixture { min-width: 0; width: 100%; min-height: calc(var(--screen-width) * 47 / 590); display: flex; flex-direction: column; justify-content: center; font-size: calc(var(--screen-width) * 16 / 590); padding: 3px 2px; }
.player-sheet .past-fixture span { font-size: calc(var(--screen-width) * 15 / 590); }
.player-sheet .sheet-fixtures small { font-size: calc(var(--screen-width) * 15 / 590); }
body:has(.ref-market-controls) #toast { bottom: 96px; }

/* Top-right team menu from the supplied October 3 screenshots. */
.ref-header.team-header { position: relative; }
.reference-more { transform: rotate(90deg); }
.ref-icon .reference-header-icon { width: calc(var(--screen-width) * 35 / 590); height: calc(var(--screen-width) * 35 / 590); object-fit: contain; }
.team-menu-scrim { position: fixed; inset: 0; z-index: 65; border: 0; padding: 0; background: transparent; cursor: default; }
.team-menu {
  position: absolute;
  top: calc(var(--screen-width) * 17 / 590);
  right: calc(var(--screen-width) * 10 / 590);
  z-index: 70;
  width: calc(var(--screen-width) * 231 / 590);
  padding: calc(var(--screen-width) * 12 / 590) 0;
  border-radius: 1px;
  background: #1c2025;
  color: #e1e3e6;
  box-shadow: 0 4px 8px #0005;
}
.team-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: calc(var(--screen-width) * 66 / 590);
  padding: 0 calc(var(--screen-width) * 16 / 590);
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: calc(var(--screen-width) * 20 / 590);
  text-align: left;
  line-height: 1.3;
  white-space: nowrap;
}
.team-menu button:focus-visible { outline: 1px solid #a3cafa; outline-offset: -2px; background: #252b32; }
.team-menu button:active { background: #2b3036; }
.team-menu-arrow { width: 0; height: 0; margin-right: calc(var(--screen-width) * 12 / 590); border-top: calc(var(--screen-width) * 7 / 590) solid transparent; border-bottom: calc(var(--screen-width) * 7 / 590) solid transparent; border-left: calc(var(--screen-width) * 6 / 590) solid currentColor; }
.team-display-menu { padding-block: calc(var(--screen-width) * 11 / 590); }
.team-display-menu button { justify-content: flex-start; height: calc(var(--screen-width) * 77 / 590); gap: calc(var(--screen-width) * 25 / 590); padding-inline: calc(var(--screen-width) * 19 / 590); }
.team-menu-check { width: calc(var(--screen-width) * 27 / 590); flex-shrink: 0; display: grid; place-items: center; }
.team-menu-check .icon { width: calc(var(--screen-width) * 27 / 590); height: calc(var(--screen-width) * 27 / 590); stroke-width: 2; }
.ref-pitch-wrap .player-label > .team-value { display: flex; justify-content: center; align-items: center; gap: calc(var(--screen-width) * 2 / 590); font-weight: 700; }
.team-trend { width: calc(var(--screen-width) * 15 / 590); height: calc(var(--screen-width) * 15 / 590); flex-shrink: 0; }
.team-trend path { fill: none; stroke: #252e25; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.team-trend.trend-up { color: #4d9a15; }
.team-trend.trend-down { color: #ff3c49; }
.team-trend.trend-down path { stroke: #68272d; }

/* WhatsApp-inspired dark conversation; every asset is served locally. */
.reference-app.group-chat-page {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  padding-bottom: 0 !important;
  background: #0b141a;
}
.group-chat-page .ref-nav {
  position: static;
  transform: none;
  width: 100%;
  flex: 0 0 72px;
  height: 72px;
  background: #111b21;
  border-top: 1px solid #233138;
}
.group-chat-page .ref-nav button { font-family: system-ui, sans-serif; font-size: 12px; letter-spacing: 0; }
.group-chat-page .ref-nav button.active { color: #00a884; }
.group-chat-page .ref-nav button.active span { background: #103a32; color: #25d366; }
.group-chat-page .ref-nav button span { height: 34px; width: 65px; }
.group-chat-page .ref-nav .icon { width: 25px; height: 25px; }
.group-chat {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  color: #e9edef;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.group-chat button, .group-chat input, .group-chat textarea { font: inherit; }
.group-chat [hidden] { display: none !important; }
.chat-header {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 65px;
  padding: 8px 8px 8px 3px;
  gap: 3px;
  background: #202c33;
  box-shadow: 0 1px 3px #0003;
  z-index: 5;
}
.chat-icon-button {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 0;
  border-radius: 50%;
  color: #aebac1;
  background: transparent;
  cursor: pointer;
}
.chat-icon-button svg { width: 23px; height: 23px; }
.chat-icon-button:hover { background: #ffffff0b; }
.chat-icon-button:focus-visible, .chat-group-heading:focus-visible { outline: 2px solid #00a884; outline-offset: -2px; }
.chat-back { width: 31px; padding: 4px; color: #e9edef; }
.chat-back svg { width: 25px; height: 25px; }
.chat-group-heading { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; border: 0; padding: 0; background: transparent; color: inherit; }
.chat-avatar, .chat-info-avatar { display: grid; place-items: center; flex-shrink: 0; width: 43px; height: 43px; border-radius: 50%; background: #00664f; color: #cde5de; }
.chat-avatar svg { width: 25px; height: 25px; }
.chat-heading-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-heading-copy strong { color: #e9edef; font-size: 17px; line-height: 1.3; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-status { display: flex; align-items: center; gap: 5px; color: #aebac1; font-size: 12px; line-height: 1.4; }
.chat-status i { width: 5px; height: 5px; border-radius: 50%; background: #e0b567; flex-shrink: 0; }
.chat-status[data-state="live"] i { background: #25d366; }
.chat-status[data-state="offline"] i { background: #8696a0; }
.chat-header-actions { display: flex; align-items: center; gap: 1px; }
.chat-search-bar { display: flex; align-items: center; flex-shrink: 0; padding: 6px 9px 6px 18px; gap: 10px; background: #111b21; border-bottom: 1px solid #26343c; }
.chat-search-bar > svg { width: 20px; height: 20px; color: #8696a0; flex-shrink: 0; }
.chat-search-bar input { min-width: 0; flex: 1; height: 38px; padding: 5px 0; background: transparent; border: 0; border-radius: 0; color: #e9edef; font-size: 16px; outline: none; box-shadow: none; }
.chat-search-bar input::placeholder { color: #8696a0; }
.chat-search-bar [data-chat-search-count] { color: #8696a0; font-size: 11px; white-space: nowrap; }
.chat-menu { position: absolute; top: 58px; right: 8px; z-index: 12; width: 200px; max-height: calc(100% - 66px); overflow-y: auto; padding: 8px 0; background: #233138; border-radius: 4px; box-shadow: 0 5px 16px #0007; }
.chat-menu button { display: block; width: 100%; padding: 12px 21px; border: 0; background: transparent; text-align: left; color: #e9edef; font-size: 14px; }
.chat-menu button:hover, .chat-menu button:focus-visible { background: #182229; outline: none; }
.chat-info { position: absolute; top: 69px; right: 10px; left: 10px; z-index: 11; max-height: calc(100% - 79px); overflow-y: auto; padding: 24px 28px; border-radius: 12px; background: #111b21; box-shadow: 0 6px 30px #0008; border: 1px solid #26343c; text-align: center; }
.chat-info-close { position: absolute; top: 6px; right: 6px; }
.chat-info-avatar { width: 70px; height: 70px; margin: 3px auto 14px; }
.chat-info-avatar svg { width: 36px; height: 36px; }
.chat-info h2 { margin: 0; font-size: 21px; color: #e9edef; font-weight: 600; }
.chat-info .chat-info-label { color: #00a884; margin-top: 4px; }
.chat-info p { color: #aebac1; font-size: 13px; line-height: 1.6; margin: 13px 0 0; }
.chat-thread-wrap { position: relative; display: flex; flex: 1; min-height: 0; background: #0b141a url("/assets/chat-wallpaper.svg") repeat; }
.chat-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: #37464f transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 15px 20px 18px;
  background: transparent;
}
.chat-date { align-self: center; color: #d2dadf; font-size: 11px; font-weight: 500; background: #182229; border-radius: 7px; padding: 5px 10px; margin: 7px 0 9px; box-shadow: 0 1px 2px #0004; }
.chat-message { position: relative; width: fit-content; min-width: 76px; max-width: 82%; padding: 7px 9px 4px; background: #202c33; border: 0; border-radius: 0 8px 8px 8px; color: #e9edef; flex-shrink: 0; box-shadow: 0 1px 1px #0004; }
.chat-message::before { content: ""; position: absolute; top: 0; left: -7px; width: 0; height: 0; border-top: 9px solid #202c33; border-left: 8px solid transparent; }
.chat-message.is-own { margin-left: auto; background: #005c4b; color: #e9edef; border-radius: 8px 0 8px 8px; }
.chat-message.is-own::before { left: auto; right: -7px; border-left: 0; border-right: 8px solid transparent; border-top-color: #005c4b; }
.chat-message.is-grouped { margin-top: -5px; border-radius: 8px; }
.chat-message.is-grouped::before { display: none; }
.chat-message-author { display: block; color: var(--sender-color, #53bdeb); font-weight: 600; font-size: 12px; line-height: 1.35; margin-bottom: 3px; overflow-wrap: anywhere; }
.chat-message.is-own .chat-message-author, .chat-message.is-grouped .chat-message-author { display: none; }
.chat-message-text { font-size: 14px; line-height: 1.45; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message-text mark { background: #c1a54c; color: #111b21; border-radius: 2px; }
.chat-message-footer { display: flex; align-items: center; justify-content: flex-end; gap: 5px; color: #8696a0; font-size: 10px; line-height: 1.25; margin: 2px 0 0 18px; }
.chat-message.is-own .chat-message-footer { color: #aec5bd; }
.chat-sent-check { font-size: 13px; line-height: 1; }
.chat-message.is-pending { opacity: .75; }
.chat-message.is-failed { background: #3b292d; }
.chat-message.is-failed::before { border-top-color: #3b292d; }
.chat-message.is-failed .chat-message-footer { color: #f1abb4; }
.chat-message-footer button { color: #92d8c6; font-weight: 600; padding: 0 2px; text-decoration: underline; }
.chat-message-footer button:focus-visible { outline: 1px solid #00a884; outline-offset: 3px; }
.chat-empty, .chat-gate { margin: auto; max-width: 340px; padding: 24px; text-align: center; }
.chat-empty h2, .chat-gate h2 { color: #e9edef; font-size: 19px; font-weight: 600; line-height: 1.4; margin: 0 0 10px; }
.chat-empty p, .chat-gate p { color: #aebac1; font-size: 13px; line-height: 1.6; margin: 0; }
.chat-gate .button { margin-top: 22px; min-height: 43px; padding: 10px 24px; border-radius: 22px; background: #00a884; color: #062a20; }
.chat-jump { position: absolute; bottom: 13px; right: 15px; left: auto; transform: none; border: 0; background: #233138; color: #e9edef; border-radius: 24px; padding: 10px 14px; font-size: 12px; box-shadow: 0 2px 8px #0005; }
.chat-composer { position: relative; flex-shrink: 0; padding: 7px 9px 7px; background: #0b141a; border: 0; }
.chat-composer-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-input-label { display: flex; align-items: flex-end; flex: 1; min-width: 0; border: 0; border-radius: 25px; background: #202c33; overflow: hidden; }
.chat-input-label:focus-within { box-shadow: 0 0 0 1px #00a88466; }
.group-chat .sr-only, .chat-announcer { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.chat-emoji-toggle { width: 42px; height: 46px; padding: 10px; }
.chat-input-label textarea { flex: 1; min-width: 0; width: 100%; min-height: 46px; max-height: 120px; resize: none; padding: 12px 14px 10px 0; border: 0; outline: 0; box-shadow: none; background: transparent; color: #e9edef; font-size: 16px; line-height: 22px; }
.chat-input-label textarea::placeholder { color: #8696a0; }
.chat-send { display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; padding: 12px; border: 0; border-radius: 50%; background: #00a884; color: #052e24; cursor: pointer; }
.chat-send svg { width: 23px; height: 23px; }
.chat-send:disabled { opacity: .55; cursor: default; }
.chat-send:focus-visible, .chat-jump:focus-visible { outline: 2px solid #78dbc4; outline-offset: 3px; }
.chat-composer-meta { display: none; justify-content: flex-end; color: #8696a0; font-size: 10px; margin: 5px 58px 0 44px; }
.chat-composer-meta #chat-composer-hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.chat-composer[data-near-limit="true"] .chat-composer-meta { display: flex; }
.chat-compose-error { margin: 6px 5px 0; color: #f1abb4; font-size: 12px; line-height: 1.4; }
.chat-emoji-picker { position: absolute; bottom: calc(100% + 3px); left: 9px; right: 9px; z-index: 8; max-height: var(--chat-popup-height, 240px); overflow-y: auto; background: #202c33; border-radius: 12px; padding: 8px 9px 12px; box-shadow: 0 -3px 18px #0005; }
.chat-emoji-title { display: flex; justify-content: space-between; align-items: center; color: #aebac1; font-size: 12px; padding-left: 7px; }
.chat-emoji-title .chat-icon-button { width: 30px; height: 30px; }
.chat-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.chat-emoji-grid button { height: 40px; padding: 4px; border: 0; border-radius: 8px; background: transparent; font-size: 25px; text-align: center; }
.chat-emoji-grid button:hover, .chat-emoji-grid button:focus-visible { background: #35444c; outline: none; }
@media (max-width: 450px) {
  .group-chat-page .ref-nav { flex-basis: 65px; height: 65px; }
  .group-chat-page .ref-nav button { font-size: 10px; }
  .group-chat-page .ref-nav button span { width: 55px; height: 31px; }
  .chat-header { min-height: 61px; padding-right: 4px; }
  .chat-header-actions .chat-icon-button { width: 34px; padding: 7px; }
  .chat-avatar { width: 39px; height: 39px; }
  .chat-group-heading { gap: 8px; }
  .chat-heading-copy strong { font-size: 16px; }
  .chat-status { font-size: 11px; }
  .chat-thread { padding: 12px 14px 16px; }
  .chat-message { max-width: 86%; }
  .chat-emoji-grid { grid-template-columns: repeat(6, 1fr); }
}
