.account-learning-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .85fr);
  align-items: start;
}
.student-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.student-filter-heading > div > span {
  display: block;
  margin-top: 3px;
  color: #65718b;
  font-size: .78rem;
}
.student-filter-heading > strong {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eeeafd;
  color: #5544d7;
  font-size: .9rem;
}
.account-student-table .student-table-row:not(.head) {
  width: 100%;
  min-height: 70px;
  margin: 0;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}
.account-student-table .student-table-row:not(.head):hover {
  background: #f8f7ff;
}
.account-student-table .student-table-row:not(.head):focus-visible,
.group-card:focus-visible {
  outline: 3px solid rgba(103, 86, 232, .28);
  outline-offset: -3px;
}
.account-student-table .student-table-row.active {
  border-left-color: #6756e8;
  background: #efecff;
}
.filtered-empty-state,
.student-selection-empty {
  min-height: 180px;
  justify-content: center;
  border: 1px dashed #cfd6e6;
  border-radius: 14px;
  background: #fafbfe;
  text-align: center;
}
.student-learning-detail {
  min-width: 0;
}
.student-detail-loading,
.student-detail-error {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: center;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #d9dfee;
  border-radius: 14px;
  background: #f8f9fd;
}
.student-detail-loading small,
.student-detail-error span {
  grid-column: 2;
  color: #67728a;
  line-height: 1.5;
}
.student-detail-error {
  border-color: #f0c9cf;
  background: #fff7f8;
}
.student-detail-error .btn {
  grid-column: 2;
  width: max-content;
  margin-top: 8px;
}
.student-detail-spinner {
  grid-row: 1 / 3;
  width: 24px;
  height: 24px;
  border: 3px solid #ddd9fb;
  border-top-color: #6756e8;
  border-radius: 50%;
  animation: student-detail-spin .75s linear infinite;
}
@keyframes student-detail-spin { to { transform: rotate(360deg); } }

.student-record-section {
  margin-top: 16px;
  border: 1px solid #dce2ee;
  border-radius: 14px;
  background: #fff;
  overflow: clip;
}
.student-record-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 15px;
  color: #16213a;
  font-weight: 750;
  cursor: pointer;
}
.student-record-section > summary::marker {
  color: #6756e8;
}
.student-record-section > summary strong {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eeeafd;
  color: #5544d7;
  font-size: .78rem;
  text-align: center;
}
.student-record-list,
.student-synny-list {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}
.student-practice-record {
  position: relative;
  padding: 14px;
  border: 1px solid #e1e5ef;
  border-radius: 12px;
  background: #fbfcfe;
}
.student-practice-record::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 12px 0 0 12px;
  background: #d55a75;
}
.student-practice-record.correct::before {
  background: #159b82;
}
.student-practice-record header,
.student-practice-record footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: #65718b;
  font-size: .74rem;
}
.student-practice-record header > span {
  color: #a6304e;
  font-weight: 800;
}
.student-practice-record.correct header > span {
  color: #087a66;
}
.student-record-prompt,
.student-record-answer {
  margin-top: 12px;
}
.student-record-prompt > strong,
.student-record-answer > strong,
.student-synny-turn > strong {
  display: block;
  margin-bottom: 4px;
  color: #66728a;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.student-record-prompt p,
.student-record-answer p {
  margin: 0;
  color: #18233b;
  font-size: .88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.student-record-answer {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1efff;
}
.student-practice-record footer {
  justify-content: flex-start;
  margin-top: 12px;
}
.student-practice-record footer span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f8;
}
.student-record-scope {
  margin: -2px 14px 12px;
  color: #69758d;
  font-size: .75rem;
  line-height: 1.45;
}
.student-synny-thread {
  border: 1px solid #e0e4ef;
  border-radius: 12px;
  background: #fbfcff;
  overflow: clip;
}
.student-synny-thread > summary {
  min-height: 48px;
  padding: 11px 14px;
  cursor: pointer;
}
.student-synny-thread > summary span {
  display: grid;
  gap: 4px;
  padding-left: 4px;
}
.student-synny-thread > summary strong {
  color: #17223b;
  font-size: .84rem;
  line-height: 1.4;
}
.student-synny-thread > summary small {
  color: #6b7690;
  font-size: .7rem;
}
.student-synny-turn {
  margin: 0 12px 12px;
  padding: 12px;
  border-radius: 12px;
}
.student-synny-turn.student-turn {
  background: #f0edff;
}
.student-synny-turn.synny-turn {
  background: #ecf8f5;
}
.student-synny-text {
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: #1b2841;
  font-size: .85rem;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
}
.student-synny-text .synny-chat-line {
  margin: 0 0 7px;
}
.student-synny-text .synny-chat-line:last-child {
  margin-bottom: 0;
}
.student-synny-text .synny-chat-heading {
  display: block;
  margin: 8px 0 4px;
}
.student-synny-text .synny-chat-bullet {
  position: relative;
  padding-left: 13px;
  margin: 4px 0;
}
.student-synny-text .synny-chat-bullet::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .66em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #6756e8;
}
.student-record-empty {
  padding: 20px 12px;
  text-align: center;
}
@media (max-width: 1080px) {
  .account-learning-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .account-student-table { overflow-x: auto; }
  .account-student-table .student-table-row { min-width: 760px; }
  .student-learning-detail { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .student-detail-spinner { animation: none; }
}