/* 選擇玩家：遊戲機式「誰在玩？」—— 大圓頭像一列，焦點者放大、白色光圈 */
.screen-profiles {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(20px, 4vh, 40px);
  padding: 24px var(--gutter) 32px;
  text-align: center;
}
.back-btn { position: absolute; left: var(--gutter); top: 18px; }
.profiles-head h1 {
  font-size: clamp(34px, 5.4vh, 56px); font-weight: 900; letter-spacing: .14em; outline: none;
  color: var(--text);
  text-shadow: 0 6px 30px rgba(154, 114, 220, .55);
}

.class-filter { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip-btn {
  min-height: 40px; padding: 0 18px; border-radius: 999px; border: 0;
  background: var(--surface); color: var(--text-2);
  box-shadow: inset 0 0 0 1px var(--stroke);
  font-size: 14px; font-weight: 900; letter-spacing: .06em;
  transition: background-color .2s, color .2s;
}
.chip-btn:hover { background: var(--surface-2); color: var(--text); }
.chip-btn[aria-pressed="true"] { background: var(--text); color: var(--on-yellow); box-shadow: none; }
.chip-btn:focus-visible { outline: none; box-shadow: var(--glow-focus); }

.profile-rail { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(14px, 2.6vw, 44px); max-width: 1200px; }
.profile-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 160px; padding: 16px 12px 12px;
  border: 0; border-radius: 26px; background: transparent; color: var(--text);
}
.profile-card:focus-visible { outline: none; box-shadow: none; }
.profile-avatar {
  position: relative; width: clamp(120px, 16vh, 168px); aspect-ratio: 1; border-radius: 50%;
  transition: transform .45s var(--ease-spring), filter .3s;
  margin-bottom: 14px;
  container-type: inline-size;
  filter: brightness(.82) saturate(.9);
}
/* 焦點：白色光圈＋柔光 */
.profile-ring {
  position: absolute; inset: -9px; border-radius: 50%;
  border: 4px solid var(--focus);
  box-shadow: 0 0 34px 6px rgba(255, 255, 255, .4), inset 0 0 18px rgba(255, 255, 255, .35);
  opacity: 0; transform: scale(.9);
  transition: opacity .25s, transform .4s var(--ease-spring);
}
.profile-card:hover .profile-avatar,
.profile-card:focus-visible .profile-avatar,
.profile-card.is-chosen .profile-avatar { transform: scale(1.1); filter: none; }
.profile-card:hover .profile-ring,
.profile-card:focus-visible .profile-ring,
.profile-card.is-chosen .profile-ring { opacity: 1; transform: none; }
.profile-card:focus-visible .profile-ring { animation: ring-breathe 2.4s ease-in-out infinite; }
.profile-name { font-size: 22px; font-weight: 900; letter-spacing: .08em; transition: color .2s; color: var(--text-2); }
.profile-card:hover .profile-name, .profile-card:focus-visible .profile-name, .profile-card.is-chosen .profile-name { color: var(--text); }
.profile-sub { font-family: var(--font-num); font-size: 13px; color: var(--text-3); }
.profile-card .pill { margin-top: 6px; min-height: 28px; font-size: 13px; }

.profile-rail.is-grid { gap: 12px 16px; }
.profile-rail.is-grid .profile-card { min-width: 120px; padding: 10px 6px; }
.profile-rail.is-grid .profile-avatar { width: 84px; margin-bottom: 8px; }
.profile-rail.is-grid .profile-name { font-size: 16px; }

.roster-note { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; min-height: 36px; }
.roster-note .spinner { color: var(--yellow); }
.note-line { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 900; color: var(--text-2); }
.note-line svg { width: 22px; height: 22px; }
.note-line.is-error { color: var(--danger); }

@media (max-width: 760px) {
  .screen-profiles { justify-content: flex-start; padding-top: 74px; }
  .back-btn { top: 12px; }
  .profile-card { min-width: 130px; }
}
