/* Roster section headers: promotion logo + accent-colored name. */
.roster-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--promo, var(--gold));
}
.roster-logo {
  height: 26px;
  width: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

/* Wrestler edit form (private site — gets auth-gated at the auth stage). */
.w-edit summary {
  cursor: pointer;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.w-edit summary:hover { color: var(--gold); }
.w-edit form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.w-edit label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.w-edit select,
.w-edit input {
  font-family: var(--body);
  font-size: 0.85rem;
  color: var(--text);
  background: #000;
  border: 2px solid var(--card-edge);
  border-radius: 0;
  padding: 0.35rem 0.5rem;
}
.w-edit select:focus,
.w-edit input:focus { outline: none; border-color: var(--gold); }
.w-edit button {
  align-self: flex-start;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  background: #000;
  border: 2px solid var(--gold);
  border-radius: 0;
  padding: 0.3rem 1rem;
  cursor: pointer;
}
.w-edit button:hover { background: var(--gold); color: #111; }

/* Roster grid: photo cards (render + caption), the reference .pick style. */
.roster-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.7rem;
}

/* the section and its cards wear the promotion's accent color */
.roster-section { border-color: var(--promo, var(--panel-edge)); }

.wcard {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid var(--card-edge);
  border-color: color-mix(in srgb, var(--promo, #80808f) 55%, transparent);
  transition: transform 0.15s, border-color 0.15s;
}
.wcard:hover {
  transform: translateY(-3px);
  border-color: var(--promo, var(--gold));
  color: var(--text);
  z-index: 3;
}

.wcard-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
  /* grows from the feet up and breaks the frame, reference-app style */
  transform-origin: 50% 100%;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.wcard:hover .wcard-img {
  transform: scale(1.18);
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.7));
}

.wcard-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.4rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  background: repeating-linear-gradient(
    45deg, #0a0a0d, #0a0a0d 12px, #050508 12px, #050508 24px);
}

.wcard-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.1rem 0.45rem 0.35rem;
  background: linear-gradient(transparent, #000d);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.3rem;
}
.wcard-name {
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.15;
  text-shadow: 0 1px 3px #000;
}
.wcard-rec {
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 1px 3px #000;
}
.wcard-rec .w { color: var(--win); }
.wcard-rec .d { color: var(--silver); }
.wcard-rec .l { color: var(--loss); }

/* Profile hero render, same card treatment. */
/* The frame stays put; the render inside pops out of it on hover. */
.w-frame {
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(ellipse 90% 55% at 50% 100%, rgba(255, 215, 0, 0.10), transparent 70%),
    rgba(0, 0, 0, 0.55);
  border: 2px solid var(--card-edge);
}
.w-frame:hover { z-index: 3; position: relative; }

.w-render {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
  transform-origin: 50% 100%;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.w-frame:hover .w-render {
  transform: scale(1.12);
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.7));
}

/* Profile: hero panel left, history right (stacks on mobile). */
.w-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.w-hero {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.w-hero h1 { margin: 0; font-size: 1.6rem; text-align: center; }
.w-hero .rec-line { font-size: 0.9rem; color: var(--muted); }
.w-hero .rec-line .record { font-size: 1.05rem; }
.w-aliases { font-size: 0.78rem; color: var(--faint); }

.w-history { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }

/* One row of history: the match card with its event-context line. The old
   W/L/D badge is gone — the card's own ghosting tells the result. */
.w-match { display: flex; align-items: flex-start; }
.w-match .match-wrap { flex: 1; min-width: 0; }

@media (max-width: 900px) {
  .w-layout { grid-template-columns: 1fr; }
  .w-hero { position: static; }
}

/* Phones: two cards across no matter the font scale (rem-based auto-fill
   can collapse to one giant column when the system font is enlarged), and
   the hero render capped so it doesn't spend a full screen before any
   content — 3/4 ratio kept, so ~55vh tall, centered. */
@media (max-width: 640px) {
  .roster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w-frame {
    width: min(100%, 41vh);
    margin-inline: auto;
  }
}
