#learner-profile-root { position: relative; z-index: 30; }
.learner-profile-header { margin-left: auto; }
.profile.profile-trigger {
  min-height: 42px;
  color: #173656;
  background: #fffdf8;
  border: 1px solid #ded8cc;
  border-radius: 24px;
  cursor: pointer;
  font: 700 14px 'Noto Sans TC', sans-serif;
}
.profile.profile-trigger:hover, .profile.profile-trigger[aria-expanded="true"] { background: #f4f1e9; }
.learner-profile-dialog {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 43, 77, .42);
}
.learner-profile-dialog[hidden] { display: none; }
.learner-profile-panel {
  position: relative;
  width: min(100%, 430px);
  max-height: min(86vh, 680px);
  overflow: auto;
  padding: 30px 26px 26px;
  color: #173656;
  background: #fffdf8;
  border: 1px solid #e2ddd2;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(20, 43, 77, .24);
}
.learner-profile-panel h2 { margin: 0 35px 6px 0; font-size: 23px; }
.learner-profile-message { min-height: 24px; margin: 0 0 16px; color: #66768b; font-size: 13px; line-height: 1.55; }
.learner-profile-message.is-error { color: #a33b32; }
.learner-profile-close { position: absolute; top: 12px; right: 13px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f0ede6; color: #173656; font-size: 22px; cursor: pointer; }
.learner-profile-list { display: grid; gap: 8px; }
.learner-profile-row { display: flex; align-items: center; gap: 8px; }
.learner-profile-select, .learner-profile-edit, .learner-profile-add, .learner-profile-submit, .learner-profile-back {
  min-height: 42px; border: 1px solid #ded8cc; border-radius: 9px; cursor: pointer; font: inherit;
}
.learner-profile-select { flex: 1; padding: 8px 12px; color: #173656; background: #f6f3eb; text-align: left; font-weight: 800; }
.learner-profile-edit { padding: 7px 11px; color: #31516f; background: #fff; font-size: 13px; }
.learner-profile-add { width: 100%; margin-top: 12px; padding: 9px 12px; color: #fff; background: #187ee4; border-color: #187ee4; font-weight: 800; }
.learner-profile-form { display: grid; gap: 17px; }
.learner-profile-form label { display: grid; gap: 7px; font-size: 14px; font-weight: 800; }
.learner-profile-form input { width: 100%; min-height: 44px; padding: 8px 11px; border: 1px solid #cdd5dc; border-radius: 8px; font: inherit; }
.learner-avatar-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.learner-avatar-choice { min-height: 48px; border: 1px solid #ded8cc; border-radius: 10px; background: #fff; font-size: 25px; cursor: pointer; }
.learner-avatar-choice[aria-pressed="true"] { background: #e8f3ef; border-color: #318b77; box-shadow: 0 0 0 2px #318b7730; }
.learner-profile-submit { min-height: 46px; padding: 9px 14px; color: #fff; background: #176f62; border-color: #176f62; font-weight: 850; }
.learner-profile-submit:disabled { opacity: .55; cursor: wait; }
.learner-profile-back { padding: 8px 12px; color: #31516f; background: #fff; }
.legacy-task-warning { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.legacy-task-warning button { padding: 7px 10px; color: #173656; background: #fff; border: 1px solid #b9c5cf; border-radius: 6px; font: inherit; cursor: pointer; }
@media (max-width: 720px) {
  .learner-profile-panel { padding: 26px 18px 20px; }
  .profile.profile-trigger { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
}
