/* Blue Wave Baseball — transfer market.
   Same card language as Club management and the career hub: navy cards,
   a dark header bar, yellow outline buttons, Playfair for names. The buy
   dialog and the rating bars come from academy.css. Each edition has its
   own accent: Starter aqua, Common light blue, Rare gold, Chase violet;
   youth players use their star colour (blue, green, gold). */

.career-view[data-view="market"] {
  --ac-contact: #43b1e6;
  --ac-contact-soft: rgba(127, 212, 255, 0.42);
  --ac-power: #e85f4b;
  --ac-power-soft: rgba(255, 138, 117, 0.42);
  --ac-green: #35c97f;
  --mk-field: rgba(123, 205, 244, 0.7);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

/* Edition accents, shared by cards, the preview and the dialog. */
.mk-card, .mk-preview, .mk-dialog { --ed: rgba(123, 205, 244, 0.75); }
.ed-island { --ed: #7fcdf2; }
.ed-gold { --ed: #f3c744; }
.ed-legend { --ed: #c98cff; }
.ed-youth { --ed: #7fd4ff; }
.ed-youth.s2 { --ed: #5ee39f; }
.ed-youth.s3 { --ed: #f3c744; }

.mk-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ *
 * Heading and footer
 * ------------------------------------------------------------------ */

.mk-heading { flex: none; align-items: center; margin-bottom: 0.6rem; }
.mk-title { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.mk-title h3 { font-size: clamp(1.6rem, 2.7vw, 2.3rem); }
.mk-title-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border: 2px solid rgba(243, 199, 68, 0.75);
  border-radius: 50%;
  background: rgba(1, 29, 58, 0.7);
  color: var(--yellow);
  box-shadow: 0 0 18px rgba(243, 199, 68, 0.18);
}
.mk-title-icon svg { display: block; width: 58%; }

.mk-heading-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.6rem; }
.mk-heading .cash-chip { min-width: 9rem; padding: 0.5rem 1.1rem; font-size: 1.25rem; }

.mk-count {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--cr-line);
  border-radius: 999px;
  background: var(--cr-inset);
  color: #9fdcff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.mk-count svg { width: 0.95rem; height: 0.95rem; color: var(--yellow); }

/* only shown when the list panel sits below the board */
.mk-jump { display: none; min-height: 2.3rem; padding-block: 0.3rem; font-size: 0.8rem; }

.career-view[data-view="market"] .career-footer { flex: none; margin-top: 0.6rem; padding-top: 0.5rem; }
.mk-footer p.mk-footer-name {
  color: white;
  font-family: "Playfair Display", Georgia, serif;
  font-variant-numeric: lining-nums;
  font-size: 1.15rem;
}
.mk-footer > small { color: var(--cr-text-dim); font-size: 0.72rem; text-align: right; }

.career-view[data-view="market"] > .career-empty { flex: 1 0 auto; }

/* ------------------------------------------------------------------ *
 * Page grid: the board takes the room, the list panel sits on the right.
 * The listings scroll inside the board, so the footer stays in view. A
 * window too short for the list panel makes the page taller instead (the
 * career panel scrolls); nothing is cut off.
 * ------------------------------------------------------------------ */

.mk-grid-page {
  display: grid;
  flex: 1 1 0;
  grid-template-columns: minmax(0, 1fr) minmax(17.5rem, 20.5rem);
  align-items: stretch;
  gap: 0.7rem;
}

.mk-board,
.mk-list { gap: 0; padding: 0; overflow: hidden; overflow: clip; }

/* ------------------------------------------------------------------ *
 * The board: tabs, filters, listings
 * ------------------------------------------------------------------ */

.mk-tabs-head { padding-block: 0; }
.mk-tabs { display: flex; align-items: stretch; gap: 1.4rem; min-width: 0; }
.mk-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.6rem;
  padding: 0.4rem 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.6);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.mk-tabs button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}
.mk-tabs button:hover { color: white; }
.mk-tabs button.on { color: white; }
.mk-tabs button.on::after { background: var(--yellow); }
.mk-tabs button:focus-visible { outline: 2px solid white; outline-offset: -2px; }
.mk-tabs b {
  min-width: 1.6rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--cr-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.mk-tabs button.on b { border-color: rgba(243, 199, 68, 0.7); color: var(--yellow); }

/* --- filters -------------------------------------------------------- */

.mk-filters {
  display: grid;
  flex: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
  padding: 0.6rem 0.65rem 0.55rem;
  border-bottom: 1px solid rgba(67, 177, 230, 0.25);
  background: rgba(1, 29, 58, 0.3);
}
.mk-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.6rem; min-width: 0; }

/* phones only: folds the edition, price and rating filters away */
.mk-more {
  display: none;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.2rem;
  padding: 0.2rem 0.75rem;
  border: 1px solid var(--mk-field);
  border-radius: 0.35rem;
  background: var(--cr-inset);
  color: white;
  font: inherit;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.mk-more::after {
  content: "";
  width: 0.5rem;
  height: 0.32rem;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform 0.2s ease;
}
.mk-filters.open .mk-more { border-color: var(--yellow); }
.mk-filters.open .mk-more::after { transform: rotate(180deg); }
.mk-more b {
  min-width: 1.1rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--yellow);
  color: #082b45;
  letter-spacing: 0;
  text-align: center;
}
.mk-more b[hidden] { display: none; }

.mk-short { display: none; }

.mk-search {
  display: flex;
  flex: 1 1 10rem;
  align-items: center;
  gap: 0.45rem;
  min-width: 8rem;
  min-height: 2.2rem;
  padding: 0 0.7rem;
  border: 1px solid var(--mk-field);
  border-radius: 0.35rem;
  background: var(--cr-inset);
  color: rgba(255, 255, 255, 0.6);
}
.mk-search svg { flex: none; width: 1rem; height: 1rem; }
.mk-search input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 0.4rem 0;
  border: 0;
  background: transparent;
  color: white;
  font: inherit;
  font-size: 0.84rem;
}
.mk-search input::placeholder { color: rgba(255, 255, 255, 0.45); }
.mk-search input:focus { outline: none; }
.mk-search:focus-within { border-color: var(--yellow); color: var(--yellow); }
.mk-search input::-webkit-search-cancel-button { filter: invert(1) brightness(1.6); cursor: pointer; }

.mk-seg {
  display: inline-flex;
  flex: none;
  padding: 0.18rem;
  border: 1px solid var(--mk-field);
  border-radius: 0.35rem;
  background: var(--cr-inset);
}
.mk-seg button {
  min-height: 1.8rem;
  padding: 0.2rem 0.7rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font: inherit;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.mk-seg button:hover { color: white; }
.mk-seg button.on { background: var(--yellow); color: #082b45; }
.mk-seg button:focus-visible { outline: 2px solid white; outline-offset: 1px; }

.mk-select {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--mk-field);
  border-radius: 0.35rem;
  background: var(--cr-inset);
}
.mk-select::after {
  content: "";
  position: absolute;
  right: 0.7rem;
  top: 50%;
  width: 0.55rem;
  height: 0.35rem;
  background: currentColor;
  color: white;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateY(-50%);
  pointer-events: none;
}
.mk-select:focus-within { border-color: var(--yellow); }
.mk-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 2.35rem;
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: white;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-overflow: ellipsis;
  cursor: pointer;
}
.mk-select select:focus { outline: none; }
.mk-select select:disabled { color: rgba(255, 255, 255, 0.5); cursor: not-allowed; }
.mk-select option { background: #0a2a4c; color: white; }
.mk-select option:disabled { color: rgba(255, 255, 255, 0.45); }

.mk-select.small { flex: 0 1 auto; }
.mk-select.small select {
  min-height: 2.2rem;
  padding-block: 0.3rem;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mk-select.small option { letter-spacing: 0; text-transform: none; }

.mk-range-label {
  color: #9fdcff;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mk-price-filter {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.mk-price-filter i { color: var(--cr-text-dim); font-style: normal; }
.mk-price-filter input {
  width: 4.6rem;
  min-width: 0;
  min-height: 2rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--mk-field);
  border-radius: 0.35rem;
  background: var(--cr-inset);
  color: white;
  font: inherit;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.mk-price-filter input::placeholder { color: rgba(255, 255, 255, 0.45); }
.mk-price-filter input:focus { outline: none; border-color: var(--yellow); }

/* A two-thumb slider: two range inputs on one rail. The rail keeps half a
   thumb of room at each end, so the gold part lines up with the thumbs. */
.mk-range {
  --th: 0.95rem;
  display: flex;
  flex: 1 1 11rem;
  align-items: center;
  gap: 0.4rem;
  min-width: 10rem;
}
.mk-range-val {
  min-width: 1.5rem;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.mk-range[data-range="c"] .mk-range-label { color: #7fd4ff; }
.mk-range[data-range="p"] .mk-range-label { color: #ff8a75; }
.mk-range-track {
  position: relative;
  flex: 1 1 auto;
  min-width: 3.5rem;
  height: 1.3rem;
  padding: 0 calc(var(--th) / 2);
  background:
    linear-gradient(90deg, transparent var(--lo), #43b1e6 var(--lo), #7fd4ff var(--hi), transparent var(--hi)) center / 100% 4px no-repeat content-box,
    linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16)) center / 100% 4px no-repeat content-box;
}
.mk-range[data-range="p"] .mk-range-track {
  background:
    linear-gradient(90deg, transparent var(--lo), #e85f4b var(--lo), #ff8a75 var(--hi), transparent var(--hi)) center / 100% 4px no-repeat content-box,
    linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16)) center / 100% 4px no-repeat content-box;
}
.mk-range input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}
.mk-range input:focus { outline: none; }
/* the low thumb goes on top once it is past the middle, so two thumbs
   parked together can still be pulled apart */
.mk-range.lo-top input:first-child { z-index: 1; }
.mk-range input::-webkit-slider-runnable-track { height: 100%; border: 0; background: transparent; }
.mk-range input::-moz-range-track { height: 100%; border: 0; background: transparent; }
.mk-range input::-webkit-slider-thumb {
  width: var(--th);
  height: var(--th);
  margin-top: calc((1.3rem - var(--th)) / 2);
  border: 2px solid #082b45;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  cursor: grab;
  pointer-events: auto;
  -webkit-appearance: none;
}
.mk-range input::-moz-range-thumb {
  width: var(--th);
  height: var(--th);
  box-sizing: border-box;
  border: 2px solid #082b45;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  cursor: grab;
  pointer-events: auto;
}
.mk-range input:active::-webkit-slider-thumb { cursor: grabbing; }
.mk-range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75); }
.mk-range input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75); }

.mk-reset {
  flex: none;
  margin-left: auto;
  padding: 0.3rem 0.2rem;
  border: 0;
  background: none;
  color: var(--yellow);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.mk-reset:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.mk-reset:disabled { color: rgba(255, 255, 255, 0.35); cursor: default; }

/* --- the listings --------------------------------------------------- */

.mk-grid {
  display: grid;
  flex: 1 1 0;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 0.6rem;
  min-height: 11.5rem;
  padding: 0.65rem 0.55rem 0.65rem 0.65rem;
  overflow-y: auto;
  /* its size comes from the board, never from how many cards there are */
  contain: size;
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 205, 244, 0.7) transparent;
}
.mk-grid::-webkit-scrollbar { width: 6px; }
.mk-grid::-webkit-scrollbar-thumb { border-radius: 3px; background: rgba(123, 205, 244, 0.7); }

/* One listing: portrait beside name, role and time; the rating bars; price
   and the buy button; the seller. Cards in a row share a height, so the
   price line sits at the bottom of each. */
.mk-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.5rem 0.55rem 0.45rem;
  border: 1px solid color-mix(in srgb, var(--ed) 55%, transparent);
  border-radius: 0.5rem;
  background:
    radial-gradient(ellipse 70% 60% at 0% 0%, color-mix(in srgb, var(--ed) 14%, transparent), transparent 70%),
    var(--cr-panel);
}
.mk-card.ed-legend {
  box-shadow: inset 0 0 0 1px rgba(201, 140, 255, 0.18), 0 0 18px rgba(201, 140, 255, 0.12);
}
.mk-card.ed-gold,
.mk-card.ed-youth.s3 { box-shadow: 0 0 18px rgba(243, 199, 68, 0.1); }
.mk-card.mine { border-style: dashed; }
.mk-card.over { opacity: 0.72; }

.mk-top {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
}

.mk-art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ed) 70%, transparent);
  border-radius: 0.4rem;
  background: #0b4a8c;
  cursor: pointer;
}
.mk-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  transition: transform 0.25s ease;
}
.mk-art:hover:not(:disabled) img { transform: scale(1.05); }
.mk-art:hover:not(:disabled),
.mk-art:focus-visible { border-color: var(--yellow); }
.mk-art:focus-visible { outline: 2px solid white; outline-offset: 1px; }
.mk-art:disabled { cursor: default; }
.mk-art-tag { position: absolute; top: 0.22rem; left: 0.22rem; display: flex; }
.mk-art-tag .ac-stars {
  padding: 0.08rem 0.22rem;
  border: 1px solid color-mix(in srgb, var(--ed) 70%, transparent);
  border-radius: 0.3rem;
  background: rgba(1, 29, 58, 0.86);
  font-size: 0.6rem;
}
.mk-art-lean {
  position: absolute;
  left: 0.22rem;
  right: 0.22rem;
  bottom: 0.22rem;
  overflow: hidden;
  padding: 0.06rem 0.2rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: rgba(1, 29, 58, 0.86);
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.mk-art-lean.lean-contact { color: #7fd4ff; }
.mk-art-lean.lean-power { color: #ff8a75; }
.mk-art-lean.lean-balanced { color: var(--yellow); }

/* edition chip: Starter / Common / Rare / Chase */
.mk-ed {
  display: inline-block;
  padding: 0.06rem 0.36rem;
  border-radius: 999px;
  background: rgba(214, 238, 250, 0.9);
  color: #06233d;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.mk-ed.ed-island { background: #7fcdf2; }
.mk-ed.ed-gold { background: var(--yellow); }
.mk-ed.ed-legend { background: linear-gradient(90deg, #ff9ad5, #c98cff, #7fd4ff); }

.mk-id { display: grid; align-content: center; gap: 0.16rem; min-width: 0; }
/* long names get a second line rather than an ellipsis */
.mk-card h5 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-family: "Playfair Display", Georgia, serif;
  font-variant-numeric: lining-nums;
  font-size: 1.04rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.mk-sub {
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.mk-time {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.12rem;
  color: var(--cr-text-dim);
  font-size: 0.68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mk-time svg { flex: none; width: 0.8rem; height: 0.8rem; }
.mk-card.soon .mk-time { color: #ffb3a6; }

.mk-bars { display: grid; gap: 0.28rem; min-width: 0; }
.mk-card .mk-bars { min-height: 2.35rem; align-content: center; margin: 0.5rem 0; }
.mk-bars .ac-bar.compact { grid-template-columns: 3.3rem minmax(0, 1fr) 1.6rem; gap: 0.4rem; }
.mk-bars .ac-bar-label { font-size: 0.56rem; letter-spacing: 0.08em; }
.mk-bars .ac-bar-track { height: 0.42rem; }
.mk-bars .ac-bar-value { font-size: 0.8rem; font-weight: 800; line-height: 1.15; }
.mk-pitcher {
  margin: 0;
  padding: 0.45rem 0.55rem;
  border: 1px dashed rgba(123, 205, 244, 0.35);
  border-radius: 0.35rem;
  color: var(--cr-text-dim);
  font-size: 0.68rem;
  line-height: 1.3;
  text-align: center;
}

.mk-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  margin-top: auto;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(67, 177, 230, 0.25);
}
.mk-price {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mk-price i {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--yellow);
  color: #082b45;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.mk-buy {
  flex: none;
  min-height: 2rem;
  padding: 0.2rem 0.85rem;
  font-size: 0.78rem;
  white-space: nowrap;
}
.mk-buy[data-blocked] {
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
}
.mk-buy[data-blocked]:hover,
.mk-buy[data-blocked]:focus-visible { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.06); }
.mk-buy.mine:disabled {
  border-style: dashed;
  border-color: rgba(123, 205, 244, 0.6);
  color: #9fdcff;
}

.mk-seller {
  margin: 0.3rem 0 0;
  overflow: hidden;
  color: var(--cr-text-dim);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mk-seller b { color: white; font-weight: 700; }

/* your own listings */
.mk-flag {
  flex: none;
  padding: 0.14rem 0.55rem;
  border: 1px solid rgba(123, 205, 244, 0.6);
  border-radius: 999px;
  color: #9fdcff;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mk-flag.live { border-color: rgba(243, 199, 68, 0.7); color: var(--yellow); }
.mk-flag.sold { border-color: rgba(53, 201, 127, 0.7); background: rgba(53, 201, 127, 0.12); color: #8ff0bd; }
.mk-flag.ended { border-style: dashed; color: rgba(255, 255, 255, 0.7); }

.mk-state {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0 0;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--cr-line);
  border-radius: 0.35rem;
  background: var(--cr-inset);
  color: var(--cr-text-dim);
  font-size: 0.68rem;
  line-height: 1.3;
}
.mk-state svg { flex: none; width: 0.8rem; height: 0.8rem; color: #9fdcff; }
.mk-state b { color: white; }
.mk-state.sold { border-color: rgba(53, 201, 127, 0.6); background: rgba(53, 201, 127, 0.1); color: #8ff0bd; }
.mk-state.ended { border-style: dashed; }

/* nothing to show */
.mk-empty {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  min-height: 9.5rem;
  padding: 1rem;
  color: var(--cr-text-dim);
  text-align: center;
}
.mk-empty h5 { margin: 0; color: white; font-size: 0.95rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.mk-empty p { max-width: 26rem; margin: 0; font-size: 0.8rem; line-height: 1.4; }
.mk-empty .cr-outline { min-height: 2.1rem; margin-top: 0.2rem; font-size: 0.8rem; }
.mk-empty-icon {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 2px dashed rgba(123, 205, 244, 0.55);
  border-radius: 50%;
  color: #7bcdf4;
}
.mk-empty-icon svg { width: 55%; height: 55%; }

/* ------------------------------------------------------------------ *
 * List a player
 * ------------------------------------------------------------------ */

.mk-slots {
  flex: none;
  padding: 0.12rem 0.55rem;
  border: 1px solid rgba(53, 201, 127, 0.7);
  border-radius: 999px;
  background: rgba(53, 201, 127, 0.12);
  color: #8ff0bd;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.mk-list .club-card-head { min-height: 2.6rem; padding-block: 0.4rem; }

.mk-list-body {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem 0.7rem 0.7rem;
}

/* below the market's level: what it is and how far there is to go */
.mk-lockbox {
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  text-align: center;
}
.mk-lockbox .mk-empty-icon { border-color: rgba(243, 199, 68, 0.6); color: var(--yellow); }
.mk-lockbox h5 { margin: 0; font-size: 0.95rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.mk-lockbox p { max-width: 17rem; margin: 0; color: var(--cr-text-dim); font-size: 0.78rem; line-height: 1.4; }
.mk-lockbox .ac-progress { width: min(12rem, 80%); }
.mk-how {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  margin: 0.5rem 0 0;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--cr-line);
  border-radius: 0.4rem;
  background: var(--cr-inset);
  list-style: none;
  text-align: left;
}
.mk-how li {
  position: relative;
  padding-left: 1rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.74rem;
  line-height: 1.35;
}
.mk-how li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.42em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--yellow);
}

.mk-label {
  margin-top: 0.1rem;
  color: #9fdcff;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* "Select player" with the slots that kind has left beside it */
.mk-label-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 1.2rem; }
.mk-label-row .mk-label { margin-top: 0; }
.mk-slots.full { border-color: rgba(243, 199, 68, 0.7); background: rgba(243, 199, 68, 0.12); color: var(--yellow); }

.mk-preview {
  display: grid;
  grid-template-columns: 4.1rem minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  min-height: 5.05rem;
  padding: 0.4rem 0.45rem;
  border: 1px solid color-mix(in srgb, var(--ed) 55%, transparent);
  border-radius: 0.45rem;
  background:
    radial-gradient(ellipse 60% 70% at 0% 50%, color-mix(in srgb, var(--ed) 16%, transparent), transparent 70%),
    var(--cr-inset);
}
.mk-preview img {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--ed) 70%, transparent);
  border-radius: 0.35rem;
  object-fit: cover;
  object-position: 50% 22%;
}
.mk-preview-body { display: grid; gap: 0.12rem; min-width: 0; }
.mk-preview strong {
  overflow: hidden;
  font-family: "Playfair Display", Georgia, serif;
  font-variant-numeric: lining-nums;
  font-size: 1.05rem;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mk-preview .mk-sub { display: flex; align-items: center; gap: 0.4rem; margin: 0; }
.mk-preview .mk-sub span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mk-preview .mk-sub .ac-stars { font-size: 0.72rem; }
.mk-preview .mk-bars { gap: 0.18rem; margin-top: 0.1rem; }
.mk-preview.empty {
  display: flex;
  gap: 0.7rem;
  border: 1px dashed rgba(123, 205, 244, 0.5);
  background: rgba(1, 29, 58, 0.35);
}
.mk-preview.empty .mk-empty-icon { flex: none; width: 2.4rem; height: 2.4rem; }
.mk-preview.empty p { margin: 0; color: var(--cr-text-dim); font-size: 0.76rem; line-height: 1.35; }

.mk-money-row { display: flex; align-items: stretch; gap: 0.45rem; }
.mk-money {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.6rem;
  padding: 0 0.8rem;
  border: 1px solid var(--mk-field);
  border-radius: 0.4rem;
  background: var(--cr-inset);
}
.mk-money:focus-within { border-color: var(--yellow); box-shadow: 0 0 0 2px rgba(243, 199, 68, 0.3); }
.mk-money i {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--yellow);
  color: #082b45;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}
.mk-money input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: white;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.mk-money input::placeholder { color: rgba(255, 255, 255, 0.35); }
.mk-money input:focus { outline: none; }
.mk-money:has(input:disabled) { opacity: 0.6; }
.mk-money:has(input:disabled) i { background: rgba(255, 255, 255, 0.35); }

.mk-duration {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.65rem;
  border: 1px solid var(--cr-line);
  border-radius: 0.4rem;
  background: rgba(1, 29, 58, 0.35);
  color: #9fdcff;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}
.mk-duration svg { flex: none; width: 0.85rem; height: 0.85rem; }
.mk-duration small {
  display: block;
  color: var(--cr-text-dim);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mk-list-live { display: flex; flex: 1 0 auto; flex-direction: column; gap: 0.45rem; }
.mk-hint { margin-top: -0.1rem; color: var(--cr-text-dim); font-size: 0.7rem; line-height: 1.35; }
.mk-hint.bad { color: #ffb3a6; }

.mk-summary {
  display: grid;
  gap: 0.18rem;
  margin: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--cr-line);
  border-radius: 0.4rem;
  background: var(--cr-inset);
}
.mk-summary div { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.mk-summary dt { color: var(--cr-text-dim); font-size: 0.74rem; }
.mk-summary dd { margin: 0; font-size: 0.82rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk-summary .total {
  margin-top: 0.12rem;
  padding-top: 0.28rem;
  border-top: 1px solid rgba(67, 177, 230, 0.3);
}
.mk-summary .total dt { color: white; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.mk-summary .total dd { color: var(--yellow); font-size: 1.05rem; font-weight: 900; }

.mk-go { min-height: 2.5rem; margin-top: auto; padding-block: 0.4rem; }
.mk-go.armed { background: #ffd65a; box-shadow: 0 0 0 3px rgba(243, 199, 68, 0.35), 0 7px 20px rgba(243, 199, 68, 0.22); }
.mk-note { margin: 0; color: var(--cr-text-dim); font-size: 0.68rem; line-height: 1.35; text-align: center; }
.mk-go.armed + .mk-note { color: #ffe08a; }

/* ------------------------------------------------------------------ *
 * The buy dialog (layout from academy.css)
 * ------------------------------------------------------------------ */

.mk-dialog { --tier: var(--ed); }
.mk-dialog-tag { position: absolute; z-index: 1; top: 0.5rem; left: 0.5rem; display: flex; }
.mk-dialog-tag .mk-ed { font-size: 0.66rem; padding: 0.15rem 0.55rem; }
.ac-dialog-art .mk-dialog-tag .ac-stars {
  position: static;
  font-size: 1.05rem;
}

/* ------------------------------------------------------------------ *
 * Listed players elsewhere: Team management and the Scouting Center
 * ------------------------------------------------------------------ */

.slot-tag.listed,
.ac-youth-slot.listed {
  background: rgba(1, 29, 58, 0.88);
  color: var(--yellow);
  box-shadow: inset 0 0 0 1px rgba(243, 199, 68, 0.75);
}
.pick-card.listed { border-style: dashed; }
.ac-youth.listed { border-style: dashed; }
.ac-youth.listed .ac-youth-art img { filter: saturate(0.55) brightness(0.8); }
.ac-confirm-hint.listed { color: #ffe08a; }

/* ------------------------------------------------------------------ *
 * Gear (bats): the Gear listings tab, your gear listings, List gear
 * ------------------------------------------------------------------ */

/* rarity accents, the store's chip colours */
.mk-gear.ra-common, .mk-gear-preview.ra-common, .mk-gear-dialog.ra-common { --ed: #cfd9e2; }
.mk-gear.ra-rare, .mk-gear-preview.ra-rare, .mk-gear-dialog.ra-rare { --ed: #4f9dff; }
.mk-gear.ra-epic, .mk-gear-preview.ra-epic, .mk-gear-dialog.ra-epic { --ed: #a66cff; }
.mk-gear.ra-legendary, .mk-gear-preview.ra-legendary, .mk-gear-dialog.ra-legendary { --ed: #ffab2e; }
.mk-card.mk-gear.ra-legendary { box-shadow: inset 0 0 0 1px rgba(255, 171, 46, 0.2), 0 0 18px rgba(255, 150, 40, 0.14); }
.mk-card.mk-gear.ra-epic { box-shadow: 0 0 16px rgba(166, 108, 255, 0.12); }

.mk-gear .mk-art { background: #06213f; }
.mk-gear .mk-art img,
.mk-gear-preview img { object-position: 50% 50%; }
.mk-gear-empty {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  border-radius: 0.35rem;
  background: linear-gradient(135deg, #0a2f55, #06213f);
}

/* rarity chip: Common / Rare / Epic / Legendary */
.mk-ra {
  display: inline-block;
  padding: 0.06rem 0.36rem;
  border-radius: 999px;
  background: #cfd9e2;
  color: #1b2c3a;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.mk-ra.ra-rare { background: #4f9dff; color: white; }
.mk-ra.ra-epic { background: #a66cff; color: white; }
.mk-ra.ra-legendary { background: linear-gradient(90deg, #ffc043, #ff7a1c); color: #2b1300; }

/* what the bat adds in career games, where a player card has its bars */
.mk-gear-bonus { display: flex; align-items: center; min-height: 2.35rem; margin: 0.5rem 0; }
.mk-bonus {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.7rem;
  margin: 0;
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}
.mk-bonus b { font-weight: 900; }
.mk-bonus.none { color: var(--cr-text-dim); font-size: 0.74rem; font-weight: 600; }
.mk-preview .mk-bonus { font-size: 0.76rem; }
.mk-preview .mk-sub .mk-ra { flex: none; }

/* Your listings: players, then gear, each with its slots */
.mk-section {
  display: flex;
  grid-column: 1 / -1;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0.2rem 0 -0.15rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(67, 177, 230, 0.25);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.mk-section b { color: var(--cr-text-dim); font-size: 0.6rem; letter-spacing: 0.1em; }
.mk-section ~ .mk-section { margin-top: 0.55rem; }
.mk-section-empty { grid-column: 1 / -1; margin: 0; color: var(--cr-text-dim); font-size: 0.76rem; }

/* the list panel's head: List a player | List gear, and the slots left */
.mk-list-head { gap: 0.5rem; }
.mk-list-tabs { display: flex; align-items: stretch; gap: 0.9rem; min-width: 0; }
.mk-list-tabs button {
  position: relative;
  min-height: 1.9rem;
  padding: 0.2rem 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.6);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.mk-list-tabs button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.45rem;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}
.mk-list-tabs button:hover, .mk-list-tabs button.on { color: white; }
.mk-list-tabs button.on::after { background: var(--yellow); }
.mk-list-tabs button:focus-visible { outline: 2px solid white; outline-offset: 2px; }

/* the buy dialog for a bat */
.mk-gear-dialog .ac-dialog-art img { object-position: 50% 50%; }
.mk-dialog-bonus {
  display: grid;
  gap: 0.2rem;
  margin: 0.5rem 0 0.1rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(243, 199, 68, 0.45);
  border-radius: 0.45rem;
  background: rgba(243, 199, 68, 0.08);
}
.mk-dialog-bonus .mk-bonus { font-size: 1rem; }
.mk-dialog-bonus small { color: var(--cr-text-dim); font-size: 0.72rem; line-height: 1.3; }

/* ------------------------------------------------------------------ *
 * Laptop-height windows: tighter spacing so the page still fits.
 * ------------------------------------------------------------------ */

@media (min-width: 1101px) and (max-height: 900px) {
  .mk-heading { margin-bottom: 0.4rem; }
  .mk-title h3 { font-size: clamp(1.5rem, 2.3vw, 1.95rem); }
  .mk-title-icon { width: 2.4rem; height: 2.4rem; }
  .career-view[data-view="market"] .career-footer { margin-top: 0.45rem; padding-top: 0.35rem; }
  .career-view[data-view="market"] .career-footer .cr-link { min-height: 2.25rem; padding-block: 0.3rem; }
  .mk-tabs button { min-height: 2.35rem; }
  .mk-list .club-card-head { min-height: 2.35rem; padding-block: 0.3rem; }
  .mk-filters { gap: 0.35rem; padding: 0.45rem 0.6rem; }
  .mk-search, .mk-select.small select { min-height: 2rem; }
  .mk-seg button { min-height: 1.6rem; }
  .mk-grid { padding-block: 0.5rem; }
  .mk-list-body { gap: 0.32rem; padding: 0.5rem 0.65rem 0.6rem; }
  .mk-label { margin-top: 0; }
  .mk-select select { min-height: 2.15rem; }
  .mk-preview { grid-template-columns: 3.7rem minmax(0, 1fr); min-height: 4.6rem; padding: 0.3rem 0.4rem; }
  .mk-money { min-height: 2.35rem; }
  .mk-money input { font-size: 1.12rem; }
  .mk-summary { gap: 0.1rem; padding: 0.35rem 0.55rem; }
  .mk-go { min-height: 2.3rem; padding-block: 0.3rem; }
}

/* Short laptop screens (768 and below): drop the extra lines. The select
   and the price box say what they are without their labels. */
@media (min-width: 1101px) and (max-height: 800px) {
  .mk-title p { display: none; }
  .mk-title-icon { width: 2.1rem; height: 2.1rem; }
  .mk-note { display: none; }
  .mk-list-body > .mk-label,
  .mk-label-row > .mk-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mk-label-row { justify-content: flex-end; min-height: 0; }
  .mk-heading .cash-chip { padding-block: 0.35rem; font-size: 1.1rem; }
}

@media (min-width: 1101px) and (max-height: 740px) {
  .career-view[data-view="market"] .career-footer { margin-top: 0.35rem; padding-top: 0.25rem; }
  .career-view[data-view="market"] .career-footer .cr-link { min-height: 2rem; padding-block: 0.2rem; }
  .mk-preview { grid-template-columns: 3.3rem minmax(0, 1fr); min-height: 4.2rem; padding-block: 0.25rem; }
  .mk-preview strong { font-size: 0.95rem; line-height: 1.05; }
  .mk-preview .ac-bar-value { font-size: 0.72rem; line-height: 1.05; }
  .mk-summary { padding-block: 0.25rem; }
  .mk-summary .total { padding-top: 0.2rem; }
  .mk-money, .mk-select select { min-height: 2.1rem; }
}

/* ------------------------------------------------------------------ *
 * Smaller screens: one column, the page scrolls.
 * ------------------------------------------------------------------ */

@media (max-width: 1100px) {
  .career-view[data-view="market"] { height: auto; min-height: 100%; }
  .mk-grid-page { flex: 1 0 auto; grid-template-columns: minmax(0, 1fr); }
  .mk-grid {
    flex: none;
    max-height: min(44rem, 72vh);
    contain: none;
  }
  .mk-jump { display: inline-flex; }
  .mk-list-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 0.9rem; align-items: start; }
  .mk-list-body.mk-lockbox { display: flex; }
  .mk-list-body > .mk-label[for="mk-pick"],
  .mk-list-body > .mk-label-row { grid-column: 1; grid-row: 2; }
  .mk-list-body > .mk-select { grid-column: 1; grid-row: 3; }
  .mk-list-body > .mk-preview { grid-column: 1; grid-row: 4; }
  .mk-list-body > .mk-label[for="mk-price"] { grid-column: 2; grid-row: 2; }
  .mk-list-body > .mk-money-row { grid-column: 2; grid-row: 3; }
  .mk-list-body > .mk-list-live { grid-column: 2; grid-row: 4 / span 2; }
}

@media (max-width: 920px) {
  .mk-heading { flex-wrap: wrap; }
  .mk-heading-side { justify-content: flex-start; }
  .mk-footer > small { text-align: left; }
}

@media (max-width: 640px) {
  .mk-title { align-items: flex-start; }
  .mk-title-icon { width: 2.3rem; height: 2.3rem; margin-top: 0.15rem; }
  .mk-heading .cash-chip { min-width: 0; font-size: 1.05rem; }
  .mk-tabs { gap: 1.1rem; }
  .mk-tabs button { font-size: 0.74rem; letter-spacing: 0.1em; }
  .mk-long { display: none; }
  .mk-short { display: inline; }
  .mk-filter-row { gap: 0.45rem; }
  .mk-search { flex-basis: 100%; }
  .mk-seg { flex: 1 1 auto; }
  .mk-seg button { flex: 1 1 0; padding-inline: 0.45rem; }
  .mk-more { display: inline-flex; }
  .mk-filters:not(.open) .mk-select.small,
  .mk-filters:not(.open) .mk-filter-row.extra { display: none; }
  .mk-select.small { flex: 1 1 100%; }
  .mk-price-filter { flex: 1 1 100%; }
  .mk-price-filter input { flex: 1 1 0; width: auto; }
  .mk-range { flex-basis: 100%; min-width: 0; }
  .mk-grid { grid-template-columns: minmax(0, 1fr); max-height: min(40rem, 70vh); }
  .mk-list-body { display: flex; align-items: stretch; }
  .mk-dialog-tag .ac-stars { font-size: 0.9rem; }
}
