/* The One Academy TH - shared avatar selector for all games */
.toa-avatar-slot {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(37, 99, 235, 0.16);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-family: inherit;
}
.toa-avatar-slot__img,
.toa-avatar-float__img,
.toa-avatar-card__img,
.toa-avatar-mini {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  background: #fff;
  border: 3px solid #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
  flex: 0 0 auto;
}
.toa-avatar-slot__text { display: grid; line-height: 1.15; text-align: left; }
.toa-avatar-slot__text strong { font-size: 14px; color: #0f172a; }
.toa-avatar-slot__text small { font-size: 12px; color: #64748b; }
.toa-avatar-slot__button,
.toa-avatar-modal__close,
.toa-avatar-card {
  font-family: inherit;
}
.toa-avatar-slot__button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #1d4ed8, #312e81);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(30, 64, 175, 0.22);
}
.toa-avatar-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px 8px 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.28);
  font-family: inherit;
}
.toa-avatar-float__img { width: 38px; height: 38px; }
.toa-avatar-float__label { font-size: 13px; white-space: nowrap; }
.toa-avatar-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(8px);
}
.toa-avatar-modal.is-open { display: flex; }
.toa-avatar-modal__panel {
  width: min(680px, 100%);
  border-radius: 28px;
  padding: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(226, 232, 240, 0.9);
}
.toa-avatar-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.toa-avatar-modal__head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  color: #0f172a;
}
.toa-avatar-modal__head p {
  margin: 4px 0 0;
  color: #64748b;
  line-height: 1.5;
}
.toa-avatar-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}
.toa-avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.toa-avatar-card {
  appearance: none;
  border: 2px solid #e2e8f0;
  border-radius: 22px;
  padding: 12px 8px;
  background: #fff;
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 8px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.toa-avatar-card:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(15, 23, 42, 0.10); }
.toa-avatar-card.is-selected { border-color: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18); }
.toa-avatar-card__img { width: 82px; height: 82px; }
.toa-avatar-card strong { font-size: 14px; color: #0f172a; line-height: 1.1; }
.toa-avatar-card small { font-size: 12px; color: #64748b; line-height: 1.1; }
.toa-avatar-mini {
  width: 28px;
  height: 28px;
  border-width: 2px;
  vertical-align: middle;
  margin-right: 6px;
}
.toa-name-row-enhanced {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .toa-avatar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toa-avatar-float { right: 12px; bottom: 12px; padding-right: 10px; }
  .toa-avatar-float__label { display: none; }
  .toa-avatar-modal__panel { padding: 18px; border-radius: 24px; }
}
