/* My Teams (supporter feature). Full scorigami profiles for a visitor's chosen
 * teams: record, owned scores, signature games, recent games with opponents.
 * Editorial, data-first, restrained. Colors come only from the site's global
 * custom properties so it flips cleanly in light and dark mode. All classes are
 * prefixed mt- (shared skeleton uses pf-skel). */

.mt-wrap { display: flex; flex-direction: column; }

/* ── picker (a clean form control, not a widget) ───────────────────────────── */
.mt-picker-wrap { padding-bottom: 4px; }
.mt-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.mt-pick-field { display: flex; flex-direction: column; gap: 5px; }
.mt-grow { flex: 1 1 220px; min-width: 0; }

.mt-lab {
  font: 600 11px var(--body);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}

.mt-select,
.mt-input {
  font: 500 14px var(--body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 9px 11px;
  min-height: 40px;
}
.mt-select { min-width: 170px; }
.mt-select:focus,
.mt-input:focus { border-color: var(--accent); outline: none; }
.mt-input:disabled {
  color: var(--muted);
  background: var(--paper);
  cursor: not-allowed;
}

.mt-add {
  font: 600 13px var(--body);
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 10px 18px;
  min-height: 40px;
  cursor: pointer;
}
@media (hover: hover) { .mt-add:hover { background: var(--accent-deep); border-color: var(--accent-deep); } }
.mt-add:disabled {
  color: var(--surface);
  background: var(--base);
  border-color: var(--base);
  cursor: not-allowed;
}

.mt-note {
  margin: 10px 0 0;
  min-height: 1.2em;
  font: 500 13px var(--body);
  color: var(--ink2);
}

/* ── cards grid ────────────────────────────────────────────────────────────── */
.mt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 16px;
  margin-top: 20px;
  align-items: start;
}

.mt-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 5px;
  box-shadow: var(--shadow);
  padding: 16px 16px 16px;
}

.mt-card-hd { display: flex; align-items: center; gap: 11px; }
.mt-logo { width: 40px; height: 40px; object-fit: contain; flex: none; }
.mt-mono {
  width: 40px; height: 40px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  background: var(--hair);
  border: 1px solid var(--base);
  color: var(--ink2);
  font: 700 13px var(--body);
}
.mt-id { flex: 1; min-width: 0; }
.mt-name {
  margin: 0;
  font: 700 20px/1.05 var(--disp);
  letter-spacing: .01em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}
.mt-name a { color: var(--ink); text-decoration: none; }
@media (hover: hover) { .mt-name a:hover { color: var(--accent); } }
.mt-lg { margin: 2px 0 0; font: 500 12px var(--body); color: var(--muted); }

.mt-remove {
  flex: none;
  width: 36px; height: 36px;
  margin: -6px -6px 0 0;
  display: inline-flex; align-items: center; justify-content: center;
  font: 400 20px/1 var(--body);
  color: var(--muted);
  background: none; border: 0; border-radius: 4px;
  cursor: pointer;
}
@media (hover: hover) { .mt-remove:hover { color: var(--ink); background: var(--hair); } }

/* ── stats ─────────────────────────────────────────────────────────────────── */
.mt-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
}
.mt-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mt-val { font: 600 16px var(--body); color: var(--ink); }
.mt-val.mono { font-family: var(--mono); font-size: 15px; letter-spacing: -.01em; }
.mt-sub { font: 500 11.5px var(--body); color: var(--muted); }

/* ── sections (shared frame for signatures / recent / owned) ───────────────── */
.mt-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
}
.mt-h {
  margin: 0 0 10px;
  font: 600 11px var(--body);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.mt-none { margin: 0; font: 400 13px/1.5 var(--body); color: var(--ink2); }

/* ── signature games ───────────────────────────────────────────────────────── */
.mt-sigs { display: flex; flex-direction: column; gap: 8px; }
.mt-sig {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--hair);
  border-radius: 4px;
  background: var(--paper);
  text-decoration: none;
}
@media (hover: hover) { .mt-sig:hover { border-color: var(--accent); } }
.mt-sig-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mt-sig .mt-lab { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink); }
.mt-sig .mt-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-score { flex: none; font: 700 16px var(--mono); color: var(--accent); }

/* ── recent games ──────────────────────────────────────────────────────────── */
.mt-glist { display: flex; flex-direction: column; }
.mt-game {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  border-top: 1px solid var(--hair);
  text-decoration: none;
  color: var(--ink);
}
.mt-game:first-child { border-top: 0; }
@media (hover: hover) {
  .mt-game:hover { background: var(--paper); }
  .mt-game:hover .mt-game-score { color: var(--accent); }
}

