.student-portal-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(208, 232, 220, 0.8), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255, 229, 190, 0.65), transparent 32%),
    linear-gradient(160deg, #f6faf6 0%, #fff8ee 100%);
}

.student-portal-shell {
  width: min(100% - 2rem, 760px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.student-portal-card {
  position: relative;
  width: 100%;
  background: rgba(255, 253, 248, 0.95);
  border: 1px solid #dbe5df;
  border-radius: 24px;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  box-shadow: 0 22px 60px rgba(46, 70, 60, 0.14);
  animation: portalCardIn 0.48s cubic-bezier(.2,.8,.2,1);
  backdrop-filter: blur(10px);
}

@keyframes portalCardIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.student-portal-card h1 { margin: 0.25rem 0 0.75rem; color: #2e4b3f; }
.student-portal-card form, .student-portal-card label { display: grid; gap: 0.75rem; }
.student-portal-card form { margin-top: 1.5rem; }
.student-portal-card input, .student-portal-card select { text-transform: none; letter-spacing: 0.02em; font-size: 1rem; border-color: #cad9d1; background: #fffefb; }
.student-portal-result { min-height: 1.5em; margin: 0; }

.student-account-menu { position: absolute; top: 1.25rem; right: 1.25rem; z-index: 10; }
.student-account-button {
  display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px; padding: 0.45rem 0.7rem;
  border: 1px solid #d4e3db; border-radius: 12px; background: rgba(255,255,255,0.92); color: #2e4b3f;
  font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 5px 18px rgba(46,70,60,0.08);
}
.student-account-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #edf7f1; font-size: 1.25rem; }
.student-account-avatar-large { width: 52px; height: 52px; font-size: 2rem; }
.student-account-dropdown {
  position: absolute; top: calc(100% + 0.55rem); right: 0; width: 230px; padding: 0.9rem;
  border: 1px solid #d4e3db; border-radius: 14px; background: #fffdf8; box-shadow: 0 18px 45px rgba(46,70,60,0.16);
}
.student-account-summary { display: flex; align-items: center; gap: 0.75rem; padding-bottom: 0.85rem; margin-bottom: 0.75rem; border-bottom: 1px solid #e0e9e4; }
.student-account-dropdown .button { width: 100%; margin-top: 0.5rem; }

.student-portal-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: 1rem; align-items: start; padding-top: 0.25rem; }
.student-level-card { padding: 1rem; border: 1px solid #d4e3db; border-radius: 16px; background: linear-gradient(135deg, #edf7f1, #fff5e6); }
.student-level-card span, .student-level-card strong, .student-level-card small { display: block; }
.student-level-card span { color: #5f8f7a; font-weight: 700; }
.student-level-card strong { margin: 0.25rem 0 0.7rem; font-size: 1.35rem; color: #2e4b3f; }
.student-level-card small { margin-top: 0.45rem; color: #6a7771; }
.student-level-track, .student-quest-progress { height: 10px; overflow: hidden; border-radius: 999px; background: #dfe9e4; }
.student-level-track span, .student-quest-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6e9f89, #f0b66a); }

/* Practice pet hero */
.student-pet-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: clamp(1rem, 4vw, 2rem);
  align-items: center;
  min-height: 270px;
  margin-top: 1.5rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  overflow: hidden;
  border: 1px solid #c9dfd3;
  border-radius: 22px;
  background:
    radial-gradient(circle at 84% 18%, rgba(255,255,255,0.86) 0 8%, transparent 8.5%),
    radial-gradient(circle at 74% 26%, rgba(255,255,255,0.58) 0 5%, transparent 5.5%),
    linear-gradient(145deg, #e3f3e9 0%, #f8f3d8 100%);
  box-shadow: inset 0 -36px 70px rgba(106, 151, 119, 0.08);
}


/* Pet environments */
.student-pet-stage[data-environment="garden"] {
  background:
    radial-gradient(circle at 84% 20%, rgba(255,255,255,.88) 0 7%, transparent 7.5%),
    radial-gradient(circle at 18% 88%, rgba(111,173,112,.28) 0 17%, transparent 17.5%),
    linear-gradient(145deg, #dff3df 0%, #f7efc7 100%);
}
.student-pet-stage[data-environment="stage"] {
  background:
    radial-gradient(circle at 75% 12%, rgba(255,235,163,.72) 0 8%, transparent 8.5%),
    linear-gradient(135deg, #efe2ff 0%, #f9dfe7 46%, #fff0bd 100%);
}
.student-pet-stage[data-environment="beach"] {
  background:
    linear-gradient(180deg, #dff4ff 0 44%, #b8e6f3 44% 58%, #f6deb0 58% 100%);
}
.student-pet-stage[data-environment="night"] {
  background:
    radial-gradient(circle at 78% 18%, #fff7c7 0 7%, transparent 7.5%),
    radial-gradient(circle at 24% 28%, rgba(255,255,255,.75) 0 1.2%, transparent 1.5%),
    radial-gradient(circle at 38% 18%, rgba(255,255,255,.62) 0 .9%, transparent 1.2%),
    linear-gradient(145deg, #4b4678 0%, #75659a 58%, #b7a8c9 100%);
}
.student-pet-stage[data-environment="space"] {
  background:
    radial-gradient(circle at 78% 18%, rgba(245,217,255,.9) 0 5%, transparent 5.5%),
    radial-gradient(circle at 24% 24%, rgba(255,255,255,.85) 0 1%, transparent 1.4%),
    radial-gradient(circle at 40% 12%, rgba(255,255,255,.75) 0 .7%, transparent 1%),
    linear-gradient(145deg, #27213f 0%, #4e3f78 52%, #796e9e 100%);
}
.student-pet-stage[data-environment="castle"] {
  background:
    linear-gradient(180deg, #eee7ff 0 62%, #d9c8b1 62% 100%);
}
.student-pet-stage[data-environment="aurora"] {
  background:
    radial-gradient(ellipse at 28% 25%, rgba(149,255,203,.38) 0 18%, transparent 40%),
    radial-gradient(ellipse at 72% 18%, rgba(196,144,255,.42) 0 16%, transparent 38%),
    linear-gradient(145deg, #1f2945 0%, #34496f 55%, #53607f 100%);
}

.student-pet-scenery {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.94;
}

.student-pet-scenery [data-scene] {
  display: none;
  transform-origin: center;
}

.student-pet-stage:not([data-environment]) .student-pet-scenery [data-scene="studio"],
.student-pet-stage[data-environment="studio"] .student-pet-scenery [data-scene="studio"],
.student-pet-stage[data-environment="garden"] .student-pet-scenery [data-scene="garden"],
.student-pet-stage[data-environment="stage"] .student-pet-scenery [data-scene="stage"],
.student-pet-stage[data-environment="beach"] .student-pet-scenery [data-scene="beach"],
.student-pet-stage[data-environment="night"] .student-pet-scenery [data-scene="night"],
.student-pet-stage[data-environment="space"] .student-pet-scenery [data-scene="space"],
.student-pet-stage[data-environment="castle"] .student-pet-scenery [data-scene="castle"],
.student-pet-stage[data-environment="aurora"] .student-pet-scenery [data-scene="aurora"] {
  display: block;
  animation: petSceneIn 0.45s ease both;
}

.student-pet-scenery-wash { opacity: 1; }
.student-pet-copy { position: relative; z-index: 2; }
.student-pet-home { z-index: 2; }

.student-pet-stage:is([data-environment="night"], [data-environment="space"], [data-environment="aurora"]) :is(.student-pet-kicker, .student-pet-copy h2) {
  color: #fff;
  text-shadow: 0 2px 12px rgba(7, 9, 24, 0.72);
}

.student-pet-stage:is([data-environment="night"], [data-environment="space"], [data-environment="aurora"]) .student-companion-control {
  background: rgba(255,255,255,0.88);
  color: #302b45;
  border-color: rgba(255,255,255,0.7);
}

html[data-theme="dark"] .student-pet-scenery { opacity: 0.8; }
html[data-theme="dark"] .student-pet-scenery-wash { opacity: 0.16; }
html[data-theme="dark"] .student-pet-copy h2 { color: var(--text); }
html[data-theme="dark"] .student-pet-kicker { color: var(--accent-dark); }

@keyframes petSceneIn {
  from { opacity: 0; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

.student-pet-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -8%;
  bottom: -78px;
  width: 52%;
  height: 150px;
  border-radius: 50%;
  background: rgba(118, 164, 128, 0.18);
}

.student-pet-copy { position: relative; z-index: 2; }
.student-pet-kicker { margin: 0 0 0.35rem; color: #4f806b; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; }
.student-pet-copy h2, .student-practice-session h2 { margin: 0; color: #2e4b3f; font-size: clamp(1.35rem, 4vw, 1.9rem); }
.student-pet-speech {
  position: relative;
  width: fit-content;
  max-width: 34rem;
  margin: 0.85rem 0 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(91, 132, 113, 0.22);
  border-radius: 14px 14px 14px 4px;
  background: rgba(255,255,255,0.78);
  color: #40554c;
  font-weight: 650;
  line-height: 1.45;
}
.student-pet-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.student-pet-world { position: relative; z-index: 2; display: grid; place-items: center; min-height: 210px; }
.student-pet-avatar {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border: 5px solid rgba(255,255,255,0.7);
  border-radius: 50%;
  background: rgba(255,255,255,0.58);
  font-size: 6.4rem;
  line-height: 1;
  filter: drop-shadow(0 12px 11px rgba(50, 82, 65, 0.12));
  animation: petIdle 4s ease-in-out infinite;
  transform-origin: 50% 90%;
}
.student-pet-accessory { position: absolute; z-index: 5; top: 16px; right: 22px; font-size: 2.6rem; transform: rotate(12deg); filter: drop-shadow(0 4px 3px rgba(46,70,60,0.16)); }
.student-pet-shadow { position: absolute; z-index: 1; bottom: 14px; width: 126px; height: 24px; border-radius: 50%; background: rgba(55, 91, 73, 0.14); filter: blur(2px); }
.student-pet-note { position: absolute; z-index: 4; color: #5f8f7a; font-size: 1.8rem; opacity: 0.72; }
.student-pet-note-one { top: 26px; left: 8px; transform: rotate(-14deg); }
.student-pet-note-two { top: 4px; right: 8px; transform: rotate(12deg); }

@keyframes petIdle { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
@keyframes petPractice { 0% { transform: scale(1) translateY(0); } 35% { transform: scale(1.14) translateY(-22px) rotate(-7deg); } 65% { transform: scale(1.08) translateY(-8px) rotate(7deg); } 100% { transform: scale(1) translateY(0); } }
@keyframes petWeek { 0% { transform: scale(1) rotate(0); } 25% { transform: scale(1.16) rotate(-10deg); } 50% { transform: scale(1.22) rotate(10deg); } 75% { transform: scale(1.14) rotate(-5deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes petDelivery { 0% { transform: translateX(34px) rotate(8deg); opacity: 0; } 55% { transform: translateX(-7px) rotate(-3deg); opacity: 1; } 100% { transform: translateX(0) rotate(0); } }
.student-pet-stage[data-reaction="practice"] .student-pet-avatar,
.student-pet-stage[data-reaction="quest"] .student-pet-avatar { animation: petPractice 0.85s cubic-bezier(.2,.8,.2,1); }
.student-pet-stage[data-reaction="week"] .student-pet-avatar { animation: petWeek 1.15s cubic-bezier(.2,.8,.2,1); }
.student-pet-stage[data-reaction="award"] .student-pet-avatar { animation: petDelivery 0.9s cubic-bezier(.2,.8,.2,1); }
.student-pet-stage[data-reaction="week"] { box-shadow: 0 0 0 5px rgba(240,182,106,0.15), inset 0 -36px 70px rgba(106,151,119,0.08); }

.student-pet-journey { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; max-width: 360px; margin-top: 1rem; }
.pet-journey-step { position: relative; display: grid; place-items: center; min-height: 32px; border: 1px solid rgba(95,143,122,0.25); border-radius: 999px; background: rgba(255,255,255,0.58); color: #708178; font-size: 0.76rem; font-weight: 800; }
.pet-journey-step.complete { background: #fff5d8; border-color: #e3ca85; color: #5a765d; }
.pet-journey-step.current { box-shadow: 0 0 0 3px rgba(110,159,137,0.16); }

/* Focused practice session */
.student-practice-session {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1.15rem;
  border: 1px solid #d6c88f;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff8df, #f3faf5);
  box-shadow: 0 10px 28px rgba(58,85,71,0.08);
}
.student-practice-session-copy p:not(.student-pet-kicker) { margin: 0.5rem 0 0; line-height: 1.5; }
.student-practice-piece-choices { display: grid; gap: 0.55rem; margin-top: 1rem; }
.student-portal-card .student-practice-piece-choice {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  min-height: 74px;
  padding: 0.78rem 0.95rem;
  border: 1px solid #dbe5df;
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  cursor: pointer;
}
.student-practice-piece-choice:hover { border-color: #b49ae8; background: #f4ecff; }
.student-practice-piece-choice.is-recorded { background: #f3f0f7; color: #6d6575; cursor: default; }
.student-practice-piece-choice input {
  width: 20px;
  height: 20px;
  margin: 0;
  justify-self: center;
  align-self: center;
  accent-color: #7653a6;
}
.student-practice-piece-choice span {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding-right: 24px;
  text-align: center;
}
.student-practice-piece-choice strong { color: inherit; line-height: 1.25; }
.student-practice-piece-choice small { color: #6a7771; font-size: 0.78rem; line-height: 1.35; text-align: center; }
.student-practice-selection-result { min-height: 1.3em; margin: 0.65rem 0 0; color: #756522; font-size: 0.84rem; font-weight: 650; }
.student-practice-session-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 0.9rem; }

/* Pet settings */
.student-avatar-selector { margin-top: 1.5rem; padding: 1rem; border: 1px solid #d4e3db; border-radius: 16px; background: linear-gradient(135deg, #f2f9f5, #fff8ed); }
.student-avatar-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.7rem; margin-top: 1rem; }
.student-avatar-option { display: grid; gap: 0.35rem; place-items: center; padding: 0.75rem 0.4rem; border: 1px solid #dbe5df; border-radius: 14px; background: #fffefb; color: #52635c; cursor: pointer; }
.student-avatar-option span { font-size: 2rem; line-height: 1; }
.student-avatar-option small { font-weight: 700; }
.student-avatar-option:hover, .student-avatar-option.selected { border-color: #6e9f89; background: #e8f4ed; box-shadow: 0 0 0 2px rgba(110,159,137,0.15); }
.student-pet-settings-form { padding-top: 1rem; margin-top: 1rem !important; border-top: 1px solid #dce8e1; }
.student-pet-settings-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.student-pet-settings-form select { width: 100%; min-height: 44px; padding: 0.65rem 0.75rem; border: 1px solid #cad9d1; border-radius: 10px; color: #2e4b3f; }
.student-pet-accessory-fieldset { min-width: 0; padding: 0; margin: 0.25rem 0 0; border: 0; }
.student-pet-accessory-fieldset legend { color: #2e4b3f; font-weight: 750; }
.student-pet-accessory-fieldset p { margin: 0.3rem 0 0.65rem; color: #68776f; font-size: 0.86rem; }
.student-pet-accessory-grid, .student-pet-environment-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.55rem; }
.student-pet-environment-fieldset { padding-top: 0.85rem; margin-top: 0.85rem; border-top: 1px solid #dce8e1; }
.student-pet-accessory-option, .student-pet-environment-option {
  display: grid;
  place-items: center;
  gap: 0.15rem;
  min-height: 76px;
  padding: 0.55rem 0.3rem;
  border: 1px solid #dbe5df;
  border-radius: 12px;
  background: #fffefb;
  color: #52635c;
  cursor: pointer;
}
.student-pet-accessory-option span, .student-pet-environment-option span { font-size: 1.7rem; line-height: 1; }
.student-pet-accessory-option small, .student-pet-environment-option small { font-size: 0.68rem; font-weight: 750; text-align: center; }
.student-pet-accessory-option.selected, .student-pet-environment-option.selected { border-color: #6e9f89; background: #e8f4ed; box-shadow: 0 0 0 2px rgba(110,159,137,0.15); }
.student-pet-accessory-option:disabled, .student-pet-environment-option:disabled { cursor: not-allowed; filter: grayscale(1); opacity: 0.55; }

.student-practice-section, .student-pieces-section, .student-achievements-section, .student-teacher-awards-section { margin-top: 1.75rem; }
.section-heading-row, .student-quest-heading, .student-quest-progress-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.student-practice-week { display: grid; grid-template-columns: repeat(var(--practice-columns, 4), minmax(0, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.practice-check { display: grid; gap: 0.15rem; place-items: center; aspect-ratio: 1; min-height: 58px; border: 1px solid #dbe5df; border-radius: 16px; background: #fffefb; color: #8b9690; font-weight: 700; }
.practice-check span { font-size: 1.2rem; }
.practice-check small { font-size: 0.68rem; }
.practice-check.complete { background: linear-gradient(135deg, #dff1e6, #fff1d8); color: #3f7a5a; border-color: #c7dfd1; }
.student-pieces, .student-award-grid { display: grid; gap: 0.9rem; }
.student-piece-card, .student-piece-empty, .student-award-card { border: 1px solid #dbe5df; border-radius: 16px; background: #fffefb; padding: 1rem; }
.student-piece-card.quest-complete { border-color: #bcd9c8; background: linear-gradient(135deg, #f4fbf6, #fff9ef); }
.student-piece-card h2 { margin: 0.2rem 0 0.45rem; font-size: 1.1rem; color: #2e4b3f; }
.student-piece-card p, .student-award-card p { margin: 0; line-height: 1.55; }
.student-quest-kicker { color: #5f8f7a; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.student-quest-xp { flex: 0 0 auto; padding: 0.35rem 0.55rem; border-radius: 999px; background: #edf6f1; color: #466f5e; font-size: 0.78rem; font-weight: 700; }
.student-quest-progress-row { margin-top: 0.9rem; }
.student-quest-progress { flex: 1; }
.student-quest-progress-row strong { color: #466f5e; font-size: 0.82rem; }
.student-award-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.student-award-card { display: flex; gap: 0.85rem; align-items: flex-start; }
.student-award-icon { font-size: 1.7rem; line-height: 1; }
.student-award-date { display: block; margin-top: 0.3rem; color: #6a7771; font-size: 0.76rem; }
.student-piece-rich-copy { margin: 0.55rem 0 0; line-height: 1.55; }
.student-piece-rich-copy p { margin: 0 0 0.55rem; }
.student-piece-rich-copy p:last-child { margin-bottom: 0; }
.student-piece-rich-copy ul, .student-piece-rich-copy ol { margin: 0.45rem 0; padding-left: 1.4rem; }
.student-recording-button { display: inline-flex; margin-top: 0.85rem; text-decoration: none; }
.student-recording-button--youtube { width: 42px; min-width: 42px; padding-inline: 0; justify-content: center; }
.student-recording-button--youtube svg { width: 21px; height: 21px; fill: currentColor; }
.student-drive-button { width: 100%; justify-content: center; margin: 1.25rem 0 0.75rem; text-decoration: none; }
.student-quest-chooser-hint { margin: -0.25rem 0 0.85rem; padding: 0.7rem 0.85rem; border-radius: 12px; background: #fff3cf; color: #5c6348; font-weight: 700; }
.student-pieces-section.is-choosing .student-piece-card:not(.quest-complete) { animation: questInvite 0.55s ease both; border-color: #d8ba69; box-shadow: 0 0 0 3px rgba(216,186,105,0.12); }
@keyframes questInvite { from { transform: translateY(6px); opacity: 0.74; } to { transform: translateY(0); opacity: 1; } }

.student-completed-quests { margin-top: 1rem; border: 1px solid #e0d7ea; border-radius: 16px; overflow: hidden; background: rgba(255, 255, 255, 0.55); }
.student-completed-quests summary { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 0.9rem 1rem; color: #463a52; font-weight: 750; cursor: pointer; list-style: none; }
.student-completed-quests summary::-webkit-details-marker { display: none; }
.student-completed-quests summary::after { content: "+"; order: 3; font-size: 1.2rem; }
.student-completed-quests[open] summary::after { content: "−"; }
.student-completed-quests summary span:last-child { margin-left: auto; color: #746b7d; font-size: 0.78rem; font-weight: 600; }
.student-completed-pieces, .student-older-awards { padding: 0 1rem 1rem; }

.student-login-help { margin-top: 1rem; color: #6a7771; font-size: 0.86rem; }
.student-password-form { margin-top: 1rem !important; }
.student-password-form .button { width: fit-content; }

@media (max-width: 680px) {
  .student-account-menu { position: relative; top: auto; right: auto; display: flex; justify-content: flex-end; margin-bottom: 1rem; }
  .student-account-dropdown { top: calc(100% + 0.45rem); }
  .student-portal-hero, .student-award-grid { grid-template-columns: 1fr; }
  .student-pet-stage { grid-template-columns: 1fr; }
  .student-pet-scenery { opacity: 0.86; }
  .student-pet-scenery-wash { opacity: 0.72; }
  .student-pet-world { grid-row: 1; min-height: 160px; }
  .student-pet-avatar { width: 132px; height: 132px; font-size: 5.5rem; }
  .student-pet-accessory { top: 0; right: calc(50% - 82px); }
  .student-pet-copy { text-align: center; }
  .student-pet-speech { margin-left: auto; margin-right: auto; border-radius: 14px; }
  .student-pet-actions { display: grid; }
  .student-pet-journey { margin-left: auto; margin-right: auto; }
  .student-avatar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-pet-settings-fields { grid-template-columns: 1fr; }
  .student-pet-accessory-grid, .student-pet-environment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .student-practice-session { grid-template-columns: 1fr; text-align: center; }
  .student-practice-session-actions { display: grid; }
  .section-heading-row, .student-quest-heading { align-items: flex-start; }
  .section-heading-row { display: grid; }
  .student-password-form .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .student-portal-card, .student-pet-avatar, .student-pet-scenery [data-scene], .student-pieces-section.is-choosing .student-piece-card:not(.quest-complete) { animation: none !important; }
  .student-pet-stage { scroll-behavior: auto; }
}

/* Practice day and achievement previews. */
.practice-check small { font-size: 0.76rem; letter-spacing: 0.01em; }
.student-award-card--locked { border-style: dashed; opacity: 0.72; }
.student-award-card--locked .student-award-icon { filter: grayscale(1); }
.student-award-card--locked small { display: block; margin-top: 0.35rem; font-size: 0.75rem; font-weight: 700; }

/* Give the older awards the same inset on all sides as the other disclosures. */
.student-older-awards { padding: 1rem; }
#studentOlderTeacherAwards > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 1.5rem;
  align-items: center;
  column-gap: 1rem;
}
#studentOlderTeacherAwards > summary span:last-child { margin-left: 0; white-space: nowrap; }
#studentOlderTeacherAwards > summary::after { order: initial; text-align: center; }

/* The roaming pet sits directly under body at z-index 40. Raise the card while
   the account menu is open so its dropdown stays above the pet. */
.student-portal-card:has(#studentAccountDropdown:not(.hidden)) { z-index: 41; }