.mt-res {
  flex: none;
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 3px;
  font: 700 11px var(--mono);
  border: 1px solid var(--hair);
  color: var(--ink2);
}
.mt-res-w { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.mt-res-l { color: var(--ink2); background: var(--surface); }
.mt-res-t { color: var(--ink2); background: var(--hair); }

.mt-game-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mt-game-line {
  font: 500 13.5px var(--body);
  color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mt-verb { color: var(--muted); }
.mt-opp { color: var(--ink); }
.mt-game-meta {
  display: flex; align-items: center; gap: 7px;
  font: 500 11.5px var(--body); color: var(--muted);
}
.mt-tag {
  font: 600 9.5px var(--body);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink2);
  background: var(--hair);
  border-radius: 3px;
  padding: 1px 5px;
}
.mt-game-score {
  flex: none;
  font: 600 14px var(--mono);
  color: var(--ink);
  letter-spacing: -.01em;
}

.mt-loading { margin: 0 0 10px; font: 500 13px var(--body); color: var(--ink2); }
.mt-dots::after {
  content: "...";
  display: inline-block;
  animation: mt-dots 1.4s steps(4, end) infinite;
  width: 1em; text-align: left; overflow: hidden; vertical-align: bottom;
}
@keyframes mt-dots { 0% { clip-path: inset(0 100% 0 0); } 100% { clip-path: inset(0 0 0 0); } }

/* ── scorigamis owned ──────────────────────────────────────────────────────── */
.mt-owned { }
.mt-owned > .mt-summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 0;
}
.mt-owned > .mt-summary::-webkit-details-marker { display: none; }
.mt-owned > .mt-summary::after {
  content: "";
  margin-left: auto;
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .15s ease;
}
.mt-owned[open] > .mt-summary::after { transform: rotate(-135deg); }
.mt-count {
  font: 600 11px var(--mono);
  color: var(--ink2);
  background: var(--hair);
  border-radius: 3px;
  padding: 1px 6px;
}
.mt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.mt-chip {
  font: 600 12px var(--mono);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 4px 8px;
  text-decoration: none;
  letter-spacing: -.01em;
}
@media (hover: hover) { .mt-chip:hover { border-color: var(--accent); color: var(--accent); } }

/* ── footer ────────────────────────────────────────────────────────────────── */
.mt-foot { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--hair); }
.mt-open {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 13px var(--body);
  color: var(--accent);
  text-decoration: none;
}
.mt-open::after {
  content: "";
  width: 6px; height: 6px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}
@media (hover: hover) { .mt-open:hover { color: var(--accent-deep); } }

/* ── message cards (error / missing) ───────────────────────────────────────── */
.mt-card-msg .mt-name { font-size: 18px; }
.mt-error-msg { margin: 13px 0 11px; font: 400 13px/1.5 var(--body); color: var(--ink2); }
.mt-retry {
  align-self: flex-start;
  font: 600 12px var(--body);
  color: var(--accent);
  background: none;
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 8px 14px;
  min-height: 38px;
  cursor: pointer;
}
@media (hover: hover) { .mt-retry:hover { border-color: var(--accent); } }

/* ── empty state ───────────────────────────────────────────────────────────── */
.mt-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--hair);
  border-radius: 5px;
  background: var(--surface);
  padding: 28px 22px;
}
.mt-empty-title { margin: 0 0 8px; font: 700 21px/1.15 var(--disp); color: var(--ink); }
.mt-empty-sub { margin: 0; font: 400 14px/1.55 var(--body); color: var(--ink2); max-width: 60ch; }

/* ── skeleton (shared pf-skel) ─────────────────────────────────────────────── */
.pf-skel { pointer-events: none; animation: mt-pulse 1.4s ease-in-out infinite; }
.mt-sk-logo {
  width: 40px; height: 40px; flex: none;
  border-radius: 4px; background: var(--hair);
}
.mt-sk-line { display: block; height: 12px; border-radius: 3px; background: var(--hair); }
.pf-skel.mt-card .mt-stats .mt-sk-line { height: 26px; }
.mt-glist .mt-sk-line { height: 34px; margin-bottom: 8px; }
.mt-glist .mt-sk-line:last-child { margin-bottom: 0; }
@keyframes mt-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) {
  .pf-skel { animation: none; }
  .mt-dots::after { animation: none; clip-path: none; }
}

/* ── responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .mt-pick { flex-direction: column; align-items: stretch; }
  .mt-pick-field, .mt-grow { flex: 1 1 auto; }
  .mt-select, .mt-add { width: 100%; }
}
@media (max-width: 380px) {
  .mt-stats { grid-template-columns: 1fr; }
}

/* ── touch targets (44px minimum on coarse pointers) ───────────────────────── */
@media (pointer: coarse) {
  /* Remove deletes a card instantly, so the destructive control most needs a
     forgiving target; negative margin keeps the header visually unchanged. */
  .mt-remove { width: 44px; height: 44px; margin: -10px -10px 0 0; }
  .mt-select, .mt-input, .mt-add { min-height: 44px; }
  .mt-chip { padding: 10px 12px; }
  .mt-chips { gap: 8px; }
}
