@font-face {
  font-family: "Luckiest Guy";
  src: url("../UI/fonts/LuckiestGuy-Regular.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

.release-readiness-summary {
  display: grid;
  gap: 1rem;
}

.release-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.release-score-card {
  border: 1px solid rgba(30, 50, 35, 0.16);
  border-radius: 0.5rem;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 0.75rem 1.5rem rgba(34, 40, 28, 0.07);
}

.release-score-card span,
.release-score-card small {
  display: block;
  color: #60705d;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.release-score-card strong {
  display: block;
  color: #102819;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.1;
}

.release-score-card.ok {
  border-color: rgba(37, 130, 76, 0.28);
  background: #f3fff5;
}

.release-score-card.warn {
  border-color: rgba(190, 126, 20, 0.35);
  background: #fff8df;
}

.release-score-card.danger {
  border-color: rgba(181, 58, 48, 0.35);
  background: #fff1ee;
}

.release-platform-gaps {
  border: 1px solid rgba(190, 126, 20, 0.24);
  border-radius: 0.5rem;
  padding: 1rem;
  background: #fffaf0;
}

.release-platform-gaps h2 {
  margin: 0 0 0.75rem;
  color: #183522;
  font-size: 1.05rem;
}

.release-platform-gap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(190, 126, 20, 0.16);
}

.release-platform-gap:first-of-type {
  border-top: 0;
}

.release-platform-gap span {
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  background: #ffd97a;
  color: #5b3900;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.release-platform-gap p {
  margin: 0;
  color: #425042;
}

.release-level-list {
  display: grid;
  gap: 1rem;
}

.release-level-card {
  border: 1px solid rgba(28, 62, 44, 0.14);
  border-radius: 0.6rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.94);
}

.release-level-card header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.release-level-card h2 {
  margin: 0;
  color: #0e2819;
}

.release-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.release-check-group {
  border: 1px solid rgba(28, 62, 44, 0.12);
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: #fbfff8;
}

.release-check-group h3 {
  margin: 0 0 0.6rem;
  color: #31472c;
  font-size: 0.95rem;
}

.release-check-row {
  display: grid;
  grid-template-columns: 4.4rem 1fr;
  gap: 0.15rem 0.5rem;
  padding: 0.45rem 0;
  border-top: 1px solid rgba(28, 62, 44, 0.08);
}

.release-check-row:first-of-type {
  border-top: 0;
}

.release-check-row span {
  grid-row: span 2;
  align-self: start;
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.release-check-row.ok span {
  background: #dff8dc;
  color: #1e6b2f;
}

.release-check-row.warn span {
  background: #fff0bd;
  color: #895705;
}

.release-check-row.danger span {
  background: #ffe0da;
  color: #9a3024;
}

.release-check-row strong {
  color: #1c2b20;
}

.release-check-row small {
  color: #65705f;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .release-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .release-level-card header {
    flex-direction: column;
  }
}

.student-profile-screen {
  min-height: 100vh;
  padding: 24px clamp(12px, 3vw, 42px) 48px;
  background:
    linear-gradient(180deg, rgba(255, 249, 223, 0.25), rgba(255, 249, 223, 0.04)),
    url("../UI/beaver_shell/images/background.png") center / cover fixed no-repeat;
}

.student-profile-panel {
  max-width: 1120px;
  margin: 0 auto;
}

.student-profile-middle {
  padding: clamp(20px, 4vw, 42px);
}

.student-profile-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
  margin-bottom: 24px;
}

.student-profile-avatar {
  width: clamp(116px, 15vw, 168px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 8px solid #8a4a1f;
  border-radius: 24px;
  background: linear-gradient(145deg, #f9d878, #89cf78);
  box-shadow: 0 10px 0 #5d2e13, 0 16px 22px rgba(77, 43, 20, 0.24);
}

.student-profile-avatar img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.student-profile-eyebrow {
  margin: 0 0 4px;
  color: #7b3e15;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.student-profile-heading h1 {
  margin: 0;
  color: #3f210d;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.student-profile-heading p:last-child {
  max-width: 620px;
  margin: 8px 0 0;
  color: #5c3b22;
  font-weight: 800;
}

.student-profile-save {
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 3px solid #4d8f35;
  border-radius: 14px;
  background: #efffdc;
  color: #255c1d;
  font-weight: 900;
}

.student-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 20px;
  align-items: start;
}

.student-profile-form {
  display: grid;
  gap: 18px;
}

.student-profile-card {
  border: 5px solid #8a4a1f;
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 247, 209, 0.88);
  box-shadow: 0 7px 0 #5d2e13;
}

.student-profile-card h2 {
  margin: 0 0 14px;
  color: #3f210d;
  font-size: 1.45rem;
}

.student-profile-readonly,
.student-profile-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 2px dashed rgba(92, 59, 34, 0.25);
}

.student-profile-readonly span,
.student-profile-stat span {
  color: #795332;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.student-profile-readonly strong {
  grid-column: 1 / -1;
  color: #2d1a0d;
  font-size: 1.05rem;
}

.student-profile-card p {
  margin: 12px 0 0;
  color: #6f4928;
  font-weight: 800;
}

.student-profile-avatar-picker,
.student-profile-theme-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
}

.student-profile-avatar-choice,
.student-profile-theme-choice {
  position: relative;
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 112px;
  padding: 12px;
  border: 4px solid #b76b28;
  border-radius: 16px;
  background: #fff0b7;
  color: #3f210d;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.student-profile-avatar-choice input,
.student-profile-theme-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.student-profile-avatar-choice:has(input:checked),
.student-profile-theme-choice:has(input:checked) {
  border-color: #2c9f44;
  box-shadow: 0 0 0 4px rgba(44, 159, 68, 0.22);
}

.student-profile-avatar-choice img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.student-profile-theme-choice {
  min-height: 74px;
}

.student-profile-theme-choice.theme-unicorn { background: linear-gradient(135deg, #ffe0f1, #d9f2ff); }
.student-profile-theme-choice.theme-woodland { background: linear-gradient(135deg, #dff2b6, #8fcf76); }
.student-profile-theme-choice.theme-river { background: linear-gradient(135deg, #c7f0ff, #64b9e8); }
.student-profile-theme-choice.theme-desert { background: linear-gradient(135deg, #ffe3a0, #eea84c); }
.student-profile-theme-choice.theme-space { background: linear-gradient(135deg, #d6d2ff, #5d65be); color: #fff; }
.student-profile-theme-choice.theme-ocean { background: linear-gradient(135deg, #b9fff0, #1b9cc3); }

.student-profile-submit {
  justify-self: start;
  border: 0;
}

.student-profile-progress {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 14px;
}

.student-profile-stat {
  grid-template-columns: 42px 1fr;
}

.student-profile-stat img {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.student-profile-stat strong {
  color: #2d1a0d;
  font-size: 1.08rem;
  line-height: 1.1;
}

@media (max-width: 860px) {
  .student-profile-grid,
  .student-profile-heading {
    grid-template-columns: 1fr;
  }

  .student-profile-progress {
    position: static;
  }
}

/* Beaver shop, learning progress, and Otto customizer */
.student-feature-page {
  min-height: 100vh;
  padding: 24px clamp(12px, 3vw, 42px) 48px;
  background:
    linear-gradient(180deg, rgba(255, 249, 223, 0.26), rgba(255, 249, 223, 0.06)),
    url("../UI/beaver_shell/images/background.png") center / cover fixed no-repeat;
}

.student-feature-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 76rem;
  margin: 0 auto 1rem;
  padding: 1.15rem clamp(1rem, 2.5vw, 1.75rem);
  border: 5px solid #8a4a1f;
  border-radius: 18px;
  background: url("../UI/beaver_shell/images/middleParchment.png") top center / 100% auto repeat-y;
  box-shadow: 0 7px 0 #5d2e13, 0 16px 24px rgba(77, 43, 20, 0.18);
}

.student-feature-heading h1 {
  margin: 0;
  color: #2b180a;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 1000;
}

.student-feature-heading p {
  margin: 0.35rem 0 0;
  color: #5c503c;
  font-weight: 750;
}

.student-feature-alert {
  max-width: 76rem;
  margin: 0 auto 1rem;
  border: 0.1rem solid #b66a1f;
  border-radius: 0.5rem;
  padding: 0.8rem 1rem;
  background: #fff0c2;
  color: #6a3208;
  font-weight: 850;
}

.student-feature-alert.success {
  border-color: #3d8b5f;
  background: #e2f7df;
  color: #1c5d35;
}

.student-progress-stats,
.student-feature-grid,
.otto-customizer,
.shop-filter-bar,
.shop-shelves {
  max-width: 76rem;
  margin-inline: auto;
}

.student-progress-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.student-progress-stats article,
.student-feature-panel,
.shop-shelf,
.otto-preview-card,
.otto-options,
.shop-admin-item,
.student-owned-row,
.student-grant-card {
  border: 5px solid #8a4a1f;
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 247, 209, 0.88), rgba(255, 247, 209, 0.88)),
    url("../UI/beaver_shell/images/middleParchment.png") top center / 100% auto repeat-y;
  box-shadow: 0 7px 0 #5d2e13, 0 16px 24px rgba(77, 43, 20, 0.16);
}

.student-progress-stats article,
.student-feature-panel,
.shop-shelf,
.otto-preview-card,
.otto-options {
  padding: 1rem;
}

.student-progress-stats span,
.shop-balance span {
  display: block;
  color: #6b5138;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.student-progress-stats strong,
.shop-balance strong {
  display: block;
  color: #1f5f3b;
  font-size: 2rem;
  line-height: 1;
}

.student-feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
  gap: 1rem;
}

.student-feature-panel h2,
.shop-shelf h2,
.otto-options h2 {
  margin: 0 0 0.75rem;
  color: #182c21;
  font-size: 1.25rem;
  font-weight: 950;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
}

.concept-card {
  border-radius: 0.45rem;
  padding: 0.8rem;
  background: #eef8e9;
}

.concept-card strong,
.student-run-list strong {
  display: block;
  color: #183825;
}

.concept-card p {
  margin: 0.35rem 0;
  color: #405446;
}

.concept-card span,
.student-run-list span,
.student-muted {
  color: #687066;
  font-size: 0.9rem;
  font-weight: 700;
}

.student-run-list {
  display: grid;
  gap: 0.65rem;
}

.student-run-list div {
  border-bottom: 1px solid rgba(89, 52, 21, 0.16);
  padding-bottom: 0.55rem;
}

.shop-balance {
  border: 0.1rem solid rgba(80, 44, 13, 0.3);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  background: #fff3bd;
  text-align: right;
}

.shop-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.shop-filter-bar select {
  min-width: 12rem;
  border: 0.1rem solid rgba(80, 44, 13, 0.26);
  border-radius: 0.45rem;
  padding: 0.65rem 0.8rem;
}

.shop-shelves {
  display: grid;
  gap: 1rem;
}

.shop-shelf-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(10rem, 12rem);
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.shop-item-card {
  display: grid;
  grid-template-rows: 7rem auto auto auto;
  gap: 0.45rem;
  border: 0.1rem solid rgba(75, 42, 15, 0.18);
  border-radius: 0.45rem;
  padding: 0.65rem;
  background: #ffffff;
}

.shop-item-preview {
  display: grid;
  place-items: center;
  min-height: 7rem;
  border-radius: 0.35rem;
  background: #f2ead6;
}

.shop-item-preview img,
.shop-admin-item img,
.student-owned-row img,
.student-grant-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.shop-price {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 0.4rem;
  padding: 0.45rem 0.65rem;
  background: #1f8b54;
  color: #ffffff;
  font-weight: 950;
}

.shop-price.owned {
  background: #e6f1df;
  color: #255b35;
}

.otto-customizer {
  display: grid;
  grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
  gap: 1rem;
}

.otto-options {
  display: grid;
  gap: 1rem;
}

.otto-option-list {
  display: grid;
  gap: 0.5rem;
}

.otto-option-card {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  border: 0.08rem solid rgba(80, 44, 13, 0.18);
  border-radius: 0.4rem;
  padding: 0.45rem;
  background: #fff;
}

.otto-option-card img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

.otto-option-card button {
  border: 0;
  border-radius: 0.35rem;
  padding: 0.35rem 0.6rem;
  background: #e6a51d;
  color: #201207;
  font-weight: 900;
}

.otto-preview-card {
  display: grid;
  place-items: center;
  min-height: 34rem;
  border-radius: 0.9rem;
}

.otto-layer-preview {
  position: relative;
  width: min(28rem, 80vw);
  aspect-ratio: 4 / 5;
  border-radius: 1rem;
  background: radial-gradient(circle at 50% 38%, rgba(255,255,255,0.8), transparent 12rem), linear-gradient(180deg, #ccefdc, #f8e9bd);
  overflow: hidden;
}

.otto-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shop-admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.shop-admin-grid,
.student-grant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.65rem;
}

.shop-admin-item,
.student-grant-card {
  display: grid;
  gap: 0.4rem;
  padding: 0.65rem;
}

.shop-admin-item img,
.student-grant-card img {
  height: 5rem;
  justify-self: center;
}

.student-owned-list {
  display: grid;
  gap: 0.55rem;
  margin: 0.75rem 0 1rem;
}

.student-owned-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem;
}

.student-owned-row img {
  width: 3rem;
  height: 3rem;
}

@media (max-width: 900px) {
  .student-progress-stats,
  .student-feature-grid,
  .otto-customizer {
    grid-template-columns: 1fr;
  }

  .student-feature-heading {
    align-items: stretch;
    flex-direction: column;
  }
}

:root {
  --app-font: "Luckiest Guy", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bs-body-font-family: var(--app-font);
  --ink: #172033;
  --muted: #657184;
  --paper: #fff8e9;
  --panel: #ffffff;
  --line: #dfe7f0;
  --brand: #0b7fab;
  --brand-strong: #075f80;
  --leaf: #248a5a;
  --timber: #7a4a25;
  --river: #2fc7c9;
  --sun: #f3b33d;
  --danger: #c44242;
  --pink: #ef5e9f;
  --violet: #6747c7;
  --aqua: #2fc7c9;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.12);
}

/* Beaver Trails identity pass */
body {
  background:
    radial-gradient(circle at 12% 0, rgba(47, 199, 201, 0.18), transparent 24rem),
    linear-gradient(180deg, #0c241f 0, #102f2a 17rem, #f5edd9 17.05rem);
}

.app-nav {
  border-bottom: 1px solid rgba(243, 179, 61, 0.24);
  background:
    linear-gradient(90deg, rgba(13, 42, 35, 0.98), rgba(18, 61, 51, 0.98)),
    #0d2a23;
  box-shadow: 0 0.7rem 1.5rem rgba(0, 0, 0, 0.18);
}

.brand-copy {
  display: grid;
  gap: 0.05rem;
  line-height: 1.05;
}

.brand-copy small {
  color: rgba(255, 236, 172, 0.88);
  font-size: 0.7rem;
  font-weight: 800;
}

.brand-mark {
  background:
    radial-gradient(circle at 34% 26%, #fff4a6, #f3b33d 58%, #9a5f19);
  color: #172033;
  box-shadow: 0 0 0 0.18rem rgba(255, 255, 255, 0.13), 0 0.45rem 0.9rem rgba(0, 0, 0, 0.18);
}

.wild-hero,
.student-home-hero,
.leaderboard-hero {
  color: #ffffff;
  background:
    linear-gradient(105deg, rgba(8, 32, 28, 0.93), rgba(15, 94, 75, 0.78) 58%, rgba(95, 63, 25, 0.84)),
    url("../themes/willow/background.png");
  background-size: cover;
  background-position: center;
}

.student-home-hero {
  border: 1px solid rgba(255, 226, 124, 0.28);
  box-shadow: 0 1.5rem 3.2rem rgba(0, 0, 0, 0.28);
}

.student-home-hero h1 {
  max-width: 13ch;
  text-shadow: 0 0.18rem 0.7rem rgba(0, 0, 0, 0.32);
}

.student-home-hero p,
.student-home-hero .eyebrow {
  color: rgba(255, 255, 255, 0.94);
}

.hero-chip {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 31, 28, 0.62);
  color: #fff6c9;
  box-shadow: 0 0.45rem 1rem rgba(0, 0, 0, 0.16);
}

.beaver-points-chip {
  background: rgba(243, 179, 61, 0.2);
}

.student-hero-actions {
  margin-top: 1rem;
}

.pilot-id-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(7, 27, 25, 0.7);
  color: #ffffff;
}

.pilot-id-card span,
.pilot-id-card small {
  color: rgba(255, 236, 172, 0.9);
}

.beaver-map-dashboard {
  border: 1px solid rgba(255, 226, 124, 0.22);
  background:
    linear-gradient(180deg, rgba(12, 36, 31, 0.96), rgba(12, 36, 31, 0.88)),
    #0c241f;
  color: #ffffff;
  box-shadow: 0 1.4rem 3rem rgba(0, 0, 0, 0.22);
}

.beaver-map-header p,
.beaver-map-empty p {
  color: rgba(255, 255, 255, 0.78);
}

.beaver-map-frame {
  border-color: rgba(255, 226, 124, 0.18);
  background: #071b19;
}

.profile-form input[readonly] {
  color: #31433c;
  background: #edf4ea;
  cursor: not-allowed;
}

.profile-readonly-note {
  margin: -0.25rem 0 1rem;
}

.profile-save-button,
.btn.btn-primary {
  color: #12243a;
  font-weight: 900;
}

.beaver-coin-metric img,
.coin-stat img {
  width: 1.9rem;
  height: 1.9rem;
  margin-right: 0.35rem;
  vertical-align: middle;
  filter: drop-shadow(0 0.25rem 0.3rem rgba(0, 0, 0, 0.18));
}

.beaver-coin-metric img {
  animation: coinBounce 2.4s ease-in-out infinite;
}

.leaderboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.leaderboard-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 0.95;
  font-weight: 950;
}

.leaderboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.leaderboard-tabs span {
  border: 1px solid rgba(255, 226, 124, 0.22);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  background: rgba(12, 36, 31, 0.88);
  color: #fff6c9;
  font-weight: 900;
}

.leaderboard-tabs .active {
  background: #f3b33d;
  color: #12243a;
}

.leaderboard-panel {
  background:
    linear-gradient(180deg, rgba(255, 250, 232, 0.98), rgba(255, 255, 255, 0.96));
}

.leaderboard-table {
  display: grid;
  gap: 0.55rem;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 4.2rem 3rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: #ffffff;
}

.leaderboard-row.me {
  border-color: rgba(243, 179, 61, 0.75);
  background: #fff7d4;
}

.leaderboard-rank {
  color: #0f5e4b;
  font-size: 1.25rem;
}

.leaderboard-name {
  font-weight: 900;
}

.leaderboard-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border: 0.12rem solid rgba(89, 52, 21, 0.35);
  border-radius: 50%;
  background: #fff6d6;
}

.leaderboard-stat {
  color: #4e5c65;
  font-weight: 850;
}

@media (max-width: 760px) {
  .leaderboard-hero,
  .leaderboard-row {
    grid-template-columns: 1fr;
  }

  .leaderboard-hero {
    display: grid;
  }

  .leaderboard-row {
    justify-items: start;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(11, 127, 171, 0.12), rgba(247, 249, 252, 0.1) 32rem),
    var(--paper);
  font-family: var(--app-font);
}

a {
  color: var(--brand-strong);
}

.app-nav {
  background: #123047;
  color: #fff;
  padding: 0.75rem 1rem;
}

.app-nav .nav-link,
.app-nav .navbar-brand,
.app-nav .nav-user {
  color: #fff;
}

.app-nav .nav-link {
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
}

.app-nav .nav-link:hover,
.app-nav .nav-link:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 0.55rem;
  background: var(--sun);
  color: #222;
  font-weight: 900;
}

.nav-user {
  align-self: center;
  margin-right: 0.85rem;
  font-weight: 700;
}

.app-shell {
  width: min(1180px, calc(100vw - 2rem));
  margin: 2rem auto 4rem;
}

.app-footer {
  width: min(1180px, calc(100vw - 2rem));
  margin: 0 auto 2rem;
  color: var(--muted);
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  gap: 1.5rem;
  min-height: 31rem;
  align-items: stretch;
  padding: clamp(1.25rem, 3vw, 3rem);
  border-radius: 0.5rem;
  background:
    linear-gradient(120deg, rgba(18, 48, 71, 0.94), rgba(11, 127, 171, 0.74)),
    url("../themes/willow/background.png");
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-copy {
  align-self: center;
}

.hero-copy h1,
.page-heading h1 {
  max-width: 11ch;
  margin: 0 0 1rem;
  font-size: 4.8rem;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 48rem;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.mission-board,
.panel,
.auth-card,
.stat-card {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.08);
}

.mission-board {
  display: grid;
  align-content: center;
  gap: 0.85rem;
  padding: 1.2rem;
  color: var(--ink);
}

.mission-row,
.metric-row,
.destination-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.mission-row:last-child,
.metric-row:last-child,
.destination-row:last-child {
  border-bottom: 0;
}

.mission-row span,
.metric-row span,
.destination-row span,
.stat-card span {
  color: var(--muted);
}

.content-grid,
.stat-grid,
.dashboard-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.content-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
}

.panel,
.stat-card {
  padding: 1.25rem;
}

.panel h2 {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  font-weight: 850;
}

.stat-card {
  display: grid;
  gap: 0.35rem;
}

.stat-card strong {
  font-size: 2.3rem;
  line-height: 1;
}

.page-heading {
  max-width: 58rem;
  margin-bottom: 1.25rem;
}

.page-heading h1 {
  color: var(--ink);
}

.compact-heading h1 {
  font-size: 3rem;
}

.auth-shell {
  display: grid;
  min-height: 70vh;
  place-items: center;
}

.auth-card {
  width: min(100%, 26rem);
  padding: 1.5rem;
}

.auth-card label {
  margin-top: 0.85rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.auth-card button[type="submit"] {
  margin-top: 1.15rem;
}

.sample-logins {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  color: var(--muted);
}

.sample-logins code,
.demo-note code {
  color: #16324a;
  background: #e8f3f7;
  border-radius: 0.35rem;
  padding: 0.15rem 0.35rem;
}

.demo-note {
  margin-top: 1rem;
  color: var(--muted);
}

.app-table {
  margin-bottom: 0;
  vertical-align: middle;
}

.app-table small {
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  min-width: 5.5rem;
  justify-content: center;
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-weight: 800;
}

.status-pill.ok {
  background: #e8f7ef;
  color: var(--leaf);
}

.status-pill.warn {
  background: #fff2d8;
  color: #8b5a00;
}

.action-panel {
  color: inherit;
  text-decoration: none;
}

.action-panel:hover {
  transform: translateY(-1px);
}

.level-strip {
  display: grid;
  grid-template-columns: repeat(4, 3rem);
  gap: 0.35rem;
  margin: 1rem 0;
}

.tile {
  display: block;
  aspect-ratio: 1;
  border-radius: 0.35rem;
  border: 1px solid var(--line);
  background: #e9f2e8;
}

.tile.beaver {
  background: linear-gradient(135deg, #8b5e34, #d09a57);
}

.tile.exit {
  background: linear-gradient(135deg, var(--brand), var(--leaf));
}

.badge-list,
.destination-list {
  display: grid;
  gap: 0.7rem;
}

.badge-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.badge-row p {
  margin: 0.1rem 0 0;
  color: var(--muted);
}

.badge-dot {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin-top: 0.25rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff3b0, var(--sun) 48%, #a56600);
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(4rem, 6rem) auto;
  gap: 0.4rem;
}

.empty-state {
  width: min(42rem, 100%);
  margin: 4rem auto;
  padding: 2rem;
  border-radius: 0.5rem;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .hero-copy h1,
  .page-heading h1 {
    font-size: 3.25rem;
  }

  .hero-band,
  .dashboard-grid,
  .content-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .hero-band {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .hero-copy h1,
  .page-heading h1,
  .compact-heading h1 {
    font-size: 2.35rem;
  }

  .stat-card strong {
    font-size: 1.85rem;
  }

  .app-shell {
    width: min(100vw - 1rem, 1180px);
    margin-top: 1rem;
  }

  .panel,
  .stat-card,
  .auth-card {
    padding: 1rem;
  }

  .level-strip {
    grid-template-columns: repeat(4, minmax(2.2rem, 1fr));
  }
}

.wild-hero {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr);
  min-height: 36rem;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(18, 48, 71, 0.94) 0%, rgba(18, 48, 71, 0.72) 46%, rgba(36, 138, 90, 0.28) 100%),
    url("../themes/willow/background.png");
}

.wild-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 10rem;
  background:
    linear-gradient(135deg, transparent 0 18%, rgba(36, 138, 90, 0.88) 18% 42%, transparent 42% 55%, rgba(243, 179, 61, 0.88) 55% 70%, transparent 70%),
    linear-gradient(0deg, rgba(15, 75, 54, 0.95), rgba(15, 75, 54, 0));
  z-index: -1;
}

.wild-hero .hero-copy {
  width: min(48rem, 100%);
  padding-block: 2rem 8rem;
}

.hero-mascot {
  position: absolute;
  right: 3rem;
  bottom: 1.25rem;
  width: min(33rem, 43vw);
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.35));
}

.hero-mascot img,
.student-mascot {
  display: block;
  width: 100%;
  height: auto;
}

.btn-launch {
  border: 0;
  background: var(--sun);
  color: #1f2630;
  font-weight: 900;
}

.btn-launch:hover,
.btn-launch:focus {
  background: #ffd76d;
  color: #1f2630;
}

.mission-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: -3rem;
  position: relative;
  z-index: 2;
}

.mission-ticket {
  min-height: 12rem;
  padding: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0.5rem;
  color: #fff;
  box-shadow: var(--shadow);
}

.mission-ticket h2 {
  margin: 0.2rem 0 0.6rem;
  font-size: 1.65rem;
  font-weight: 900;
}

.mission-ticket p {
  max-width: 18rem;
  margin: 0;
}

.ticket-kicker {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
  font-weight: 900;
}

.ticket-green {
  background: linear-gradient(135deg, #176b43, #2da66c);
}

.ticket-gold {
  background: linear-gradient(135deg, #9a6107, #f3b33d);
}

.ticket-blue {
  background: linear-gradient(135deg, #164a7a, #0b7fab);
}

.play-lab {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}

.code-block-stack {
  display: grid;
  gap: 0.7rem;
}

.code-block {
  display: block;
  border-radius: 0.45rem;
  padding: 0.85rem 1rem;
  color: #172033;
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(23, 32, 51, 0.16);
}

.code-block.move {
  background: #79d4e6;
}

.code-block.turn {
  background: #f3b33d;
}

.code-block.repeat {
  background: #8ed16f;
}

.code-block.win {
  background: #f27b7b;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(2.8rem, 1fr));
  gap: 0.45rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.cell {
  aspect-ratio: 1;
  border-radius: 0.4rem;
  border: 2px solid rgba(23, 32, 51, 0.08);
  background: #dff2d4;
  position: relative;
}

.cell.start {
  background: #f2c17d;
}

.cell.start::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: #8b5e34;
}

.cell.wall {
  background: repeating-linear-gradient(135deg, #516170 0 0.55rem, #40505f 0.55rem 1.1rem);
}

.cell.key,
.cell.log {
  background: #fff2bb;
}

.cell.key::after,
.cell.log::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 34%;
  height: 32%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--timber), #b8793a);
  box-shadow: inset 0 0 0 0.18rem rgba(90, 48, 24, 0.28);
}

.cell.door {
  background: #8b5e34;
}

.cell.exit {
  background: linear-gradient(135deg, #0b7fab, #248a5a);
}

.student-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 21rem);
  gap: 1rem;
  align-items: center;
  min-height: 24rem;
  padding: 1.5rem;
  border-radius: 0.5rem;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(18, 48, 71, 0.96), rgba(11, 127, 171, 0.72)),
    url("../themes/willow/background.png");
  box-shadow: var(--shadow);
}

.student-command .page-heading {
  margin-bottom: 0;
}

.student-command .page-heading h1 {
  color: #fff;
  max-width: 13ch;
}

.student-command .page-heading p {
  max-width: 43rem;
}

.student-mascot {
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.32));
}

.stat-points {
  border-top: 0.45rem solid #f3b33d;
}

.stat-total {
  border-top: 0.45rem solid #0b7fab;
}

.stat-miles {
  border-top: 0.45rem solid #248a5a;
}

.stat-city {
  border-top: 0.45rem solid #f27b7b;
}

.feature-mission {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(18rem, 1fr);
  gap: 1rem;
  align-items: center;
}

.mission-playfield {
  display: grid;
  gap: 0.75rem;
}

.student-grid {
  box-shadow: none;
}

.reward-burst {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.reward-burst span {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: #e8f3f7;
  color: #123047;
  font-weight: 900;
}

.badge-vault {
  background:
    linear-gradient(180deg, rgba(255, 242, 187, 0.76), rgba(255, 255, 255, 0.9)),
    #fff;
}

@media (max-width: 900px) {
  .hero-mascot {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(24rem, 82vw);
    margin-left: auto;
  }

  .wild-hero .hero-copy {
    padding-bottom: 0;
  }

  .mission-rail,
  .play-lab,
  .student-command,
  .feature-mission {
    grid-template-columns: 1fr;
  }

  .mission-rail {
    margin-top: 1rem;
  }

  .student-mascot {
    max-width: 18rem;
    margin: 0 auto;
  }
}

/* Reward icons, profile editing, and extra colour pass */
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 9.2rem;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -2.6rem;
  bottom: -3rem;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
}

.stat-card strong,
.stat-card > span {
  position: relative;
  z-index: 1;
}

.stat-points {
  background: linear-gradient(135deg, #fff7cf, #ffffff);
}

.stat-total {
  background: linear-gradient(135deg, #dff6ff, #ffffff);
}

.stat-miles {
  background: linear-gradient(135deg, #e2f8db, #ffffff);
}

.stat-city {
  background: linear-gradient(135deg, #ffe0e8, #ffffff);
}

.stat-badges {
  border-top: 0.45rem solid var(--violet);
  background: linear-gradient(135deg, #ebe4ff, #ffffff);
}

.stat-icon {
  position: relative;
  display: inline-grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 0.55rem 1.2rem rgba(23, 32, 51, 0.14);
}

.stat-icon::before,
.stat-icon::after {
  content: "";
  position: absolute;
}

.coin-icon {
  animation: coinBounce 2.4s ease-in-out infinite;
}

.coin-icon::before,
.vault-icon::before {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff9c8, #f3b33d 56%, #b56e08);
}

.coin-icon::after {
  width: 0.28rem;
  height: 1.05rem;
  border-radius: 999px;
  background: rgba(139, 90, 0, 0.55);
}

.vault-icon {
  animation: glowPulse 2.8s ease-in-out infinite;
}

.vault-icon::before {
  box-shadow:
    -0.62rem 0.24rem 0 -0.25rem #f3b33d,
    0.62rem 0.24rem 0 -0.25rem #f3b33d;
}

.miles-icon {
  animation: planeFloat 3s ease-in-out infinite;
}

.miles-icon::before {
  width: 2rem;
  height: 1.35rem;
  background: linear-gradient(135deg, var(--aqua), var(--brand));
  clip-path: polygon(0 45%, 70% 0, 58% 38%, 100% 45%, 58% 56%, 70% 100%);
}

.miles-icon::after {
  width: 2rem;
  height: 0.18rem;
  left: -0.35rem;
  bottom: 0.65rem;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(11, 127, 171, 0.65));
}

.badge-icon {
  animation: badgeWiggle 3.2s ease-in-out infinite;
}

.badge-icon::before {
  width: 1.7rem;
  height: 1.9rem;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  clip-path: polygon(50% 0, 93% 22%, 82% 80%, 50% 100%, 18% 80%, 7% 22%);
}

.badge-icon::after {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #fff;
}

.stat-icon.mini {
  width: 1.85rem;
  height: 1.85rem;
  margin-right: 0.45rem;
  border-radius: 0.5rem;
  vertical-align: middle;
}

.stat-icon.mini::before,
.stat-icon.mini::after {
  transform: scale(0.62);
}

@keyframes coinBounce {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-0.32rem) rotate(5deg); }
}

@keyframes planeFloat {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(0.25rem) translateY(-0.24rem); }
}

@keyframes badgeWiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  42% { transform: rotate(-6deg) scale(1.04); }
  58% { transform: rotate(6deg) scale(1.04); }
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); filter: saturate(1); }
  50% { transform: scale(1.05); filter: saturate(1.35); }
}

.badge-row {
  padding: 0.65rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.78);
}

.badge-image,
.badge-card-image {
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0.45rem 0.55rem rgba(23, 32, 51, 0.22));
}

.badge-image {
  width: 3.4rem;
  height: 3.4rem;
}

.badge-card {
  position: relative;
  min-height: 13rem;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff, #fef0c9);
}

.badge-card:nth-child(3n+2) {
  background: linear-gradient(145deg, #ffffff, #ddf8ff);
}

.badge-card:nth-child(3n+3) {
  background: linear-gradient(145deg, #ffffff, #ebdcff);
}

.badge-card-image {
  width: 4.6rem;
  height: 4.6rem;
  margin-bottom: 0.7rem;
}

.icon-metric > span {
  display: inline-flex;
  align-items: center;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #123047, #0b7fab 56%, #248a5a);
  color: #fff;
  box-shadow: var(--shadow);
}

.profile-hero .page-heading {
  margin-bottom: 0;
}

.profile-hero h1 {
  color: #fff;
}

.avatar-stage {
  display: grid;
  min-height: 12rem;
  place-items: center;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #fff2bb, #ffcfdf);
  box-shadow: inset 0 0 0 0.45rem rgba(255, 255, 255, 0.35);
}

.avatar-stage.theme-woodland {
  background: linear-gradient(135deg, #c7f2b8, #35a76b);
}

.avatar-stage.theme-river {
  background: linear-gradient(135deg, #b9f4ff, #2fc7c9);
}

.avatar-stage.theme-desert {
  background: linear-gradient(135deg, #ffe0a6, #f2914b);
}

.avatar-stage.theme-space {
  background: linear-gradient(135deg, #23234f, #6747c7);
}

.avatar-stage.theme-ocean {
  background: linear-gradient(135deg, #b9f4ff, #0b7fab);
}

.avatar-stage img {
  width: min(8.5rem, 75%);
  height: min(8.5rem, 75%);
  object-fit: contain;
  filter: drop-shadow(0 0.7rem 0.8rem rgba(23, 32, 51, 0.28));
}

.profile-form {
  display: grid;
  gap: 1rem;
}

.profile-form label span,
.profile-form legend {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-weight: 850;
}

.profile-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.avatar-picker,
.theme-picker {
  display: grid;
  gap: 0.65rem;
}

.avatar-picker {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme-picker {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.avatar-choice,
.theme-choice {
  position: relative;
  display: grid;
  min-height: 6.6rem;
  place-items: center;
  gap: 0.35rem;
  padding: 0.55rem;
  border: 2px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
}

.avatar-choice input,
.theme-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avatar-choice img {
  width: 3.8rem;
  height: 3.8rem;
  object-fit: contain;
}

.avatar-choice:has(input:checked),
.theme-choice:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.25rem rgba(11, 127, 171, 0.14);
}

.theme-choice {
  min-height: 4.6rem;
  color: #fff;
}

.theme-choice.theme-unicorn {
  background: linear-gradient(135deg, #ef5e9f, #ffd6ee);
  color: #31213a;
}

.theme-choice.theme-woodland {
  background: linear-gradient(135deg, #176b43, #8ed16f);
}

.theme-choice.theme-river {
  background: linear-gradient(135deg, #0b7fab, #2fc7c9);
}

.theme-choice.theme-desert {
  background: linear-gradient(135deg, #b86816, #ffd081);
  color: #312100;
}

.theme-choice.theme-space {
  background: linear-gradient(135deg, #23234f, #6747c7);
}

.theme-choice.theme-ocean {
  background: linear-gradient(135deg, #0b7fab, #2fc7c9);
}

.save-banner {
  border-radius: 0.45rem;
  padding: 0.7rem 0.85rem;
  background: #e2f8db;
  color: #176b43;
  font-weight: 850;
}

@media (max-width: 900px) {
  .profile-hero,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .avatar-picker,
  .theme-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Beaver Trails adventure hub */
.student-home-hero,
.rewards-hero,
.flying-hero {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.student-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem);
  gap: 1.25rem;
  align-items: center;
  min-height: 28rem;
  padding: clamp(1.25rem, 3.5vw, 3rem);
  color: #fff;
  background:
    radial-gradient(circle at 82% 16%, rgba(255, 215, 109, 0.9) 0 8rem, transparent 8.2rem),
    linear-gradient(135deg, rgba(18, 48, 71, 0.98), rgba(11, 127, 171, 0.82) 48%, rgba(122, 74, 37, 0.86)),
    url("../themes/willow/background.png");
}

.student-home-hero::before,
.student-home-hero::after,
.rewards-hero::after,
.flying-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.student-home-hero::before {
  inset: auto -5rem -5rem auto;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.16) 0 0.8rem, rgba(255, 255, 255, 0.04) 0.8rem 1.6rem);
}

.student-home-hero::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 6rem;
  background: linear-gradient(135deg, transparent 0 18%, rgba(255, 215, 109, 0.9) 18% 31%, transparent 31% 44%, rgba(239, 94, 159, 0.82) 44% 58%, transparent 58%);
}

.student-hero-copy,
.pilot-id-card {
  position: relative;
  z-index: 1;
}

.student-hero-copy h1 {
  max-width: 12ch;
  margin: 0 0 1rem;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  line-height: 0.92;
  font-weight: 950;
  letter-spacing: 0;
}

.student-hero-copy p {
  max-width: 48rem;
  font-size: 1.08rem;
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.hero-chip {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 850;
}

.pilot-id-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 0.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 233, 0.86)),
    #fff;
  color: var(--ink);
  box-shadow: 0 1.2rem 2.4rem rgba(0, 0, 0, 0.22);
  transform: rotate(2deg);
}

.pilot-id-card span,
.pilot-id-card small {
  color: var(--muted);
  font-weight: 850;
}

.pilot-id-card strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1.05;
}

.pilot-avatar {
  display: grid;
  min-height: 12rem;
  place-items: center;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #ffd6ee, #fff2bb);
  box-shadow: inset 0 0 0 0.38rem rgba(255, 255, 255, 0.48);
}

.pilot-avatar.theme-woodland {
  background: linear-gradient(135deg, #8ed16f, #176b43);
}

.pilot-avatar.theme-river {
  background: linear-gradient(135deg, #b9f4ff, #2fc7c9);
}

.pilot-avatar.theme-desert,
.pilot-avatar.desert {
  background: linear-gradient(135deg, #ffd081, #f2914b);
}

.pilot-avatar.theme-space,
.pilot-avatar.space {
  background: linear-gradient(135deg, #23234f, #6747c7);
}

.pilot-avatar.theme-ocean,
.pilot-avatar.ocean {
  background: linear-gradient(135deg, #b9f4ff, #0b7fab);
}

.pilot-avatar img {
  width: min(8.8rem, 78%);
  height: min(8.8rem, 78%);
  object-fit: contain;
  filter: drop-shadow(0 0.8rem 0.9rem rgba(23, 32, 51, 0.28));
}

.arcade-stats {
  margin-top: -2rem;
  position: relative;
  z-index: 2;
}

.fuel-gauge {
  position: relative;
  z-index: 1;
  height: 0.7rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.12);
}

.fuel-gauge span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef5e9f, #f3b33d, #8ed16f);
  animation: fuelShimmer 2.8s linear infinite;
}

.student-wave-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(20rem, 0.8fr);
  gap: 1rem;
  margin-top: 1rem;
}

.student-wave-grid.lower {
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
}

.boarding-pass {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(16rem, 0.7fr);
  gap: 1rem;
  align-items: center;
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(90deg, #fff 0 68%, transparent 68%),
    repeating-linear-gradient(0deg, #123047 0 0.9rem, #0b7fab 0.9rem 1.8rem);
}

.boarding-pass::after {
  content: "";
  position: absolute;
  top: 0.85rem;
  bottom: 0.85rem;
  left: 68%;
  border-left: 3px dashed rgba(23, 32, 51, 0.18);
}

.boarding-main {
  position: relative;
  z-index: 1;
}

.boarding-main h2 {
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 0.95;
}

.boarding-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1rem 0;
}

.boarding-meta span,
.mini-ticket {
  border-radius: 0.45rem;
  padding: 0.65rem;
  background: #e8f3f7;
}

.boarding-meta strong,
.mini-ticket span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07rem;
}

.block-button {
  position: relative;
  padding-inline: 1.25rem 1.55rem;
  border-radius: 0.45rem;
  box-shadow: 0 0.45rem 0 #b56e08;
}

.block-button::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: inherit;
  transform: translateY(-50%);
}

.journey-map-card {
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(18, 48, 71, 0.95), rgba(103, 71, 199, 0.8)),
    url("../themes/willow/background.png");
}

.journey-map-card h2 {
  color: #fff;
}

.flight-route {
  position: relative;
  min-height: 13rem;
  margin: 1rem 0;
}

.route-line,
.route-fill {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 52%;
  height: 0.45rem;
  border-radius: 999px;
}

.route-line {
  background: rgba(255, 255, 255, 0.32);
}

.route-fill {
  right: auto;
  width: var(--progress);
  background: linear-gradient(90deg, #ffd76d, #2fc7c9, #8ed16f);
  box-shadow: 0 0 1rem rgba(47, 199, 201, 0.75);
  animation: routePulse 2.4s ease-in-out infinite;
}

.route-plane {
  position: absolute;
  left: var(--progress);
  top: calc(52% - 1.55rem);
  width: 3rem;
  height: 2.2rem;
  transform: translateX(-50%);
  animation: planeFloat 3s ease-in-out infinite;
}

.route-plane::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffd76d;
  clip-path: polygon(0 46%, 72% 0, 58% 38%, 100% 47%, 58% 58%, 72% 100%);
  filter: drop-shadow(0 0.45rem 0.35rem rgba(0, 0, 0, 0.25));
}

.route-pin {
  position: absolute;
  top: calc(52% + 1rem);
  display: inline-flex;
  min-width: 4.6rem;
  justify-content: center;
  border-radius: 999px;
  padding: 0.28rem 0.5rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.pin-home {
  left: 2%;
}

.pin-now {
  left: calc(var(--progress) - 2rem);
  top: calc(52% - 3.1rem);
  background: #ffd76d;
}

.pin-next {
  right: 2%;
}

.passport-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.passport-strip span {
  display: inline-flex;
  border: 2px dashed rgba(255, 255, 255, 0.62);
  border-radius: 0.45rem;
  padding: 0.35rem 0.55rem;
  color: #fff;
  font-weight: 850;
  transform: rotate(-2deg);
}

.passport-strip span:nth-child(even) {
  transform: rotate(2deg);
}

.badge-cabinet {
  background:
    linear-gradient(135deg, rgba(255, 242, 187, 0.78), rgba(255, 255, 255, 0.92)),
    #fff;
}

.cabinet-grid,
.rewards-cabinet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.cabinet-badge {
  display: grid;
  min-height: 10rem;
  align-content: start;
  gap: 0.35rem;
  padding: 0.8rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(23, 32, 51, 0.08);
}

.cabinet-badge .badge-image {
  width: 4.2rem;
  height: 4.2rem;
}

.cabinet-badge p {
  margin: 0;
  color: var(--muted);
}

.cabinet-badge.locked {
  opacity: 0.72;
  background: repeating-linear-gradient(135deg, #f2f4f8 0 0.7rem, #e5eaf1 0.7rem 1.4rem);
}

.locked-badge-shape {
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 50%;
  background: #c4ccd8;
  filter: grayscale(1);
}

.passport-card {
  background:
    linear-gradient(135deg, #123047, #0b7fab);
  color: #fff;
}

.passport-card h2 {
  color: #fff;
}

.ticket-stack {
  display: grid;
  gap: 0.65rem;
}

.mini-ticket {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, #fff 0 76%, transparent 76%),
    repeating-linear-gradient(0deg, #ffd76d 0 0.5rem, #f3b33d 0.5rem 1rem);
}

.mini-ticket.accent {
  background:
    linear-gradient(90deg, #fff 0 76%, transparent 76%),
    repeating-linear-gradient(0deg, #2fc7c9 0 0.5rem, #0b7fab 0.5rem 1rem);
}

.mini-ticket strong {
  font-size: 1.1rem;
}

.rewards-hero,
.flying-hero {
  max-width: none;
  margin-bottom: 1rem;
  padding: 1.5rem;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(18, 48, 71, 0.94), rgba(239, 94, 159, 0.74)),
    url("../themes/willow/background.png");
}

.flying-hero {
  background:
    linear-gradient(135deg, rgba(18, 48, 71, 0.94), rgba(11, 127, 171, 0.76)),
    url("../themes/willow/background.png");
}

.rewards-hero h1,
.flying-hero h1 {
  color: #fff;
}

.rewards-cabinet {
  margin-top: 1rem;
}

.badge-card {
  padding-top: 1rem;
}

.badge-card.locked {
  filter: grayscale(0.72);
  opacity: 0.72;
}

.badge-card.locked .badge-card-image {
  opacity: 0.45;
}

.unlock-ribbon {
  position: absolute;
  top: 0.8rem;
  right: -2rem;
  width: 8rem;
  padding: 0.2rem;
  background: var(--sun);
  color: #172033;
  font-size: 0.72rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(38deg);
}

.badge-card.locked .unlock-ribbon {
  background: #c4ccd8;
}

.big-map .flight-route {
  min-height: 16rem;
}

.destination-board {
  background: linear-gradient(180deg, #ffffff, #e8f3f7);
}

.destination-ticket {
  align-items: center;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.55rem;
  background: #fff;
  box-shadow: 0 0.45rem 1rem rgba(23, 32, 51, 0.08);
}

.destination-ticket img {
  width: 4.2rem;
  height: 3.2rem;
  border-radius: 0.4rem;
  object-fit: cover;
}

.flight-history-card {
  margin-top: 1rem;
}

@keyframes fuelShimmer {
  0% { filter: hue-rotate(0deg) saturate(1); }
  50% { filter: hue-rotate(12deg) saturate(1.35); }
  100% { filter: hue-rotate(0deg) saturate(1); }
}

@keyframes routePulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

@media (max-width: 1000px) {
  .student-home-hero,
  .student-wave-grid,
  .student-wave-grid.lower,
  .boarding-pass {
    grid-template-columns: 1fr;
  }

  .boarding-pass {
    background: #fff;
  }

  .boarding-pass::after {
    display: none;
  }

  .arcade-stats {
    margin-top: 1rem;
  }

  .pilot-id-card {
    transform: none;
  }
}

@media (max-width: 700px) {
  .cabinet-grid,
  .rewards-cabinet,
  .boarding-meta {
    grid-template-columns: 1fr;
  }

  .student-home-hero {
    min-height: auto;
  }

  .student-hero-copy h1 {
    font-size: 2.55rem;
  }

  .flight-route {
    min-height: 11rem;
  }

  .route-pin {
    min-width: auto;
    font-size: 0.7rem;
  }
}

/* Wave 2: control room polish, Blockly energy, and product-wide motion */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background:
    linear-gradient(90deg, #123047, #0b7fab 58%, #248a5a);
  box-shadow: 0 0.65rem 1.4rem rgba(18, 48, 71, 0.16);
}

.app-nav .nav-link.active {
  background: #ffd76d;
  color: #172033;
  font-weight: 900;
}

.brand-mark {
  box-shadow: 0 0.45rem 0 rgba(0, 0, 0, 0.18);
  transform: rotate(-4deg);
}

.motion-ready .pop-in {
  animation: cardPop 0.42s ease both;
  animation-delay: var(--stagger, 0ms);
}

.panel,
.stat-card,
.mission-ticket,
.control-tile,
.admin-action {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.panel:hover,
.stat-card:hover,
.mission-ticket:hover,
.control-tile:hover,
.admin-action:hover {
  transform: translateY(-0.16rem);
  box-shadow: 0 18px 38px rgba(23, 32, 51, 0.14);
}

.world-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.world-card::after {
  content: "";
  position: absolute;
  inset: auto -2rem -3rem auto;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  z-index: -1;
}

.world-training {
  background:
    linear-gradient(135deg, rgba(23, 107, 67, 0.96), rgba(141, 209, 111, 0.84), rgba(122, 74, 37, 0.72)),
    repeating-linear-gradient(45deg, transparent 0 1rem, rgba(255, 255, 255, 0.12) 1rem 2rem);
}

.world-temple {
  background:
    linear-gradient(135deg, var(--timber), #f3b33d 60%, #2fc7c9);
}

.world-space {
  background:
    radial-gradient(circle at 82% 22%, rgba(47, 199, 201, 0.78) 0 3rem, transparent 3.2rem),
    linear-gradient(135deg, #23234f, #6747c7 58%, #ef5e9f);
}

.blockly-lab {
  align-items: stretch;
}

.blockly-stack {
  padding: 1rem;
  border-radius: 0.5rem;
  background: #23324a;
  box-shadow: var(--shadow);
}

.blockly-stack .code-block {
  position: relative;
  padding-left: 1.35rem;
  border-radius: 0.35rem 0.75rem 0.75rem 0.35rem;
}

.blockly-stack .code-block::before,
.blockly-stack .code-block::after {
  content: "";
  position: absolute;
  left: 0.35rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
}

.blockly-stack .code-block::before {
  top: 0.45rem;
}

.blockly-stack .code-block::after {
  bottom: 0.45rem;
}

.console-grid {
  position: relative;
  background:
    linear-gradient(180deg, #ffffff, #f3fbff);
}

.console-grid::before {
  content: "BUILD";
  position: absolute;
  top: -0.75rem;
  right: 0.8rem;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  background: #8ed16f;
  color: #172033;
  font-size: 0.72rem;
  font-weight: 950;
  box-shadow: 0 0.3rem 0 rgba(23, 32, 51, 0.18);
}

.teacher-hero,
.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1.35rem;
  border-radius: 0.5rem;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(18, 48, 71, 0.96), rgba(11, 127, 171, 0.82)),
    url("../themes/willow/background.png");
  box-shadow: var(--shadow);
}

.admin-hero {
  display: block;
  background:
    linear-gradient(135deg, rgba(18, 48, 71, 0.96), rgba(103, 71, 199, 0.78)),
    url("../themes/willow/background.png");
}

.teacher-hero .page-heading,
.admin-hero {
  max-width: none;
  margin-bottom: 0;
}

.teacher-hero h1,
.admin-hero h1 {
  color: #fff;
}

.teacher-metrics,
.admin-action-grid,
.teacher-class-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.teacher-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.control-tile {
  display: grid;
  min-height: 8rem;
  align-content: center;
  gap: 0.3rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #ffffff, #e8f3f7);
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.08);
}

.control-tile strong {
  font-size: 2.25rem;
  line-height: 1;
}

.control-tile.warning {
  background: linear-gradient(135deg, #fff2d8, #ffffff);
}

.alert-dot {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 0.45rem rgba(243, 179, 61, 0.22);
  animation: alertPulse 1.8s ease-in-out infinite;
}

.progress-ring {
  --ring-size: 8.5rem;
  --ring-track: rgba(255, 255, 255, 0.22);
  --ring-fill: #ffd76d;
  display: grid;
  width: var(--ring-size);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #123047 0 54%, transparent 55%),
    conic-gradient(var(--ring-fill) calc(var(--value) * 1%), var(--ring-track) 0);
  color: #fff;
  box-shadow: inset 0 0 0 0.45rem rgba(255, 255, 255, 0.12), 0 0.8rem 1.5rem rgba(0, 0, 0, 0.2);
}

.progress-ring span {
  font-size: 1.65rem;
  font-weight: 950;
}

.progress-ring small {
  margin-top: -1.8rem;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 850;
}

.small-ring {
  --ring-size: 5.25rem;
  --ring-track: #e2eaf3;
  --ring-fill: #2fc7c9;
  background:
    radial-gradient(circle at center, #fff 0 54%, transparent 55%),
    conic-gradient(var(--ring-fill) calc(var(--value) * 1%), var(--ring-track) 0);
  color: var(--ink);
  box-shadow: inset 0 0 0 0.35rem rgba(255, 255, 255, 0.85);
}

.small-ring span {
  font-size: 1.05rem;
}

.section-heading {
  margin-top: 1.4rem;
}

.teacher-class-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.class-mission-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  background:
    linear-gradient(135deg, #ffffff, #fff8e9 58%, #e8f3f7);
}

.mission-mini-route {
  position: relative;
  height: 0.75rem;
  margin-top: 0.9rem;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7f0;
}

.mission-mini-route span {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef5e9f, #f3b33d, #2fc7c9);
}

.class-card-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.class-card-metrics span {
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  background: #e8f3f7;
  color: #123047;
  font-weight: 850;
  text-align: center;
}

.class-card-metrics .needs-attention {
  background: #fff2d8;
  color: #8b5a00;
}

.teacher-table-panel {
  margin-top: 1rem;
}

.mini-progress {
  display: inline-flex;
  width: 5.2rem;
  height: 0.55rem;
  margin-right: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7f0;
  vertical-align: middle;
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2fc7c9, #8ed16f);
}

.admin-stats {
  margin-top: 1rem;
}

.admin-action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-action {
  position: relative;
  min-height: 13rem;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(145deg, #ffffff, #e8f3f7);
}

.admin-action span {
  display: inline-grid;
  width: 3.2rem;
  height: 3.2rem;
  margin-bottom: 0.8rem;
  border-radius: 0.8rem;
  background: #ffd76d;
  box-shadow: 0 0.55rem 1.2rem rgba(23, 32, 51, 0.14);
}

.admin-action::after {
  content: "";
  position: absolute;
  right: -2.5rem;
  bottom: -2.5rem;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: rgba(11, 127, 171, 0.12);
}

.admin-action.teachers span {
  background: #2fc7c9;
}

.admin-action.classes span {
  background: #8ed16f;
}

.beaver-map-dashboard {
  margin: 1.25rem 0;
  overflow: hidden;
  border: 1px solid rgba(31, 67, 79, 0.14);
  border-radius: 0.5rem;
  background: linear-gradient(145deg, #fbfffb, #e9f7f4);
  box-shadow: 0 1.1rem 2.2rem rgba(23, 32, 51, 0.11);
}

.beaver-map-empty {
  padding: 1.35rem;
}

.beaver-map-empty h2,
.beaver-map-header h2 {
  margin: 0;
  color: #102534;
  font-size: 1.35rem;
}

.beaver-map-empty p,
.beaver-map-header p,
.teacher-beaver-heading p {
  margin: 0.35rem 0 0;
  color: #496370;
}

.beaver-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
}

.beaver-map-arrows {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem;
  border: 1px solid rgba(31, 67, 79, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #173342;
  font-weight: 800;
  white-space: nowrap;
}

.beaver-map-arrow {
  display: inline-grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #123c4a;
  color: #ffffff;
  font-size: 1.75rem;
  line-height: 1;
  box-shadow: 0 0.35rem 0.9rem rgba(18, 60, 74, 0.22);
}

.beaver-map-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.beaver-map-frame {
  position: relative;
  overflow: hidden;
  background: #102534;
}

.beaver-map-part {
  display: none;
  position: relative;
}

.beaver-map-part.active {
  display: block;
}

.beaver-map-image {
  display: block;
  width: 100%;
  height: auto;
}

.beaver-map-markers {
  position: absolute;
  inset: 0;
}

.beaver-region-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(2.55rem, 5vw, 4.65rem);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  text-decoration: none;
  transform: translate(-50%, -50%);
}

.beaver-region-marker:disabled {
  cursor: not-allowed;
}

.beaver-region-marker img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0.42rem 0.5rem rgba(0, 0, 0, 0.42));
}

.beaver-region-marker.locked img {
  width: 78%;
  height: 78%;
  margin: 11%;
  opacity: 0.92;
  filter: grayscale(0.15) drop-shadow(0 0.35rem 0.45rem rgba(0, 0, 0, 0.5));
}

.beaver-region-marker.current {
  animation: beaverMapBob 2.1s ease-in-out infinite;
}

.beaver-region-marker.map-spotlight {
  animation: beaverMapSpotlight 1.25s ease-in-out infinite;
  z-index: 4;
}

.beaver-region-marker.current img {
  filter:
    drop-shadow(0 0 0.45rem rgba(255, 239, 137, 0.95))
    drop-shadow(0 0.45rem 0.55rem rgba(0, 0, 0, 0.42));
}

.beaver-region-marker.completed img {
  filter:
    saturate(1.08)
    drop-shadow(0 0 0.35rem rgba(61, 173, 119, 0.7))
    drop-shadow(0 0.42rem 0.5rem rgba(0, 0, 0, 0.42));
}

.beaver-region-marker span {
  position: absolute;
  right: -0.15rem;
  bottom: -0.1rem;
  display: grid;
  min-width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border: 2px solid rgba(8, 31, 28, 0.85);
  border-radius: 999px;
  background: #ffffff;
  color: #0d2620;
  font-size: 0.68rem;
  font-weight: 900;
}

.beaver-region-marker.locked span {
  background: #6f777b;
  color: #ffffff;
}

.teacher-beaver-preview {
  margin: 1.25rem 0;
}

.teacher-beaver-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.teacher-beaver-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: end;
}

.teacher-beaver-heading h2 {
  margin: 0;
  color: #102534;
}

.map-positioner-page {
  display: grid;
  gap: 1rem;
}

.map-positioner-page h1 {
  margin: 0;
  color: #102534;
}

.map-positioner-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(8rem, 1fr)) auto auto auto;
  gap: 0.75rem;
  align-items: end;
  padding: 1rem;
  border: 1px solid rgba(31, 67, 79, 0.14);
  border-radius: 0.5rem;
  background: #ffffff;
  box-shadow: 0 0.7rem 1.5rem rgba(23, 32, 51, 0.08);
}

.map-positioner-toolbar label {
  display: grid;
  gap: 0.25rem;
  color: #425763;
  font-size: 0.82rem;
  font-weight: 800;
}

.map-positioner-toolbar select,
.map-positioner-toolbar input {
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid rgba(31, 67, 79, 0.2);
  border-radius: 0.4rem;
  padding: 0.35rem 0.55rem;
}

.map-nudge-controls {
  display: grid;
  grid-template-columns: repeat(3, 2.25rem);
  grid-template-rows: repeat(2, 2.25rem);
  gap: 0.25rem;
}

.map-nudge-controls button {
  border: 0;
  border-radius: 0.4rem;
  background: #123c4a;
  color: #ffffff;
  font-weight: 900;
}

.map-nudge-controls [data-nudge="up"] {
  grid-column: 2;
}

.map-nudge-controls [data-nudge="left"] {
  grid-column: 1;
  grid-row: 2;
}

.map-nudge-controls [data-nudge="right"] {
  grid-column: 3;
  grid-row: 2;
}

.map-nudge-controls [data-nudge="down"] {
  grid-column: 2;
  grid-row: 2;
}

#mapSaveStatus {
  color: #425763;
  font-size: 0.9rem;
  font-weight: 700;
}

.beaver-player-root {
  --beaver-player-line: rgba(31, 67, 79, 0.14);
  --beaver-player-panel: #ffffff;
  --beaver-player-ink: #12243a;
  --beaver-player-muted: #617382;
  color: var(--beaver-player-ink);
  min-width: 0;
}

.beaver-player-root .player-shell {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.beaver-player-root .player-loading {
    min-height: 16rem;
    place-items: center;
    text-align: center;
    color: #fdf7e2;
    background: linear-gradient(135deg, rgba(19, 62, 52, 0.96), rgba(31, 128, 102, 0.92));
    border: 1px solid rgba(255, 193, 84, 0.28);
    box-shadow: 0 22px 50px rgba(10, 36, 30, 0.22);
}

.beaver-player-root .player-loading strong {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.beaver-player-root .player-error-state {
    background: linear-gradient(135deg, rgba(62, 30, 24, 0.96), rgba(132, 71, 38, 0.92));
}

.beaver-player-root .player-toolbar,
.beaver-player-root .game-host,
.beaver-player-root .blockly-host,
.beaver-player-root .status-panel {
  border: 1px solid var(--beaver-player-line);
  border-radius: 0.5rem;
  background: var(--beaver-player-panel);
  box-shadow: 0 1.15rem 2.4rem rgba(23, 32, 51, 0.1);
}

.beaver-player-root .player-toolbar {
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  color: #ffffff;
  background:
    radial-gradient(circle at 8% 30%, rgba(243, 179, 61, 0.34), transparent 16rem),
    linear-gradient(135deg, #102f3b, #145b63 56%, #513d21);
}

.beaver-player-root .player-toolbar h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.beaver-player-root .eyebrow {
  margin: 0 0 0.35rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.beaver-player-root .topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  min-width: min(100%, 18rem);
}

.beaver-player-root select {
  min-height: 2.75rem;
  max-width: 100%;
  border: 1px solid var(--beaver-player-line);
  border-radius: 0.4rem;
  padding: 0.45rem 0.6rem;
  background: #ffffff;
  color: var(--beaver-player-ink);
  font: inherit;
}

.beaver-player-root .btn {
  display: inline-grid;
  min-height: 2.75rem;
  place-items: center;
  border: 0;
  border-radius: 0.45rem;
  padding: 0.52rem 0.9rem;
  color: #12243a;
  font: inherit;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  white-space: normal;
  text-align: center;
}

.beaver-player-root .btn.primary {
  background: #f3b33d;
  box-shadow: 0 0.32rem 0 rgba(122, 74, 37, 0.5);
}

.beaver-player-root .btn.secondary {
  background: #e8f3f7;
}

.beaver-player-root .btn:disabled {
  opacity: 0.5;
  box-shadow: none;
  cursor: not-allowed;
}

.beaver-player-root .code-tray {
  display: grid;
  gap: 0.65rem;
  border: 1px solid var(--beaver-player-line);
  border-radius: 0.5rem;
  padding: 0.75rem;
  background:
    linear-gradient(135deg, rgba(243, 179, 61, 0.12), transparent 22rem),
    #ffffff;
  box-shadow: 0 1rem 2rem rgba(23, 32, 51, 0.08);
}

.beaver-player-root .code-tray[hidden] {
  display: none;
}

.beaver-player-root .level-hints {
  border: 1px solid var(--beaver-player-line);
  border-radius: 0.45rem;
  padding: 0.65rem 0.85rem;
  background: #fff8df;
  color: #263a30;
  box-shadow: 0 0.7rem 1.4rem rgba(23, 32, 51, 0.07);
}

.beaver-player-root .level-hints[hidden] {
  display: none;
}

.beaver-player-root .level-hints summary {
  cursor: pointer;
  font-weight: 900;
}

.beaver-player-root .level-hints ol {
  margin: 0.55rem 0 0;
  padding-left: 1.25rem;
}

.beaver-player-root .level-hints li {
  margin: 0.25rem 0;
}

.beaver-player-root .code-tray-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #12243a;
}

.beaver-player-root .code-tray-header .eyebrow {
  color: #617382;
}

.beaver-player-root .code-tray-header strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 950;
}

.beaver-player-root .code-tray-header span {
  color: #617382;
  font-size: 0.9rem;
  font-weight: 750;
}

.beaver-player-root .quick-block-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  align-content: flex-start;
  gap: 0.22rem;
  min-height: 0;
  max-height: 1.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.08rem;
  scrollbar-width: thin;
}

.beaver-player-root .quick-block-bar button {
  flex: 0 0 auto;
  min-height: 1.26rem;
  border: 0;
  border-radius: 0.24rem;
  padding: 0.1rem 0.36rem 0.16rem;
  background: #43b82d;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  text-transform: lowercase;
  box-shadow:
    inset 0 0.12rem 0 rgba(255, 255, 255, 0.2),
    inset 0 -0.15rem 0 rgba(0, 0, 0, 0.18),
    0 0.08rem 0 rgba(49, 31, 15, 0.24);
}

.beaver-player-root .quick-block-bar button:hover,
.beaver-player-root .quick-block-bar button:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-0.02rem);
}

.beaver-player-root .quick-block-bar button[data-quick-kind="movement"] {
  background: #0f79da;
}

.beaver-player-root .quick-block-bar button[data-quick-kind="turn"] {
  background: #8638d9;
}

.beaver-player-root .quick-block-bar button[data-quick-kind="loop"] {
  background: #f5a000;
  color: #231709;
}

.beaver-player-root .student-pane {
  min-width: 0;
}

.beaver-player-root .blockly-pane {
  display: grid;
  grid-template-rows: minmax(16rem, clamp(16rem, 34vh, 22rem)) auto;
  gap: 0.75rem;
}

.beaver-player-root .blockly-host,
.beaver-player-root .game-host {
  overflow: hidden;
}

.beaver-player-root .game-host {
  min-height: 0;
  height: auto;
  aspect-ratio: var(--level-aspect, 16 / 9);
  border: 0;
  border-radius: 0.5rem;
  background: #123047;
}

.beaver-player-root .game-host canvas {
  display: block;
  width: 100%;
}

.beaver-player-root .blockly-host {
  height: 100%;
  min-height: 16rem;
  border: 0;
  border-radius: 0.45rem;
  position: relative;
  background:
    linear-gradient(90deg, rgba(243, 179, 61, 0.08), transparent 12rem),
    #eef8fb;
}

.beaver-player-root .blocklyTrash,
.beaver-player-root .blocklyZoom {
  display: block !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.beaver-player-root .blockly-host .blocklyToolboxDiv {
  border-right: 0;
  background:
    linear-gradient(180deg, rgba(18, 48, 71, 0.96), rgba(20, 91, 99, 0.96)),
    #123047;
  color: #ffffff;
}

.beaver-player-root .blockly-host .blocklyTreeRow {
  min-height: 2.35rem;
  margin: 0.2rem 0.45rem;
  border-radius: 0.45rem;
  color: #ffffff;
}

.beaver-player-root .blockly-host .blocklyTreeSelected {
  background-color: #f3b33d !important;
  color: #12243a !important;
}

.beaver-player-root .blockly-host .blocklyTreeLabel {
  color: inherit;
  font-weight: 900;
}

.beaver-player-root .game-pane {
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.55rem;
}

.beaver-player-root .game-status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--beaver-player-line);
  border-radius: 0.45rem;
  padding: 0.65rem 0.8rem;
  background: #123047;
  color: #ffffff;
  font-weight: 850;
}

.beaver-points-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  border-radius: 999px;
  padding: 0.18rem 0.55rem 0.18rem 0.28rem;
  background: rgba(243, 179, 61, 0.18);
  color: #ffe58a;
}

.beaver-points-pill img {
  width: 1.65rem;
  height: 1.65rem;
}

.beaver-points-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.beaver-points-chip img {
  width: 1.65rem;
  height: 1.65rem;
}

.beaver-player-root .game-host.running {
  outline: 0.22rem solid rgba(243, 179, 61, 0.55);
}

.beaver-player-root .game-host.complete {
  outline: 0.22rem solid rgba(36, 138, 90, 0.45);
}

.beaver-player-root .game-host.failed {
  outline: 0.22rem solid rgba(196, 66, 66, 0.45);
}

.beaver-player-root .run-feedback {
  border: 1px solid var(--beaver-player-line);
  border-radius: 0.5rem;
  padding: 0.8rem;
  background: #fffaf0;
  min-height: 7rem;
  overflow: visible;
}

.beaver-completion-modal[hidden] {
  display: none;
}

.beaver-completion-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: auto;
}

.beaver-completion-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 21, 28, 0.72);
  backdrop-filter: blur(4px);
}

.beaver-completion-card {
  position: relative;
  width: min(40rem, 100%);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0.65rem;
  padding: clamp(1rem, 2vh, 1.35rem);
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 223, 90, 0.34), transparent 14rem),
    linear-gradient(145deg, #123047, #0e6d6a 58%, #6b4b20);
  box-shadow: 0 1.8rem 4rem rgba(0, 0, 0, 0.36);
  text-align: center;
  animation: cardPop 0.22s ease-out;
}

.beaver-completion-card h2 {
  margin: 0;
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: 0;
}

.completion-summary {
  margin: 0.6rem auto 0.85rem;
  max-width: 25rem;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.beaver-completion-coin {
  width: clamp(3.4rem, 9vh, 5rem);
  height: clamp(3.4rem, 9vh, 5rem);
  filter: drop-shadow(0 0.55rem 0.65rem rgba(0, 0, 0, 0.32));
}

.completion-award {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
  border-radius: 999px;
  padding: 0.35rem 0.85rem 0.35rem 0.45rem;
  background: rgba(255, 255, 255, 0.13);
}

.completion-award img {
  width: 2.35rem;
  height: 2.35rem;
}

.completion-award strong {
  font-size: 2rem;
  line-height: 1;
}

.completion-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.completion-breakdown div {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.5rem;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.1);
}

.completion-breakdown span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.completion-breakdown strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.35rem;
}

.beaver-player-root .run-feedback-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
}

.beaver-player-root pre {
  max-height: 10rem;
  margin: 0.55rem 0 0;
  overflow: auto;
  white-space: pre-wrap;
}

.beaver-player-root .status-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem;
}

.map-positioner-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(31, 67, 79, 0.14);
  border-radius: 0.5rem;
  background: #102534;
  box-shadow: 0 1.1rem 2.2rem rgba(23, 32, 51, 0.11);
}

.map-positioner-stage > img {
  display: block;
  width: 100%;
  height: auto;
}

#positionerMarkerLayer {
  position: absolute;
  inset: 0;
}

.positioner-marker {
  position: absolute;
  width: clamp(2.55rem, 5vw, 4.65rem);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  touch-action: none;
}

.positioner-marker.selected {
  outline: 0.22rem solid #ffdf5a;
  outline-offset: 0.18rem;
}

.positioner-marker img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0.42rem 0.5rem rgba(0, 0, 0, 0.42));
}

.positioner-marker span {
  position: absolute;
  right: -0.15rem;
  bottom: -0.1rem;
  display: grid;
  min-width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border: 2px solid rgba(8, 31, 28, 0.85);
  border-radius: 999px;
  background: #ffffff;
  color: #0d2620;
  font-size: 0.68rem;
  font-weight: 900;
}

@keyframes cardPop {
  from {
    opacity: 0;
    transform: translateY(0.45rem) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes beaverMapBob {
  0%, 100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-50%, calc(-50% - 0.45rem));
  }
}

@keyframes beaverMapSpotlight {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    filter: drop-shadow(0 0 0 rgba(243, 179, 61, 0));
  }
  50% {
    transform: translate(-50%, calc(-50% - 0.6rem)) scale(1.16);
    filter: drop-shadow(0 0 1rem rgba(243, 179, 61, 0.82));
  }
}

@keyframes alertPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0.35rem rgba(243, 179, 61, 0.22);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 0.65rem rgba(243, 179, 61, 0.1);
  }
}

@media (max-width: 1000px) {
  .teacher-hero,
  .teacher-metrics,
  .teacher-class-grid,
  .admin-action-grid {
    grid-template-columns: 1fr;
  }

  .teacher-ring {
    justify-self: start;
  }
}

/* Beaver Trails final visual overrides */
body {
  background:
    radial-gradient(circle at 12% 0, rgba(47, 199, 201, 0.18), transparent 24rem),
    linear-gradient(180deg, #0c241f 0, #102f2a 17rem, #f5edd9 17.05rem);
}

.app-nav {
  border-bottom: 1px solid rgba(243, 179, 61, 0.24);
  background:
    linear-gradient(90deg, rgba(13, 42, 35, 0.98), rgba(18, 61, 51, 0.98)),
    #0d2a23;
  box-shadow: 0 0.7rem 1.5rem rgba(0, 0, 0, 0.18);
}

.wild-hero,
.student-home-hero,
.leaderboard-hero {
  color: #ffffff;
  background:
    linear-gradient(105deg, rgba(8, 32, 28, 0.93), rgba(15, 94, 75, 0.78) 58%, rgba(95, 63, 25, 0.84)),
    url("../themes/willow/background.png");
  background-size: cover;
  background-position: center;
}

.student-home-hero {
  border: 1px solid rgba(255, 226, 124, 0.28);
  box-shadow: 0 1.5rem 3.2rem rgba(0, 0, 0, 0.28);
}

.student-home-hero h1 {
  max-width: 13ch;
  text-shadow: 0 0.18rem 0.7rem rgba(0, 0, 0, 0.32);
}

.hero-chip {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 31, 28, 0.62);
  color: #fff6c9;
  box-shadow: 0 0.45rem 1rem rgba(0, 0, 0, 0.16);
}

.beaver-map-dashboard {
  border: 1px solid rgba(255, 226, 124, 0.22);
  background:
    linear-gradient(180deg, rgba(12, 36, 31, 0.96), rgba(12, 36, 31, 0.88)),
    #0c241f;
  color: #ffffff;
  box-shadow: 0 1.4rem 3rem rgba(0, 0, 0, 0.22);
}

.beaver-map-header p,
.beaver-map-empty p {
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 650px) {
  .beaver-map-header,
  .teacher-beaver-heading {
    display: block;
  }

  .beaver-map-arrows {
    margin-top: 0.8rem;
  }

  .beaver-region-marker {
    width: clamp(1.9rem, 5.8vw, 3.2rem);
  }

  .beaver-region-marker span {
    min-width: 1.05rem;
    height: 1.05rem;
    font-size: 0.55rem;
  }

  .map-positioner-toolbar {
    grid-template-columns: 1fr;
  }

  .class-mission-card,
  .class-card-metrics {
    grid-template-columns: 1fr;
  }

  .progress-ring {
    --ring-size: 6.8rem;
  }

  .beaver-player-root .player-toolbar,
  .beaver-player-root .code-tray-header,
  .beaver-player-root .run-feedback-head {
    display: grid;
  }

  .beaver-player-root .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    margin-top: 0.85rem;
  }

  .beaver-player-root select,
  .beaver-player-root .btn {
    width: 100%;
  }

  .beaver-player-root .code-tray-header span {
    display: block;
    margin-top: 0.35rem;
  }
}

/* Beaver Trails adventure-game identity lock */
body {
  color: #f8eed4;
  background:
    radial-gradient(circle at 16% 8%, rgba(61, 186, 149, 0.22), transparent 20rem),
    radial-gradient(circle at 86% 4%, rgba(243, 179, 61, 0.18), transparent 18rem),
    linear-gradient(180deg, #071815 0, #0b241f 24rem, #14261f 24.05rem, #f2e6c9 100%);
}

.app-shell {
  width: min(1220px, calc(100vw - 2rem));
}

.app-nav {
  border-bottom: 1px solid rgba(243, 179, 61, 0.34);
  background:
    linear-gradient(180deg, rgba(15, 51, 41, 0.98), rgba(8, 29, 26, 0.98)),
    #0b241f;
  box-shadow: 0 0.9rem 1.8rem rgba(0, 0, 0, 0.24);
}

.brand-lockup {
  gap: 0.7rem;
}

.brand-mark {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.5rem;
  background:
    radial-gradient(circle at 34% 24%, #fff2a8, #f4b53e 58%, #9c5a1b);
  color: #1e251a;
  transform: rotate(-4deg);
}

.brand-copy strong {
  color: #fff4d6;
  font-size: 1.15rem;
  text-shadow: 0 0.12rem 0 rgba(0, 0, 0, 0.45);
}

.brand-copy small {
  color: #ffc94d;
}

.app-nav .nav-link {
  color: #f8eed4;
  font-weight: 850;
}

.app-nav .nav-link:hover,
.app-nav .nav-link:focus {
  background: rgba(243, 179, 61, 0.16);
  color: #ffffff;
}

.nav-trail-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.9rem;
  align-self: center;
  border: 1px solid rgba(243, 179, 61, 0.46);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  background: rgba(74, 46, 22, 0.68);
  color: #ffe7a4;
  font-weight: 900;
}

.nav-trail-badge img {
  width: 1.35rem;
  height: 1.35rem;
}

.nav-user {
  color: #fff4d6;
}

.app-footer {
  color: rgba(48, 64, 54, 0.78);
}

.wild-hero,
.student-home-hero,
.leaderboard-hero {
  background:
    linear-gradient(105deg, rgba(6, 24, 21, 0.94), rgba(14, 82, 64, 0.78) 58%, rgba(96, 58, 25, 0.84)),
    url("../themes/willow/background.png") center / cover;
}

.student-home-hero {
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 21rem);
  border: 1px solid rgba(243, 179, 61, 0.34);
  background-position: center;
}

.student-home-hero::before {
  background:
    radial-gradient(circle at center, rgba(243, 179, 61, 0.26), transparent 62%);
}

.student-home-hero::after {
  height: 4.5rem;
  background:
    linear-gradient(180deg, transparent, rgba(7, 24, 21, 0.7)),
    repeating-linear-gradient(90deg, rgba(106, 63, 29, 0.72) 0 5rem, rgba(54, 32, 18, 0.72) 5rem 5.35rem);
}

.student-hero-copy h1 {
  max-width: 15ch;
}

.region-chip img,
.beaver-points-chip img {
  width: 1.65rem;
  height: 1.65rem;
  margin-right: 0.4rem;
  object-fit: contain;
}

.trail-guide-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 0.5rem;
  color: #2b1b13;
  box-shadow: 0 1.2rem 2.4rem rgba(0, 0, 0, 0.24);
  transform: rotate(1.4deg);
  border: 0.18rem solid rgba(107, 62, 31, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 241, 201, 0.96), rgba(214, 165, 91, 0.94));
}

.trail-guide-card span,
.trail-guide-card small {
  color: #68411f;
  font-weight: 850;
}

.trail-guide-card strong {
  display: block;
  color: #2b1b13;
  font-size: 1.45rem;
  line-height: 1.05;
}

.otto-guide-avatar {
  display: grid;
  min-height: 13rem;
  place-items: center;
  border-radius: 0.5rem;
  background:
    radial-gradient(circle at center, rgba(255, 201, 77, 0.38), transparent 62%),
    linear-gradient(180deg, rgba(14, 82, 64, 0.18), rgba(107, 62, 31, 0.18));
  box-shadow: inset 0 0 0 0.35rem rgba(255, 255, 255, 0.28);
}

.otto-guide-avatar img {
  width: min(12rem, 70%);
  image-rendering: auto;
  filter: drop-shadow(0 0.7rem 0.65rem rgba(0, 0, 0, 0.28));
}

.beaver-map-dashboard {
  border: 1px solid rgba(243, 179, 61, 0.36);
  background:
    linear-gradient(180deg, rgba(8, 29, 26, 0.98), rgba(11, 36, 31, 0.94));
}

.beaver-map-header {
  border-bottom: 1px solid rgba(243, 179, 61, 0.2);
  padding-bottom: 0.9rem;
}

.beaver-map-header h2::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 2rem;
  margin-right: 0.5rem;
  vertical-align: -0.35rem;
  background: url("../themes/willow/beaver/idle.png") center / contain no-repeat;
  filter: drop-shadow(0 0.25rem 0.25rem rgba(0, 0, 0, 0.3));
}

.beaver-map-frame {
  border: 0.28rem solid rgba(107, 62, 31, 0.92);
  box-shadow: inset 0 0 0 0.12rem rgba(255, 222, 145, 0.26), 0 1.2rem 2.2rem rgba(0, 0, 0, 0.28);
}

@media (max-width: 980px) {
  .student-home-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .nav-trail-badge {
    margin: 0.6rem 0;
    width: fit-content;
  }
}

/* Login screen only: responsive Beaver Trails front door */
body:has(.beaver-login-screen),
body:has(.teacher-login-placeholder),
body:has(.teacher-login-screen) {
  min-height: 100vh;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.28)),
    url("../UI/beaver_shell/images/background.png") center / cover fixed no-repeat,
    #071815;
}

body:has(.beaver-login-screen) header,
body:has(.beaver-login-screen) .app-footer,
body:has(.teacher-login-placeholder) header,
body:has(.teacher-login-placeholder) .app-footer,
body:has(.teacher-login-screen) header,
body:has(.teacher-login-screen) .app-footer {
  display: none;
}

body:has(.beaver-login-screen) .app-shell,
body:has(.teacher-login-placeholder) .app-shell,
body:has(.teacher-login-screen) .app-shell {
  display: block;
  width: 100%;
  min-height: 100vh;
  margin: 0;
}

body:has(.beaver-login-screen) main,
body:has(.teacher-login-placeholder) main,
body:has(.teacher-login-screen) main {
  display: block;
  width: 100%;
  min-height: 100vh;
  padding: 0 !important;
}

.beaver-login-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(0.35rem, 1.2vw, 0.85rem);
  width: 100%;
  min-height: 100vh;
  padding: clamp(0.65rem, 1.8vw, 1.45rem);
  overflow-x: clip;
  color: #2c1b10;
}

.login-brand {
  position: relative;
  z-index: 6;
  display: block;
  width: min(48rem, 78vw);
  justify-self: center;
  filter: drop-shadow(0 0.55rem 0.5rem rgba(0, 0, 0, 0.55));
}

.login-brand img,
.login-feature-strip img,
.login-otto img {
  display: block;
  width: 100%;
  height: auto;
}

.login-stage {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: center;
  justify-items: center;
  width: min(78rem, 100%);
  margin: clamp(-0.6rem, -1.2vw, -0.2rem) auto 0;
}

.login-parchment-panel {
  display: flex;
  flex-direction: column;
  width: min(69rem, 96vw);
  filter: drop-shadow(0 1rem 1.1rem rgba(0, 0, 0, 0.44));
}

.login-parchment-top,
.login-parchment-bottom {
  width: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% auto;
}

.login-parchment-top {
  aspect-ratio: 1508 / 118;
  background-image: url("../UI/beaver_shell/images/topParchment.png");
}

.login-parchment-bottom {
  aspect-ratio: 1508 / 115;
  background-image: url("../UI/beaver_shell/images/bottomParchment.png");
}

.login-parchment-middle {
  display: grid;
  grid-template-columns: minmax(14rem, 0.88fr) minmax(20rem, 1fr);
  align-items: center;
  column-gap: clamp(1rem, 2.6vw, 2.4rem);
  min-height: clamp(25rem, 48vh, 31rem);
  padding: clamp(0.2rem, 0.6vw, 0.55rem) clamp(4rem, 7.5vw, 6.2rem);
  background: url("../UI/beaver_shell/images/middleParchment.png") top center / 100% auto repeat-y;
}

.login-otto {
  justify-self: center;
  width: min(20rem, 28vw);
  margin-top: clamp(-2rem, -3.2vw, -0.75rem);
  margin-bottom: clamp(-3rem, -4.3vw, -1.1rem);
  animation: loginOttoBreathe 4.8s ease-in-out infinite;
}

.login-otto img {
  filter: drop-shadow(0 0.75rem 0.75rem rgba(50, 28, 12, 0.34));
  user-select: none;
}

.login-board-form {
  display: grid;
  gap: clamp(0.7rem, 1.4vw, 1rem);
  align-self: center;
}

.login-board-fields {
  display: grid;
  gap: 0.35rem;
  text-align: center;
}

.login-kicker {
  margin: 0;
  color: #5a3117;
  font-family: "Luckiest Guy", var(--app-font);
  font-size: clamp(2rem, 4.1vw, 3.5rem);
  line-height: 0.95;
  text-shadow: 0 0.08rem 0 rgba(255, 240, 199, 0.8);
}

.login-board-fields h1 {
  margin: 0;
  color: #3a2413;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 900;
  line-height: 1.2;
}

.login-field-group {
  display: grid;
  gap: 0.38rem;
}

.login-field-group label {
  margin: 0;
  color: #24150b;
  font-size: clamp(0.92rem, 1.25vw, 1.08rem);
  font-weight: 900;
  line-height: 1.1;
}

.login-input-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: clamp(3.1rem, 5vw, 3.85rem);
  border: 0.12rem solid rgba(88, 53, 25, 0.64);
  border-radius: 0.5rem;
  background: rgba(255, 239, 205, 0.72);
  box-shadow:
    inset 0 0.16rem 0.3rem rgba(79, 44, 18, 0.12),
    0 0.1rem 0 rgba(255, 247, 222, 0.36);
  overflow: hidden;
}

.login-input-icon {
  display: grid;
  place-items: center;
  width: clamp(2.7rem, 4.6vw, 3.45rem);
  height: 100%;
  color: #7a542e;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 900;
}

.login-field-group .form-control {
  width: 100%;
  min-height: inherit;
  border: 0;
  border-radius: 0;
  padding: 0 clamp(0.85rem, 1.5vw, 1.15rem) 0 0;
  background: transparent;
  color: #25170c;
  box-shadow: none;
  font-size: clamp(1rem, 1.55vw, 1.25rem);
  font-weight: 750;
}

.login-field-group .form-control::placeholder {
  color: rgba(68, 44, 26, 0.62);
}

.login-input-shell:focus-within {
  border-color: #d98710;
  background: rgba(255, 246, 222, 0.9);
  box-shadow:
    0 0 0 0.2rem rgba(255, 191, 42, 0.32),
    inset 0 0.16rem 0.3rem rgba(79, 44, 18, 0.12);
}

.login-field-group .form-control:focus {
  box-shadow: none;
}

.login-validation {
  margin: 0;
  color: #8d1f10;
  font-size: 0.92rem;
  font-weight: 850;
}

.login-primary-button {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-self: center;
  min-width: min(22rem, 88%);
  min-height: clamp(3.2rem, 5.2vw, 4rem);
  border: 0.13rem solid #6b3504;
  border-radius: 0.45rem;
  padding: 0 clamp(1.25rem, 2.2vw, 1.8rem);
  background:
    linear-gradient(180deg, #ffd751 0%, #ffb21a 48%, #e88709 100%);
  color: #231306;
  box-shadow:
    inset 0 0.14rem 0 rgba(255, 248, 172, 0.82),
    inset 0 -0.18rem 0 rgba(137, 68, 0, 0.34),
    0 0.32rem 0 rgba(82, 41, 5, 0.82),
    0 0.55rem 0.55rem rgba(65, 32, 8, 0.28);
  font-size: clamp(1.15rem, 2.15vw, 1.65rem);
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 130ms ease, filter 130ms ease, box-shadow 130ms ease;
}

.login-primary-button::after {
  content: ">";
  margin-left: 1.2rem;
  font-size: 1.2em;
  line-height: 1;
}

.login-primary-button:hover,
.login-primary-button:focus-visible {
  filter: brightness(1.05) saturate(1.05);
  transform: translateY(-0.04rem);
}

.login-primary-button:active {
  box-shadow:
    inset 0 0.1rem 0 rgba(255, 248, 172, 0.68),
    inset 0 -0.1rem 0 rgba(137, 68, 0, 0.26),
    0 0.16rem 0 rgba(82, 41, 5, 0.82);
  transform: translateY(0.13rem);
}

.login-teacher-link {
  justify-self: center;
  color: #72431e;
  font-size: clamp(0.9rem, 1.35vw, 1.05rem);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

.login-teacher-link:hover,
.login-teacher-link:focus-visible {
  color: #3e230f;
}

.login-feature-strip {
  z-index: 3;
  width: min(61rem, 86vw);
  justify-self: center;
  filter: drop-shadow(0 0.65rem 0.65rem rgba(0, 0, 0, 0.5));
}

.teacher-login-placeholder {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1.5rem;
}

.teacher-login-panel {
  width: min(32rem, 100%);
  border: 0.1rem solid rgba(255, 228, 150, 0.38);
  border-radius: 0.5rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: rgba(28, 18, 10, 0.82);
  color: #fff1d0;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.44);
  text-align: center;
}

.teacher-login-panel h1 {
  margin: 0 0 0.75rem;
  color: #ffd565;
  font-family: "Luckiest Guy", var(--app-font);
}

.teacher-login-return {
  display: inline-block;
  margin-top: 0.75rem;
  color: #ffd565;
  font-weight: 850;
}

@keyframes loginOttoBreathe {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-0.35rem) scale(1.01);
  }
}

@media (max-width: 900px) {
  .login-brand {
    width: min(36rem, 88vw);
  }

  .login-parchment-middle {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: auto;
    padding: 0 clamp(2.3rem, 8vw, 4rem);
  }

  .login-otto {
    width: min(13rem, 40vw);
    margin-top: -0.75rem;
    margin-bottom: -1.65rem;
  }

  .login-board-form {
    width: min(28rem, 100%);
  }
}

@media (max-width: 620px) {
  .beaver-login-screen {
    gap: 0.2rem;
    padding: 0.55rem 0.35rem 0.8rem;
  }

  .login-brand {
    width: min(28rem, 94vw);
  }

  .login-parchment-panel {
    width: min(34rem, 100vw);
  }

  .login-parchment-middle {
    padding: 0 clamp(1.55rem, 7.5vw, 2.35rem);
  }

  .login-kicker {
    font-size: clamp(1.7rem, 9vw, 2.4rem);
  }

  .login-primary-button {
    min-width: min(18rem, 92%);
  }

  .login-feature-strip {
    width: min(31rem, 94vw);
  }
}

/* Production student experience screens */
body:has(.student-dashboard-screen),
body:has(.signed-out-screen) {
  min-height: 100vh;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.3)),
    url("../UI/beaver_shell/images/background.png") center / cover fixed no-repeat,
    #071815;
}

body:has(.student-dashboard-screen) header,
body:has(.student-dashboard-screen) .app-footer,
body:has(.signed-out-screen) header,
body:has(.signed-out-screen) .app-footer {
  display: none;
}

body:has(.student-dashboard-screen) .app-shell,
body:has(.signed-out-screen) .app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
}

body:has(.student-dashboard-screen) main,
body:has(.signed-out-screen) main {
  width: 100%;
  min-height: 100vh;
  padding: 0 !important;
}

.beaver-login-screen,
.beaver-login-screen input,
.beaver-login-screen button,
.student-dashboard-screen,
.signed-out-screen {
  font-family: "Segoe UI", Arial, sans-serif;
}

.login-parchment-bottom,
.student-parchment-bottom {
  margin-top: -1px;
}

.login-otto {
  display: grid;
  place-items: center;
  width: min(12rem, 17vw);
  margin: 0;
}

/* New build refinements: login seam, dashboard carousel, and student game page */
.login-parchment-bottom {
  margin-top: -4px;
}

.student-parchment-bottom {
  margin-top: -4px;
}

.student-level-shield {
  position: relative;
  display: grid;
  width: 3.55rem;
  height: 3.55rem;
  place-items: center;
  flex: 0 0 auto;
}

.student-level-shield img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0.18rem 0.16rem rgba(0, 0, 0, 0.3));
}

.student-level-shield::before {
  content: "";
  position: absolute;
  inset: 18% 21% 22%;
  z-index: 0;
  border-radius: 0.45rem 0.45rem 55% 55%;
  background: var(--shield-colour, #1e77a8);
  opacity: 0.88;
  mix-blend-mode: multiply;
}

.student-level-shield span {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 0.08rem;
  color: #fff8d8;
  font-size: 1.32rem;
  font-weight: 1000;
  line-height: 1;
  text-shadow:
    0 0.08rem 0.08rem rgba(0, 0, 0, 0.72),
    0 0 0.32rem rgba(32, 16, 4, 0.7);
}

.student-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.student-section-heading h2 {
  margin: 0;
}

.student-carousel-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 5.1rem;
  justify-content: flex-end;
}

.student-carousel-button {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 0.11rem solid #6b3504;
  border-radius: 0.45rem;
  background: linear-gradient(180deg, #ffd751 0%, #ffb21a 48%, #e88709 100%);
  color: #231306;
  box-shadow:
    inset 0 0.11rem 0 rgba(255, 248, 172, 0.82),
    0 0.18rem 0 rgba(82, 41, 5, 0.74);
  font-size: 1.25rem;
  font-weight: 1000;
  line-height: 1;
  cursor: pointer;
}

.student-carousel-button[hidden] {
  display: none;
}

.student-region-window {
  overflow: hidden;
}

.student-region-track {
  --region-gap: clamp(0.75rem, 1.4vw, 1.05rem);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--region-gap) * 2)) / 3);
  gap: var(--region-gap);
  transition: transform 420ms cubic-bezier(0.2, 0.78, 0.22, 1);
  will-change: transform;
}

.student-region-track .student-region-card,
.student-region-track .student-region-placeholder {
  width: 100%;
}

.student-region-continue,
.student-region-replay {
  position: absolute;
  left: 50%;
  bottom: 0.65rem;
  display: inline-grid;
  min-width: min(58%, 10rem);
  min-height: 2.4rem;
  place-items: center;
  border: 0.11rem solid #6b3504;
  border-radius: 0.45rem;
  padding: 0 1rem;
  background: linear-gradient(180deg, #ffd751 0%, #ffb21a 48%, #e88709 100%);
  color: #231306;
  box-shadow:
    inset 0 0.12rem 0 rgba(255, 248, 172, 0.82),
    inset 0 -0.12rem 0 rgba(137, 68, 0, 0.3),
    0 0.22rem 0 rgba(82, 41, 5, 0.82);
  font-size: clamp(0.9rem, 1.15vw, 1.05rem);
  font-weight: 1000;
  line-height: 1;
  text-decoration: none;
  transform: translateX(-50%);
}

.student-region-replay {
  min-width: min(64%, 11rem);
  min-height: 2.28rem;
  bottom: 0.55rem;
  font-size: clamp(0.78rem, 1vw, 0.95rem);
}

.student-region-card .student-completed-ribbon:has(+ .student-region-replay) {
  bottom: 3.2rem;
  width: min(52%, 9rem);
}

.student-region-continue:hover,
.student-region-continue:focus-visible,
.student-region-replay:hover,
.student-region-replay:focus-visible {
  color: #231306;
  filter: brightness(1.06);
}

body:has(.student-game-screen) {
  min-height: 100vh;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.32)),
    url("../UI/beaver_shell/images/background.png") center / cover fixed no-repeat,
    #071815;
}

body:has(.student-game-screen) header:not(.student-game-header),
body:has(.student-game-screen) .app-footer {
  display: none;
}

body:has(.student-game-screen) .app-shell,
body:has(.student-game-screen) main {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0 !important;
}

.student-game-screen,
.student-game-screen input,
.student-game-screen select,
.student-game-screen button {
  font-family: "Segoe UI", Arial, sans-serif;
}

.student-game-screen {
  min-height: 100vh;
  padding: clamp(0.65rem, 1.6vw, 1.2rem);
  color: #25170c;
}

.student-game-header {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 5.5rem;
}

.student-game-banner {
  display: block;
  width: min(40rem, 68vw);
  filter: drop-shadow(0 0.55rem 0.5rem rgba(0, 0, 0, 0.55));
}

.student-game-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.student-game-nav {
  position: absolute;
  top: clamp(0.8rem, 1.6vw, 1.4rem);
  right: clamp(0.8rem, 1.8vw, 1.6rem);
  z-index: 30;
  display: flex;
  gap: 0.55rem;
}

.student-game-subtle-button,
.student-game-signout {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0.42rem;
  border: 0.08rem solid rgba(255, 238, 196, 0.38);
  border-radius: 0.5rem;
  padding: 0.55rem 0.8rem;
  background: rgba(27, 18, 12, 0.58);
  color: #fff1d0;
  box-shadow: 0 0.4rem 0.65rem rgba(0, 0, 0, 0.28);
  font-size: 0.92rem;
  font-weight: 850;
  text-decoration: none;
  backdrop-filter: blur(4px);
}

.student-game-subtle-button:hover,
.student-game-subtle-button:focus-visible,
.student-game-signout:hover,
.student-game-signout:focus-visible {
  background: rgba(27, 18, 12, 0.78);
  color: #fff8e3;
}

.student-game-signout span {
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 238, 196, 0.18);
}

.student-game-stage {
  display: grid;
  justify-items: center;
}

.student-game-parchment {
  display: flex;
  flex-direction: column;
  width: min(104rem, 96vw);
  filter: drop-shadow(0 1rem 1.1rem rgba(0, 0, 0, 0.44));
}

.student-game-middle {
  display: grid;
  gap: 0.8rem;
  min-height: calc(100vh - 12rem);
  padding: 0 clamp(3.3rem, 5.8vw, 5.4rem) clamp(0.8rem, 1.6vw, 1.2rem);
  background: url("../UI/beaver_shell/images/middleParchment.png") top center / 100% auto repeat-y;
}

.student-game-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.student-game-title span {
  color: #69401c;
  font-size: 0.85rem;
  font-weight: 950;
  text-transform: uppercase;
}

.student-game-title h1 {
  margin: 0;
  color: #2b180a;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 1000;
  line-height: 1;
}

.student-game-error {
  border: 0.1rem solid rgba(100, 43, 22, 0.42);
  border-radius: 0.5rem;
  padding: 1rem;
  background: rgba(255, 241, 218, 0.74);
  color: #7f2111;
  font-weight: 900;
}

.student-game-player.beaver-player-root .player-shell {
  display: grid;
  grid-template-columns: minmax(20rem, 38fr) minmax(30rem, 62fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
}

.student-game-player.beaver-player-root .player-toolbar {
  position: static;
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.82rem 1rem;
  border: 0.12rem solid rgba(255, 210, 116, 0.34);
  border-radius: 0.48rem;
  background:
    linear-gradient(90deg, rgba(255, 215, 96, 0.2), transparent 26%, transparent 74%, rgba(255, 215, 96, 0.14)),
    linear-gradient(180deg, rgba(113, 66, 24, 0.92), rgba(63, 35, 13, 0.94)),
    #5d3615;
  box-shadow:
    inset 0 0.12rem 0 rgba(255, 231, 160, 0.22),
    0 0.35rem 0 rgba(38, 20, 7, 0.55);
}

.student-game-player.beaver-player-root .player-toolbar .eyebrow {
  display: block;
  margin: 0 0 0.1rem;
  color: #ffd25c;
  font-size: 0.82rem;
  font-weight: 1000;
  letter-spacing: 0;
  text-shadow: 0 0.1rem 0 rgba(31, 16, 5, 0.8);
}

.student-game-player.beaver-player-root .player-toolbar h2 {
  margin: 0;
  color: #fff4cf;
  font-size: clamp(1.55rem, 2.5vw, 2.45rem);
  font-weight: 1000;
  line-height: 0.95;
  text-shadow:
    0 0.12rem 0 #2b1505,
    0 0.18rem 0.18rem rgba(0, 0, 0, 0.42);
}

.student-game-player.beaver-player-root .topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.student-game-player.beaver-player-root .topbar-actions select,
.student-game-player.beaver-player-root .topbar-actions .btn {
  min-height: 2.35rem;
  font-size: 0.9rem;
}

.student-game-player.beaver-player-root .program-steps-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 2.35rem;
  border: 0.08rem solid rgba(255, 222, 145, 0.36);
  border-radius: 0.42rem;
  padding: 0 0.62rem;
  background: rgba(36, 19, 7, 0.34);
  color: #fff2cf;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.student-game-player.beaver-player-root .program-steps-toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: #f4b429;
}

.student-game-player.beaver-player-root .btn.primary,
.student-game-player.beaver-player-root .btn.secondary {
  border: 0.1rem solid #6b3504;
  background: linear-gradient(180deg, #ffd751 0%, #ffb21a 48%, #e88709 100%);
  color: #231306;
  box-shadow:
    inset 0 0.1rem 0 rgba(255, 248, 172, 0.82),
    0 0.18rem 0 rgba(82, 41, 5, 0.72);
}

.student-game-player.beaver-player-root .code-tray,
.student-game-player.beaver-player-root .game-pane {
  min-height: 0;
  align-self: stretch;
}

.student-game-player.beaver-player-root .code-tray {
  grid-column: 1;
  grid-row: 3;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.42rem;
  overflow: visible;
  background: rgba(255, 247, 224, 0.78);
}

.student-game-player.beaver-player-root .mission-panel {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  gap: .55rem;
  align-self: start;
  padding: .7rem .8rem;
  border: 0.1rem solid rgba(82, 51, 27, 0.24);
  border-radius: .5rem;
  background: rgba(255, 247, 224, 0.9);
  color: #3b2a14;
}

.student-game-player.beaver-player-root .mission-panel[hidden] {
  display: none;
}

.student-game-player.beaver-player-root .mission-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
}

.student-game-player.beaver-player-root .mission-head span {
  color: #75634a;
  font-size: .78rem;
  font-weight: 850;
}

.student-game-player.beaver-player-root .mission-panel ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.student-game-player.beaver-player-root .mission-panel li {
  display: grid;
  grid-template-columns: 1.55rem 1fr;
  gap: .45rem;
  align-items: center;
  min-height: 2.25rem;
  padding: .42rem .5rem;
  border-radius: .42rem;
  background: rgba(255, 255, 255, .68);
  font-size: .9rem;
}

.student-game-player.beaver-player-root .mission-panel li span {
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #f5b83d;
  color: #2d1d09;
  font-size: .78rem;
  font-weight: 900;
}

.student-game-player.beaver-player-root .mission-panel li.complete {
  color: #1f6d3d;
  background: rgba(224, 252, 231, .9);
}

.student-game-player.beaver-player-root .mission-panel li.complete span {
  background: #2f9e55;
  color: #fff;
}

.student-game-player.beaver-player-root .level-hints {
  grid-column: 1;
  grid-row: 4;
  align-self: start;
}

.student-game-player.beaver-player-root .code-tray-header,
.student-game-player.beaver-player-root .game-status-strip {
  min-height: 3.65rem;
}

.student-game-player.beaver-player-root .game-pane {
  grid-column: 2;
  grid-row: 2 / span 3;
  position: relative;
  grid-template-rows: auto auto minmax(4rem, 1fr);
  overflow: hidden;
  border: 0.1rem solid rgba(82, 51, 27, 0.28);
  border-radius: 0.5rem;
  padding: 0.65rem;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 222, 141, 0.22), transparent 13rem),
    linear-gradient(180deg, rgba(255, 241, 207, 0.82), rgba(127, 78, 35, 0.34)),
    url("../UI/beaver_shell/images/middleParchment.png") top center / 100% auto repeat-y;
  box-shadow: 0 1rem 2rem rgba(23, 32, 51, 0.08);
}

.student-game-player.beaver-player-root .game-pane::after {
  content: "";
  display: block;
  min-height: 4rem;
  border: 0.12rem solid rgba(64, 35, 13, 0.42);
  border-radius: 0 0 0.45rem 0.45rem;
  border-top: 0;
  background:
    linear-gradient(90deg, rgba(52, 26, 7, 0.22), transparent 14%, transparent 86%, rgba(52, 26, 7, 0.22)),
    repeating-linear-gradient(0deg, rgba(69, 39, 15, 0.18) 0 0.18rem, rgba(244, 198, 119, 0.16) 0.18rem 0.36rem),
    linear-gradient(180deg, #8f541f, #4a260b);
  box-shadow:
    inset 0 0.12rem 0 rgba(255, 221, 145, 0.32),
    inset 0 -0.18rem 0 rgba(35, 17, 5, 0.28);
}

.student-game-player.beaver-player-root .blockly-pane {
  grid-template-rows: minmax(21rem, 1fr) auto;
}

.student-game-player.beaver-player-root .code-mode-switch {
  display: inline-flex;
  gap: 0.25rem;
  width: max-content;
  margin: 0.45rem 0 0.65rem;
  padding: 0.22rem;
  border: 1px solid rgba(86, 52, 24, 0.24);
  border-radius: 0.45rem;
  background: rgba(255, 248, 226, 0.78);
}

.student-game-player.beaver-player-root .code-mode-switch button {
  border: 0;
  border-radius: 0.34rem;
  padding: 0.42rem 0.72rem;
  color: #3d2b1d;
  background: transparent;
  font-weight: 850;
}

.student-game-player.beaver-player-root .code-mode-switch button.active {
  color: #fff;
  background: #1b5f3b;
}

.student-game-player.beaver-player-root .blockly-host {
  min-height: 21rem;
}

.student-game-player.beaver-player-root .python-host {
  display: grid;
  gap: 0.65rem;
  min-height: 21rem;
}

.student-game-player.beaver-player-root .python-host[hidden] {
  display: none;
}

.student-game-player.beaver-player-root .python-host textarea {
  width: 100%;
  min-height: 21rem;
  border: 0.14rem solid rgba(36, 20, 9, 0.5);
  border-radius: 0.45rem;
  padding: 0.85rem;
  color: #102820;
  background: rgba(255, 252, 240, 0.95);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.96rem;
  line-height: 1.45;
  resize: vertical;
}

.student-game-player.beaver-player-root .python-host p {
  margin: 0;
  color: #5f5446;
  font-weight: 750;
}

.student-game-player.beaver-player-root .game-host {
  align-self: start;
  width: 100%;
  min-height: 21rem;
  border: 0.16rem solid rgba(36, 20, 9, 0.84);
  background: #102c2a;
}

.student-game-player.beaver-player-root .status-panel {
  grid-column: 1 / -1;
}

.student-game-player.beaver-player-root .player-shell.code-collapsed {
  grid-template-columns: 1fr;
}

.student-game-player.beaver-player-root .player-shell.code-collapsed .game-pane {
  grid-column: 1;
  grid-row: 3;
}

@media (max-width: 900px) {
  .student-region-track {
    grid-auto-columns: 100%;
  }

  .student-level-shield {
    width: 3.2rem;
    height: 3.2rem;
  }

  .student-game-player.beaver-player-root .player-shell {
    grid-template-columns: 1fr;
  }

  .student-game-player.beaver-player-root .code-tray,
  .student-game-player.beaver-player-root .mission-panel,
  .student-game-player.beaver-player-root .game-pane {
    grid-column: 1;
  }

  .student-game-player.beaver-player-root .mission-panel {
    grid-row: 2;
  }

  .student-game-player.beaver-player-root .code-tray {
    grid-row: 3;
  }

  .student-game-player.beaver-player-root .game-pane {
    grid-row: 4;
  }

  .student-game-player.beaver-player-root .level-hints {
    grid-row: 5;
  }

  .student-game-title {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .student-game-screen {
    padding: 0.55rem 0.35rem 0.8rem;
  }

  .student-game-banner {
    width: min(28rem, 82vw);
  }

  .student-game-nav {
    position: absolute;
    top: 0.7rem;
    right: 0.55rem;
  }

  .student-game-subtle-button {
    display: none;
  }

  .student-game-parchment {
    width: min(34rem, 100vw);
  }

  .student-game-middle {
    padding: 0 clamp(1.55rem, 7.5vw, 2.35rem) 0.8rem;
  }
}

/* Student level select */
body:has(.student-level-select-screen) {
  min-height: 100vh;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.35)),
    url("../UI/beaver_shell/images/background.png") center / cover fixed no-repeat,
    #071815;
}

body:has(.student-level-select-screen) header:not(.student-level-select-header),
body:has(.student-level-select-screen) .app-footer {
  display: none;
}

* {
  scrollbar-color: #9a6429 #f2d39b;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 0.82rem;
  height: 0.82rem;
}

*::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #f2d39b;
}

*::-webkit-scrollbar-thumb {
  border: 0.16rem solid #f2d39b;
  border-radius: 999px;
  background: linear-gradient(180deg, #b87832, #6d3f18);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #cf913f, #7d481c);
}

body:has(.student-level-select-screen) .app-shell,
body:has(.student-level-select-screen) main {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0 !important;
}

.student-level-select-screen,
.student-level-select-screen button,
.student-level-select-screen input {
  font-family: "Segoe UI", Arial, sans-serif;
}

.student-level-select-screen {
  position: relative;
  min-height: 100vh;
  padding: clamp(0.7rem, 1.6vw, 1.25rem);
  color: #25170c;
  overflow-x: clip;
}

.student-level-select-header {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 1rem;
  width: min(82rem, 98vw);
  margin: 0 auto clamp(-0.5rem, -0.8vw, -0.2rem);
}

.student-level-select-banner {
  grid-column: 1;
  width: min(40rem, 68vw);
  height: auto;
  filter: drop-shadow(0 0.55rem 0.5rem rgba(0, 0, 0, 0.55));
}

.student-level-select-title {
  grid-column: 1;
  min-width: min(24rem, 52vw);
  border: 0.12rem solid rgba(52, 26, 7, 0.92);
  border-radius: 0.5rem;
  padding: clamp(0.55rem, 1.1vw, 0.8rem) clamp(1.6rem, 3vw, 2.7rem);
  background:
    linear-gradient(90deg, rgba(33, 18, 7, 0.24), transparent 14%, transparent 86%, rgba(33, 18, 7, 0.24)),
    linear-gradient(180deg, #9b5a1d, #5c310f 48%, #3d200a 100%);
  color: #fff8e3;
  box-shadow:
    inset 0 0.12rem 0 rgba(255, 213, 119, 0.28),
    inset 0 -0.18rem 0 rgba(34, 17, 5, 0.44),
    0 0.5rem 0.65rem rgba(0, 0, 0, 0.38);
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 0.08rem 0 #241306,
    0 0.18rem 0.18rem rgba(0, 0, 0, 0.58);
}

.student-level-coin-total {
  position: absolute;
  top: 0.6rem;
  right: clamp(0.5rem, 2vw, 1rem);
  grid-column: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  border: 0.08rem solid rgba(255, 238, 196, 0.38);
  border-radius: 999px;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  background: rgba(27, 18, 12, 0.62);
  color: #ffe48a;
  box-shadow: 0 0.4rem 0.65rem rgba(0, 0, 0, 0.28);
}

.student-level-coin-total img {
  width: 2rem;
  height: 2rem;
}

.student-level-coin-total strong {
  font-size: 1rem;
  font-weight: 950;
}

.student-level-select-stage {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(82rem, 98vw);
  margin: 0 auto;
}

.student-level-select-otto {
  position: absolute;
  left: max(0.2rem, 1.4vw);
  bottom: clamp(7rem, 15vh, 10rem);
  z-index: 5;
  width: min(14rem, 15vw);
  height: auto;
  filter: drop-shadow(0 0.8rem 0.8rem rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.student-level-parchment {
  display: flex;
  flex-direction: column;
  width: min(63rem, 78vw);
  margin-left: clamp(5rem, 10vw, 9rem);
  filter: drop-shadow(0 1rem 1.1rem rgba(0, 0, 0, 0.44));
}

.student-level-middle {
  display: grid;
  gap: clamp(0.65rem, 1.1vw, 0.95rem);
  min-height: calc(100vh - 15rem);
  padding: 0 clamp(2.5rem, 4.5vw, 4rem) clamp(0.65rem, 1.4vw, 1rem);
  background: url("../UI/beaver_shell/images/middleParchment.png") top center / 100% auto repeat-y;
}

.student-level-region-heading {
  display: grid;
  grid-template-columns: minmax(10rem, 18rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.2rem);
}

.student-level-region-heading img {
  width: 100%;
  aspect-ratio: 16 / 8.2;
  border: 0.12rem solid rgba(44, 25, 10, 0.78);
  border-radius: 0.65rem;
  object-fit: cover;
  box-shadow: 0 0.45rem 0.55rem rgba(59, 32, 12, 0.28);
}

.student-level-region-heading h1 {
  margin: 0;
  color: #1f1309;
  font-size: clamp(2.4rem, 5vw, 4.1rem);
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
}

.student-level-list {
  display: grid;
  gap: 0.55rem;
  max-height: clamp(25rem, 54vh, 34rem);
  overflow: auto;
  padding-right: 0.25rem;
}

.student-level-row {
  display: grid;
  grid-template-columns: 4.1rem minmax(10rem, 1.15fr) minmax(12rem, 1.15fr) 9.5rem 8.4rem;
  align-items: center;
  gap: clamp(0.6rem, 1.1vw, 1rem);
  border: 0.08rem solid rgba(91, 56, 26, 0.38);
  border-radius: 0.55rem;
  padding: clamp(0.55rem, 1vw, 0.8rem);
  background: rgba(255, 240, 207, 0.58);
  box-shadow: inset 0 0.08rem 0 rgba(255, 252, 236, 0.5);
}

.student-level-row.is-locked {
  background: rgba(240, 224, 194, 0.42);
}

.student-level-number {
  color: #201208;
  font-size: clamp(2.3rem, 4vw, 3.25rem);
  font-weight: 1000;
  line-height: 1;
  text-align: center;
}

.student-level-name h2 {
  margin: 0;
  color: #25170c;
  font-size: clamp(1.15rem, 1.8vw, 1.65rem);
  font-weight: 1000;
  line-height: 1.05;
  text-transform: uppercase;
}

.student-level-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
  font-size: clamp(0.78rem, 1.05vw, 0.94rem);
  font-weight: 950;
  text-transform: uppercase;
}

.student-level-status i {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 0.08rem solid rgba(35, 24, 13, 0.68);
  border-radius: 999px;
}

.student-level-status.completed {
  color: #0f6e24;
}

.student-level-status.completed i {
  position: relative;
  border-color: #0f6e24;
  background: #22a83b;
}

.student-level-status.completed i::after {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.18rem;
  width: 0.45rem;
  height: 0.68rem;
  border: solid #fff8dd;
  border-width: 0 0.14rem 0.14rem 0;
  transform: rotate(42deg);
}

.student-level-status.attempted {
  color: #9c6416;
}

.student-level-status.attempted i {
  background: #ffba1e;
}

.student-level-status.not-attempted,
.student-level-status.locked {
  color: #686866;
}

.student-level-status.not-attempted i,
.student-level-status.locked i {
  background: #c5c6bd;
}

.student-level-row p {
  margin: 0;
  color: #201208;
  font-size: clamp(0.9rem, 1.25vw, 1rem);
  font-weight: 650;
  line-height: 1.25;
}

.student-level-score {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  justify-self: stretch;
  justify-content: start;
  white-space: nowrap;
}

.student-level-score img {
  width: clamp(2.2rem, 3.2vw, 3rem);
  height: clamp(2.2rem, 3.2vw, 3rem);
  object-fit: contain;
}

.student-level-score strong {
  color: #25170c;
  font-size: clamp(1.1rem, 1.65vw, 1.45rem);
  font-weight: 950;
}

.student-level-play-button,
.student-level-locked-button,
.student-level-icon-button {
  display: inline-grid;
  place-items: center;
  border-radius: 0.45rem;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
}

.student-level-play-button,
.student-level-locked-button {
  min-height: 3rem;
  width: 8.4rem;
  min-width: 8.4rem;
  border: 0.12rem solid #6b3504;
  padding: 0 1rem;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.student-level-play-button {
  background: linear-gradient(180deg, #ffd751 0%, #ffb21a 48%, #e88709 100%);
  color: #231306;
  box-shadow:
    inset 0 0.12rem 0 rgba(255, 248, 172, 0.82),
    inset 0 -0.12rem 0 rgba(137, 68, 0, 0.3),
    0 0.22rem 0 rgba(82, 41, 5, 0.82);
}

.student-level-play-button:hover,
.student-level-play-button:focus-visible {
  color: #231306;
  filter: brightness(1.06);
}

.student-level-locked-button {
  grid-template-columns: auto auto;
  gap: 0.35rem;
  border-color: #6e6a62;
  background: linear-gradient(180deg, #d7d1c5, #928b80);
  color: #2b2925;
  box-shadow: inset 0 0.1rem 0 rgba(255, 255, 255, 0.42);
}

.student-level-locked-button img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

.student-level-nav {
  position: absolute;
  right: clamp(0.9rem, 2vw, 1.6rem);
  bottom: clamp(0.35rem, 1vw, 0.8rem);
  z-index: 10;
  display: flex;
  gap: 0.65rem;
}

.student-level-icon-button {
  width: clamp(3.5rem, 5vw, 4.2rem);
  height: clamp(3.5rem, 5vw, 4.2rem);
  border: 0.12rem solid #6b3504;
  background: linear-gradient(180deg, #ffd751 0%, #ffb21a 48%, #e88709 100%);
  box-shadow:
    inset 0 0.12rem 0 rgba(255, 248, 172, 0.82),
    0 0.25rem 0 rgba(82, 41, 5, 0.82);
}

.student-level-icon-button img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}

@media (max-width: 1000px) {
  .student-level-select-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .student-level-select-banner,
  .student-level-select-title,
  .student-level-coin-total {
    grid-column: 1;
  }

  .student-level-select-banner {
    width: min(38rem, 82vw);
  }

  .student-level-coin-total {
    position: absolute;
    right: 0.5rem;
    top: 0.2rem;
  }

  .student-level-parchment {
    width: min(69rem, 96vw);
    margin-left: 0;
  }

  .student-level-select-otto {
    display: none;
  }
}

@media (max-width: 760px) {
  .student-level-row {
    grid-template-columns: 3.2rem minmax(0, 1fr) auto;
  }

  .student-level-row p,
  .student-level-score {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .student-level-play-button,
  .student-level-locked-button {
    grid-column: 2 / -1;
    justify-self: stretch;
  }

  .student-level-region-heading {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .student-level-select-screen {
    padding: 0.55rem 0.35rem 0.8rem;
  }

  .student-level-select-title {
    min-width: min(25rem, 86vw);
    font-size: clamp(1.8rem, 10vw, 2.8rem);
  }

  .student-level-parchment {
    width: min(34rem, 100vw);
  }

  .student-level-middle {
    padding: 0 clamp(1.55rem, 7.5vw, 2.35rem) 0.8rem;
  }

  .student-level-nav {
    position: static;
    justify-content: center;
    margin-top: 0.7rem;
  }
}

.login-kicker,
.teacher-login-panel h1,
.signed-out-panel h1 {
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 950;
  letter-spacing: 0;
}

.login-feature-strip {
  width: min(49rem, 69vw);
}

.student-dashboard-screen {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(0.3rem, 1vw, 0.75rem);
  min-height: 100vh;
  padding: clamp(0.65rem, 1.8vw, 1.45rem);
  color: #25170c;
  isolation: isolate;
}

.student-dashboard-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 32%, rgba(255, 218, 98, 0.22), transparent 9rem),
    radial-gradient(circle at 82% 66%, rgba(68, 176, 96, 0.16), transparent 11rem);
  animation: dashboardGlow 8s ease-in-out infinite alternate;
}

.student-dashboard-header {
  display: grid;
  justify-items: center;
}

.student-dashboard-banner {
  width: min(45rem, 76vw);
  height: auto;
  filter: drop-shadow(0 0.55rem 0.5rem rgba(0, 0, 0, 0.55));
}

.student-signout-button {
  position: fixed;
  top: clamp(0.8rem, 1.6vw, 1.4rem);
  right: clamp(0.8rem, 1.8vw, 1.6rem);
  z-index: 20;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0.45rem;
  border: 0.08rem solid rgba(255, 238, 196, 0.38);
  border-radius: 0.5rem;
  padding: 0.55rem 0.8rem;
  background: rgba(27, 18, 12, 0.58);
  color: #fff1d0;
  box-shadow: 0 0.4rem 0.65rem rgba(0, 0, 0, 0.28);
  font-size: 0.95rem;
  font-weight: 850;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition: background 150ms ease, transform 150ms ease;
}

.student-signout-button span {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(255, 238, 196, 0.18);
}

.student-signout-button:hover,
.student-signout-button:focus-visible {
  background: rgba(27, 18, 12, 0.78);
  color: #fff8e3;
  transform: translateY(-0.05rem);
}

.student-dashboard-stage {
  display: grid;
  justify-items: center;
}

.student-parchment-panel {
  display: flex;
  flex-direction: column;
  width: min(69rem, 96vw);
  filter: drop-shadow(0 1rem 1.1rem rgba(0, 0, 0, 0.44));
}

.student-parchment-top,
.student-parchment-bottom {
  width: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% auto;
}

.student-parchment-top {
  aspect-ratio: 1508 / 118;
  background-image: url("../UI/beaver_shell/images/topParchment.png");
}

.student-parchment-middle {
  display: grid;
  gap: clamp(0.75rem, 1.4vw, 1.15rem);
  min-height: calc(100vh - 15rem);
  padding: 0 clamp(3rem, 6.5vw, 5.3rem) clamp(0.5rem, 1vw, 0.9rem);
  background: url("../UI/beaver_shell/images/middleParchment.png") top center / 100% auto repeat-y;
}

.student-parchment-bottom {
  aspect-ratio: 1508 / 115;
  background-image: url("../UI/beaver_shell/images/bottomParchment.png");
}

.student-dashboard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.student-yellow-button,
.signed-out-return {
  display: inline-grid;
  place-items: center;
  min-height: 2.75rem;
  border: 0.12rem solid #6b3504;
  border-radius: 0.45rem;
  padding: 0 1.2rem;
  background: linear-gradient(180deg, #ffd751 0%, #ffb21a 48%, #e88709 100%);
  color: #231306;
  box-shadow:
    inset 0 0.12rem 0 rgba(255, 248, 172, 0.82),
    inset 0 -0.14rem 0 rgba(137, 68, 0, 0.3),
    0 0.22rem 0 rgba(82, 41, 5, 0.82);
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  transition: filter 130ms ease, transform 130ms ease;
}

.student-yellow-button:hover,
.student-yellow-button:focus-visible,
.signed-out-return:hover,
.signed-out-return:focus-visible {
  color: #231306;
  filter: brightness(1.06);
  transform: translateY(-0.04rem);
}

.student-welcome {
  text-align: center;
}

.student-welcome h1 {
  margin: 0;
  color: #2b180a;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 950;
  line-height: 1;
}

.student-welcome p {
  margin: 0.25rem 0 0;
  color: #3c2411;
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  font-weight: 850;
}

.student-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
}

.student-stat-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.8rem;
  border: 0.08rem solid rgba(82, 51, 27, 0.36);
  border-radius: 0.5rem;
  padding: 0.8rem 1rem;
  background: rgba(255, 232, 186, 0.33);
  animation: dashboardCardIn 420ms ease both;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.student-stat-card:hover {
  transform: translateY(-0.1rem);
  box-shadow: 0 0.45rem 0.7rem rgba(60, 34, 12, 0.2);
}

.student-stat-card img {
  width: clamp(3.4rem, 5.5vw, 4.8rem);
  height: clamp(3.4rem, 5.5vw, 4.8rem);
  object-fit: contain;
}

.student-stat-copy {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 100%;
  text-align: center;
}

.student-stat-card span {
  color: #1f1309;
  font-size: clamp(0.92rem, 1.2vw, 1.08rem);
  font-weight: 950;
  line-height: 1.15;
}

.stat-number {
  align-self: end;
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 1000;
  line-height: 0.95;
  -webkit-text-stroke: 0.045rem rgba(31, 18, 7, 0.55);
  text-shadow:
    0.04em 0.05em 0 rgba(255, 244, 210, 0.75),
    0.08em 0.1em 0 rgba(77, 43, 13, 0.22);
}

.stat-blue {
  color: #167dc6;
}

.stat-green {
  color: #26a33b;
}

.stat-orange {
  color: #e36b13;
}

.student-progress-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  border: 0.08rem solid rgba(82, 51, 27, 0.38);
  border-radius: 0.5rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 232, 186, 0.28);
}

.student-progress-panel > img {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
}

.student-progress-panel strong,
.student-progress-panel > span {
  color: #25170c;
  font-weight: 950;
}

.student-progress-track {
  height: 1.1rem;
  margin-top: 0.35rem;
  border: 0.08rem solid rgba(59, 39, 20, 0.62);
  border-radius: 999px;
  background: rgba(90, 67, 41, 0.42);
  overflow: hidden;
}

.student-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #3ed13a, #158d17);
  animation: progressFill 900ms ease-out both, progressShine 2.6s ease-in-out infinite;
  background-size: 100% 100%, 3rem 100%;
}

.student-journey-section h2 {
  margin: 0 0 0.5rem;
  color: #25170c;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 950;
}

.student-region-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.4vw, 1.05rem);
}

.student-region-card,
.student-region-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 0.55rem;
  overflow: hidden;
}

.student-region-card {
  border: 0.11rem solid rgba(30, 18, 8, 0.82);
  background: #111;
  box-shadow: 0 0.25rem 0.35rem rgba(60, 34, 12, 0.24);
  animation: dashboardCardIn 420ms ease both;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.student-region-card:hover,
.student-region-card:focus-within {
  box-shadow: 0 0.42rem 0.65rem rgba(60, 34, 12, 0.32);
  transform: translateY(-0.12rem);
}

.student-region-card > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-region-name {
  position: absolute;
  inset: 0 0 auto;
  min-height: 2.25rem;
  display: flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: clamp(0.95rem, 1.35vw, 1.15rem);
  font-weight: 950;
  line-height: 1.1;
  text-shadow: 0 0.08rem 0.12rem rgba(0, 0, 0, 0.75);
}

.student-completed-ribbon {
  position: absolute;
  left: 50%;
  bottom: 0.55rem;
  width: min(58%, 10rem);
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 0.18rem 0.16rem rgba(0, 0, 0, 0.38));
}

.student-region-placeholder {
  border: 0.14rem solid rgba(0, 0, 0, 0.72);
  background: rgba(0, 0, 0, 0.02);
}

.signed-out-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  align-content: center;
  gap: 1rem;
  padding: 1.25rem;
}

.signed-out-banner {
  width: min(42rem, 88vw);
  height: auto;
  filter: drop-shadow(0 0.55rem 0.5rem rgba(0, 0, 0, 0.55));
}

.signed-out-panel {
  display: grid;
  justify-items: center;
  width: min(34rem, 94vw);
  border: 0.1rem solid rgba(255, 228, 150, 0.38);
  border-radius: 0.55rem;
  padding: clamp(1.35rem, 4vw, 2.1rem);
  background: rgba(28, 18, 10, 0.82);
  color: #fff1d0;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.44);
  text-align: center;
}

.signed-out-panel h1 {
  margin: 0;
  color: #fff1d0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.signed-out-panel p {
  margin: 0.4rem 0 1rem;
  color: #ffe6a8;
  font-weight: 800;
}

body:has(.student-badges-screen) {
  min-height: 100vh;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.35)),
    url("../UI/beaver_shell/images/background.png") center / cover fixed no-repeat,
    #071815;
}

body:has(.student-badges-screen) header:not(.student-badges-header),
body:has(.student-badges-screen) .app-footer {
  display: none;
}

body:has(.student-badges-screen) .app-shell,
body:has(.student-badges-screen) main {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0 !important;
}

.student-badges-screen {
  min-height: 100vh;
  padding: clamp(0.65rem, 1.8vw, 1.45rem);
  color: #25170c;
}

.student-badges-header {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
}

.student-badges-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.student-badges-middle {
  align-content: start;
}

.student-badge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.4vw, 1.05rem);
}

.student-badge-card {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  border: 0.08rem solid rgba(82, 51, 27, 0.36);
  border-radius: 0.5rem;
  padding: 1rem;
  background: rgba(255, 232, 186, 0.34);
  text-align: center;
  animation: dashboardCardIn 420ms ease both;
}

.student-badge-card img {
  width: clamp(4.2rem, 7vw, 6.2rem);
  height: clamp(4.2rem, 7vw, 6.2rem);
  object-fit: contain;
  filter: drop-shadow(0 0.32rem 0.25rem rgba(60, 34, 12, 0.28));
}

.student-badge-card.locked img {
  filter: grayscale(0.85) opacity(0.58);
}

.student-badge-card h2 {
  margin: 0;
  color: #25170c;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  font-weight: 1000;
}

.student-badge-card p {
  margin: 0.3rem 0 0.55rem;
  font-weight: 750;
  line-height: 1.25;
}

.student-badge-card span {
  display: inline-grid;
  place-items: center;
  min-height: 1.75rem;
  border-radius: 999px;
  padding: 0 0.8rem;
  background: rgba(30, 118, 42, 0.14);
  color: #176426;
  font-weight: 950;
}

.student-badge-card.locked span {
  background: rgba(95, 84, 72, 0.15);
  color: #615448;
}

.admin-colour-chip {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.4rem;
  border: 0.08rem solid rgba(0, 0, 0, 0.28);
  border-radius: 999px;
  background: var(--chip, #1e77a8);
  vertical-align: middle;
}

@keyframes dashboardCardIn {
  from {
    opacity: 0;
    transform: translateY(0.35rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dashboardGlow {
  from {
    opacity: 0.48;
    transform: translate3d(-0.3rem, 0, 0);
  }
  to {
    opacity: 0.9;
    transform: translate3d(0.3rem, -0.35rem, 0);
  }
}

@keyframes progressFill {
  from {
    width: 0;
  }
}

@keyframes progressShine {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.16);
  }
}

@media (max-width: 900px) {
  .login-otto {
    width: min(8.5rem, 26vw);
    margin: 0;
  }

  .login-feature-strip {
    width: min(39rem, 75vw);
  }

  .student-stats,
  .student-region-grid {
    grid-template-columns: 1fr;
  }

  .student-region-card,
  .student-region-placeholder {
    aspect-ratio: 16 / 8.2;
  }

  .student-progress-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .student-progress-panel > span {
    grid-column: 2;
  }
}

@media (max-width: 620px) {
  .login-otto {
    width: min(7rem, 30vw);
  }

  .login-feature-strip {
    width: min(25rem, 75vw);
  }

  .student-dashboard-screen {
    padding: 0.55rem 0.35rem 0.8rem;
  }

  .student-signout-button {
    position: absolute;
    top: 0.7rem;
    right: 0.55rem;
    padding: 0.45rem 0.62rem;
    font-size: 0.84rem;
  }

  .student-dashboard-banner {
    width: min(28rem, 82vw);
  }

  .student-parchment-panel {
    width: min(34rem, 100vw);
  }

  .student-parchment-middle {
    padding: 0 clamp(1.55rem, 7.5vw, 2.35rem);
  }

  .student-dashboard-actions,
  .student-progress-panel {
    align-items: stretch;
  }

  .student-dashboard-actions {
    flex-direction: column;
  }

  .student-yellow-button {
    width: 100%;
  }
}

/* Region complete celebration */
body:has(.student-region-complete-screen) {
  min-height: 100vh;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.32)),
    url("../UI/beaver_shell/images/background.png") center / cover fixed no-repeat,
    #071815;
}

body:has(.student-region-complete-screen) header:not(.student-region-complete-header),
body:has(.student-region-complete-screen) .app-footer {
  display: none;
}

body:has(.student-region-complete-screen) .app-shell,
body:has(.student-region-complete-screen) main {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0 !important;
}

.student-region-complete-screen {
  position: relative;
  min-height: 100vh;
  padding: clamp(0.65rem, 1.6vw, 1.2rem);
  color: #25170c;
  overflow: hidden auto;
  font-family: "Segoe UI", Arial, sans-serif;
}

.student-region-complete-header {
  position: relative;
  z-index: 8;
  display: grid;
  justify-items: center;
  margin-bottom: clamp(-1.35rem, -2vw, -0.55rem);
}

.student-region-complete-header img {
  display: block;
  width: min(42rem, 74vw);
  height: auto;
  filter: drop-shadow(0 0.55rem 0.5rem rgba(0, 0, 0, 0.55));
}

.student-region-complete-stage {
  position: relative;
  z-index: 4;
  display: grid;
  justify-items: center;
}

.student-region-complete-panel {
  display: flex;
  flex-direction: column;
  width: min(62rem, 95vw);
  filter: drop-shadow(0 1rem 1.1rem rgba(0, 0, 0, 0.44));
}

.student-region-complete-middle {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(0.55rem, 1.1vw, 0.9rem);
  min-height: clamp(36rem, 76vh, 48rem);
  padding: 0 clamp(2.4rem, 5.6vw, 5rem) clamp(0.75rem, 1.6vw, 1.2rem);
  background: url("../UI/beaver_shell/images/middleParchment.png") top center / 100% auto repeat-y;
  text-align: center;
}

.student-region-complete-title,
.student-region-complete-copy h1 {
  border: 0.12rem solid rgba(52, 26, 7, 0.92);
  border-radius: 0.5rem;
  background:
    linear-gradient(90deg, rgba(33, 18, 7, 0.24), transparent 14%, transparent 86%, rgba(33, 18, 7, 0.24)),
    linear-gradient(180deg, #9b5a1d, #5c310f 48%, #3d200a 100%);
  color: #fff8e3;
  box-shadow:
    inset 0 0.12rem 0 rgba(255, 213, 119, 0.28),
    inset 0 -0.18rem 0 rgba(34, 17, 5, 0.44),
    0 0.42rem 0.55rem rgba(0, 0, 0, 0.28);
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
  text-shadow:
    0 0.08rem 0 #241306,
    0 0.18rem 0.18rem rgba(0, 0, 0, 0.58);
}

.student-region-complete-title {
  min-width: min(35rem, 76vw);
  margin-top: clamp(-0.35rem, -0.5vw, -0.15rem);
  padding: clamp(0.55rem, 1vw, 0.78rem) clamp(1.6rem, 3vw, 2.7rem);
  font-size: clamp(2rem, 4.2vw, 3.8rem);
}

.student-region-complete-copy {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
}

.student-region-complete-copy p {
  margin: 0;
  color: #195816;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 1000;
  line-height: 0.95;
  text-transform: uppercase;
  transform: rotate(-3deg);
  text-shadow:
    0 0.08rem 0 rgba(255, 245, 202, 0.9),
    0 0.18rem 0.2rem rgba(50, 30, 9, 0.26);
}

.student-region-complete-copy span {
  color: #24150b;
  font-size: clamp(1.25rem, 2.3vw, 2rem);
  font-weight: 900;
}

.student-region-complete-copy h1 {
  margin: 0;
  min-width: min(34rem, 76vw);
  padding: clamp(0.45rem, 0.8vw, 0.68rem) clamp(1.25rem, 2.8vw, 2.2rem);
  font-size: clamp(2rem, 4.6vw, 4.1rem);
}

.student-region-complete-scene {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(14rem, 21rem) minmax(9rem, 1fr);
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  width: 100%;
}

.student-region-complete-otto {
  display: block;
  width: min(21rem, 28vw);
  max-height: clamp(16rem, 35vh, 25rem);
  object-fit: contain;
  filter: drop-shadow(0 0.85rem 0.75rem rgba(50, 28, 12, 0.34));
  animation: regionCompleteOtto 2.8s ease-in-out infinite;
}

.student-region-complete-note {
  border: 0.1rem solid rgba(87, 51, 23, 0.38);
  border-radius: 0.6rem;
  padding: clamp(0.8rem, 1.8vw, 1.15rem);
  background: rgba(255, 239, 205, 0.7);
  color: #24150b;
  box-shadow: 0 0.32rem 0.45rem rgba(74, 42, 16, 0.18);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 850;
  line-height: 1.35;
}

.student-region-complete-note strong {
  color: #16671b;
  font-weight: 1000;
}

.note-left {
  transform: rotate(-4deg);
}

.note-right {
  transform: rotate(4deg);
}

.student-region-complete-button {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-width: min(30rem, 82vw);
  min-height: clamp(3.2rem, 5.2vw, 4rem);
  border: 0.13rem solid #6b3504;
  border-radius: 0.45rem;
  padding: 0 clamp(1.25rem, 2.2vw, 1.8rem);
  background: linear-gradient(180deg, #ffd751 0%, #ffb21a 48%, #e88709 100%);
  color: #231306;
  box-shadow:
    inset 0 0.14rem 0 rgba(255, 248, 172, 0.82),
    inset 0 -0.18rem 0 rgba(137, 68, 0, 0.34),
    0 0.32rem 0 rgba(82, 41, 5, 0.82),
    0 0.55rem 0.55rem rgba(65, 32, 8, 0.28);
  font-size: clamp(1.15rem, 2.15vw, 1.65rem);
  font-weight: 1000;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.student-region-complete-button:hover,
.student-region-complete-button:focus-visible {
  color: #231306;
  filter: brightness(1.06);
  transform: translateY(-0.04rem);
}

.region-complete-confetti {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.region-complete-confetti i {
  position: absolute;
  top: -1rem;
  left: calc((var(--confetti-index, 1) * 2.1%) - 1rem);
  width: 0.62rem;
  height: 1rem;
  border-radius: 0.12rem;
  background: hsl(calc(var(--confetti-index, 1) * 47), 86%, 56%);
  animation: regionConfettiFall var(--confetti-speed, 5s) linear infinite;
  animation-delay: var(--confetti-delay, 0s);
  transform: rotate(var(--confetti-rotate, 0deg));
  opacity: 0.92;
}

.region-complete-confetti i:nth-child(3n) {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
}

.region-complete-confetti i:nth-child(4n) {
  width: 0.45rem;
  height: 1.25rem;
}

.region-complete-confetti i:nth-child(1) { --confetti-index: 1; --confetti-speed: 5.4s; --confetti-delay: -0.2s; --confetti-rotate: 18deg; }
.region-complete-confetti i:nth-child(2) { --confetti-index: 2; --confetti-speed: 4.8s; --confetti-delay: -3.1s; --confetti-rotate: 90deg; }
.region-complete-confetti i:nth-child(3) { --confetti-index: 3; --confetti-speed: 6.2s; --confetti-delay: -1.6s; --confetti-rotate: 41deg; }
.region-complete-confetti i:nth-child(4) { --confetti-index: 4; --confetti-speed: 5.8s; --confetti-delay: -4.2s; --confetti-rotate: 130deg; }
.region-complete-confetti i:nth-child(5) { --confetti-index: 5; --confetti-speed: 4.9s; --confetti-delay: -2.3s; --confetti-rotate: 61deg; }
.region-complete-confetti i:nth-child(6) { --confetti-index: 6; --confetti-speed: 6.6s; --confetti-delay: -5.1s; --confetti-rotate: 170deg; }
.region-complete-confetti i:nth-child(7) { --confetti-index: 7; --confetti-speed: 5.2s; --confetti-delay: -1s; --confetti-rotate: 21deg; }
.region-complete-confetti i:nth-child(8) { --confetti-index: 8; --confetti-speed: 4.6s; --confetti-delay: -3.8s; --confetti-rotate: 112deg; }
.region-complete-confetti i:nth-child(9) { --confetti-index: 9; --confetti-speed: 6.1s; --confetti-delay: -0.8s; --confetti-rotate: 74deg; }
.region-complete-confetti i:nth-child(10) { --confetti-index: 10; --confetti-speed: 5.5s; --confetti-delay: -4.7s; --confetti-rotate: 145deg; }
.region-complete-confetti i:nth-child(11) { --confetti-index: 11; --confetti-speed: 4.7s; --confetti-delay: -2.7s; --confetti-rotate: 31deg; }
.region-complete-confetti i:nth-child(12) { --confetti-index: 12; --confetti-speed: 6.4s; --confetti-delay: -5.5s; --confetti-rotate: 126deg; }
.region-complete-confetti i:nth-child(13) { --confetti-index: 13; --confetti-speed: 5.1s; --confetti-delay: -1.8s; --confetti-rotate: 53deg; }
.region-complete-confetti i:nth-child(14) { --confetti-index: 14; --confetti-speed: 5.9s; --confetti-delay: -3.4s; --confetti-rotate: 160deg; }
.region-complete-confetti i:nth-child(15) { --confetti-index: 15; --confetti-speed: 4.5s; --confetti-delay: -0.4s; --confetti-rotate: 82deg; }
.region-complete-confetti i:nth-child(16) { --confetti-index: 16; --confetti-speed: 6.7s; --confetti-delay: -4.9s; --confetti-rotate: 20deg; }
.region-complete-confetti i:nth-child(17) { --confetti-index: 17; --confetti-speed: 5.7s; --confetti-delay: -2s; --confetti-rotate: 75deg; }
.region-complete-confetti i:nth-child(18) { --confetti-index: 18; --confetti-speed: 4.9s; --confetti-delay: -3.6s; --confetti-rotate: 155deg; }
.region-complete-confetti i:nth-child(19) { --confetti-index: 19; --confetti-speed: 6.2s; --confetti-delay: -1.3s; --confetti-rotate: 45deg; }
.region-complete-confetti i:nth-child(20) { --confetti-index: 20; --confetti-speed: 5.1s; --confetti-delay: -5.2s; --confetti-rotate: 118deg; }
.region-complete-confetti i:nth-child(21) { --confetti-index: 21; --confetti-speed: 6s; --confetti-delay: -2.4s; --confetti-rotate: 9deg; }
.region-complete-confetti i:nth-child(22) { --confetti-index: 22; --confetti-speed: 4.8s; --confetti-delay: -4.4s; --confetti-rotate: 88deg; }
.region-complete-confetti i:nth-child(23) { --confetti-index: 23; --confetti-speed: 6.5s; --confetti-delay: -0.7s; --confetti-rotate: 174deg; }
.region-complete-confetti i:nth-child(24) { --confetti-index: 24; --confetti-speed: 5.3s; --confetti-delay: -3.2s; --confetti-rotate: 64deg; }
.region-complete-confetti i:nth-child(25) { --confetti-index: 25; --confetti-speed: 4.7s; --confetti-delay: -1.9s; --confetti-rotate: 128deg; }
.region-complete-confetti i:nth-child(26) { --confetti-index: 26; --confetti-speed: 6.1s; --confetti-delay: -5.7s; --confetti-rotate: 38deg; }
.region-complete-confetti i:nth-child(27) { --confetti-index: 27; --confetti-speed: 5.6s; --confetti-delay: -2.9s; --confetti-rotate: 101deg; }
.region-complete-confetti i:nth-child(28) { --confetti-index: 28; --confetti-speed: 4.5s; --confetti-delay: -4.8s; --confetti-rotate: 151deg; }
.region-complete-confetti i:nth-child(29) { --confetti-index: 29; --confetti-speed: 6.8s; --confetti-delay: -1.1s; --confetti-rotate: 27deg; }
.region-complete-confetti i:nth-child(30) { --confetti-index: 30; --confetti-speed: 5.4s; --confetti-delay: -3.9s; --confetti-rotate: 77deg; }
.region-complete-confetti i:nth-child(31) { --confetti-index: 31; --confetti-speed: 4.9s; --confetti-delay: -0.5s; --confetti-rotate: 134deg; }
.region-complete-confetti i:nth-child(32) { --confetti-index: 32; --confetti-speed: 6.3s; --confetti-delay: -5.3s; --confetti-rotate: 58deg; }
.region-complete-confetti i:nth-child(33) { --confetti-index: 33; --confetti-speed: 5.8s; --confetti-delay: -2.1s; --confetti-rotate: 119deg; }
.region-complete-confetti i:nth-child(34) { --confetti-index: 34; --confetti-speed: 4.6s; --confetti-delay: -4.1s; --confetti-rotate: 16deg; }
.region-complete-confetti i:nth-child(35) { --confetti-index: 35; --confetti-speed: 6.6s; --confetti-delay: -1.5s; --confetti-rotate: 94deg; }
.region-complete-confetti i:nth-child(36) { --confetti-index: 36; --confetti-speed: 5s; --confetti-delay: -5.8s; --confetti-rotate: 163deg; }
.region-complete-confetti i:nth-child(37) { --confetti-index: 37; --confetti-speed: 6.1s; --confetti-delay: -2.6s; --confetti-rotate: 47deg; }
.region-complete-confetti i:nth-child(38) { --confetti-index: 38; --confetti-speed: 4.8s; --confetti-delay: -3.5s; --confetti-rotate: 109deg; }
.region-complete-confetti i:nth-child(39) { --confetti-index: 39; --confetti-speed: 6.4s; --confetti-delay: -0.9s; --confetti-rotate: 8deg; }
.region-complete-confetti i:nth-child(40) { --confetti-index: 40; --confetti-speed: 5.2s; --confetti-delay: -4.6s; --confetti-rotate: 143deg; }
.region-complete-confetti i:nth-child(41) { --confetti-index: 41; --confetti-speed: 4.7s; --confetti-delay: -2.8s; --confetti-rotate: 69deg; }
.region-complete-confetti i:nth-child(42) { --confetti-index: 42; --confetti-speed: 6.7s; --confetti-delay: -5.4s; --confetti-rotate: 122deg; }
.region-complete-confetti i:nth-child(43) { --confetti-index: 43; --confetti-speed: 5.5s; --confetti-delay: -1.7s; --confetti-rotate: 35deg; }
.region-complete-confetti i:nth-child(44) { --confetti-index: 44; --confetti-speed: 4.9s; --confetti-delay: -3.7s; --confetti-rotate: 179deg; }
.region-complete-confetti i:nth-child(45) { --confetti-index: 45; --confetti-speed: 6.2s; --confetti-delay: -0.3s; --confetti-rotate: 84deg; }
.region-complete-confetti i:nth-child(46) { --confetti-index: 46; --confetti-speed: 5.6s; --confetti-delay: -4.3s; --confetti-rotate: 154deg; }
.region-complete-confetti i:nth-child(47) { --confetti-index: 47; --confetti-speed: 4.6s; --confetti-delay: -2.2s; --confetti-rotate: 24deg; }
.region-complete-confetti i:nth-child(48) { --confetti-index: 48; --confetti-speed: 6.5s; --confetti-delay: -5.6s; --confetti-rotate: 107deg; }

@keyframes regionConfettiFall {
  0% {
    transform: translate3d(-1rem, -4vh, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(1.5rem, 106vh, 0) rotate(540deg);
  }
}

@keyframes regionCompleteOtto {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-0.35rem) scale(1.015);
  }
}

@media (max-width: 900px) {
  .student-region-complete-scene {
    grid-template-columns: 1fr;
  }

  .student-region-complete-otto {
    width: min(18rem, 58vw);
    order: -1;
  }

  .student-region-complete-note {
    transform: none;
  }
}

@media (max-width: 620px) {
  .student-region-complete-screen {
    padding: 0.55rem 0.35rem 0.8rem;
  }

  .student-region-complete-header img {
    width: min(28rem, 90vw);
  }

  .student-region-complete-panel {
    width: min(34rem, 100vw);
  }

  .student-region-complete-middle {
    padding: 0 clamp(1.55rem, 7.5vw, 2.35rem) 0.9rem;
  }

  .student-region-complete-copy p {
    font-size: clamp(2.45rem, 14vw, 3.4rem);
  }
}

/* Student loading and Oops states */
.student-page-loader {
  display: none;
}

.student-loader-boot .student-page-loader,
.student-loader-active .student-page-loader {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.18)),
    url("../UI/beaver_shell/images/background.png") center / cover no-repeat,
    #071815;
  opacity: 1;
  transition: opacity 240ms ease;
}

.student-page-loader.is-finished {
  opacity: 0;
}

.student-loader-card {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  width: min(24rem, 86vw);
  border: 0.1rem solid rgba(255, 226, 124, 0.28);
  border-radius: 0.55rem;
  padding: 1.35rem;
  background: rgba(20, 43, 30, 0.88);
  color: #fff6d5;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.38);
}

.student-loader-card img {
  width: 5.8rem;
  height: 5.8rem;
  object-fit: contain;
  animation: loaderBeaverWalk 1.35s ease-in-out infinite;
}

.student-loader-card strong {
  font-size: 1.15rem;
  font-weight: 950;
}

.student-loader-track {
  width: 100%;
  height: 0.85rem;
  border: 0.08rem solid rgba(255, 245, 200, 0.44);
  border-radius: 999px;
  background: rgba(4, 21, 12, 0.68);
  overflow: hidden;
}

.student-loader-track span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #77ef68, #1c9b25);
  transition: width 140ms ease;
}

@keyframes loaderBeaverWalk {
  0%, 100% {
    transform: translateX(-0.25rem) rotate(-2deg) scaleY(0.98);
  }
  50% {
    transform: translateX(0.25rem) rotate(2deg) scaleY(1.03);
  }
}

body:has(.student-oops-screen) {
  min-height: 100vh;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.32)),
    url("../UI/beaver_shell/images/background.png") center / cover fixed no-repeat,
    #071815;
}

body:has(.student-oops-screen) header:not(.student-oops-header),
body:has(.student-oops-screen) .app-footer {
  display: none;
}

body:has(.student-oops-screen) .app-shell,
body:has(.student-oops-screen) main {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0 !important;
}

.student-oops-screen {
  min-height: 100vh;
  padding: clamp(0.65rem, 1.6vw, 1.2rem);
  font-family: "Segoe UI", Arial, sans-serif;
}

.student-oops-header {
  display: grid;
  justify-items: center;
  margin-bottom: clamp(-1.35rem, -2vw, -0.55rem);
}

.student-oops-header img {
  width: min(42rem, 74vw);
  filter: drop-shadow(0 0.55rem 0.5rem rgba(0, 0, 0, 0.55));
}

.student-oops-stage {
  position: relative;
  display: grid;
  justify-items: center;
}

.student-oops-otto {
  position: absolute;
  left: max(0.4rem, calc(50% - 39rem));
  bottom: 0.5rem;
  z-index: 5;
  width: min(15rem, 20vw);
  filter: drop-shadow(0 0.75rem 0.7rem rgba(0, 0, 0, 0.42));
}

.student-oops-panel {
  display: flex;
  flex-direction: column;
  width: min(62rem, 95vw);
  filter: drop-shadow(0 1rem 1.1rem rgba(0, 0, 0, 0.44));
}

.student-oops-middle {
  display: grid;
  justify-items: center;
  gap: clamp(0.9rem, 2vw, 1.4rem);
  min-height: clamp(30rem, 68vh, 42rem);
  padding: 0 clamp(2.4rem, 5.6vw, 5rem) clamp(1rem, 2vw, 1.4rem);
  background: url("../UI/beaver_shell/images/middleParchment.png") top center / 100% auto repeat-y;
  text-align: center;
}

.student-oops-title {
  min-width: min(22rem, 62vw);
  border: 0.12rem solid rgba(52, 26, 7, 0.92);
  border-radius: 0.5rem;
  padding: 0.55rem 1.4rem;
  background: linear-gradient(180deg, #9b5a1d, #5c310f 48%, #3d200a 100%);
  color: #fff8e3;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0.15rem 0.18rem rgba(0, 0, 0, 0.58);
}

.student-oops-warning {
  display: grid;
  width: clamp(6rem, 13vw, 10rem);
  aspect-ratio: 1.08 / 1;
  place-items: center;
  border: 0.16rem solid #5f3205;
  border-radius: 1.1rem;
  background: linear-gradient(180deg, #ffd65a, #f29a0a);
  color: #4a2607;
  clip-path: polygon(50% 4%, 96% 90%, 4% 90%);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 1000;
  filter: drop-shadow(0 0.4rem 0.35rem rgba(66, 35, 7, 0.34));
}

.student-oops-middle h1 {
  margin: 0;
  color: #24150b;
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  font-weight: 1000;
  text-transform: uppercase;
}

.student-oops-middle p {
  margin: 0;
  color: #24150b;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 800;
}

.student-oops-button {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  min-height: 3.4rem;
  border: 0.13rem solid #6b3504;
  border-radius: 0.45rem;
  padding: 0 1.4rem;
  background: linear-gradient(180deg, #ffd751 0%, #ffb21a 48%, #e88709 100%);
  color: #231306;
  box-shadow: inset 0 0.14rem 0 rgba(255, 248, 172, 0.82), 0 0.32rem 0 rgba(82, 41, 5, 0.82);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 1000;
  text-decoration: none;
  text-transform: uppercase;
}

/* Teacher experience */
body:has(.teacher-login-screen) {
  background:
    radial-gradient(circle at 8% 0, rgba(99, 179, 124, 0.22), transparent 25rem),
    linear-gradient(135deg, #0f2f24, #183c2f 54%, #eef6ee);
}

.teacher-login-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(24rem, 32rem);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: clamp(1.25rem, 4vw, 3rem);
  font-family: "Segoe UI", Arial, sans-serif;
}

.teacher-login-brand img {
  display: block;
  width: min(38rem, 100%);
  filter: drop-shadow(0 0.8rem 0.75rem rgba(0, 0, 0, 0.34));
}

.teacher-login-card {
  display: grid;
  gap: 0.75rem;
  border: 0.08rem solid rgba(33, 77, 53, 0.24);
  border-radius: 0.55rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1.3rem 3rem rgba(6, 28, 19, 0.28);
}

.teacher-login-card p {
  margin: 0 0 0.3rem;
  color: #20704a;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-login-card h1 {
  margin: 0;
  color: #14372a;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 900;
  line-height: 1;
}

.teacher-login-card label {
  color: #163d2d;
  font-weight: 850;
}

.teacher-login-card input {
  min-height: 3rem;
  border: 0.08rem solid #a9c5b4;
  border-radius: 0.45rem;
  padding: 0 0.85rem;
  font: inherit;
}

.teacher-login-card input:focus {
  border-color: #287a51;
  outline: 0.2rem solid rgba(61, 156, 103, 0.22);
}

.teacher-login-card button {
  min-height: 3rem;
  border: 0;
  border-radius: 0.45rem;
  background: linear-gradient(180deg, #47b56f, #197249);
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.teacher-login-card a {
  justify-self: center;
  color: #1e6b48;
  font-weight: 800;
}

.teacher-login-validation {
  color: #a42318;
  font-weight: 800;
}

body:has(.teacher-hero) {
  background:
    radial-gradient(circle at 12% 0, rgba(79, 169, 112, 0.18), transparent 25rem),
    linear-gradient(180deg, #edf6ee, #f7fbf8);
  font-family: "Segoe UI", Arial, sans-serif;
}

body:has(.teacher-hero) .app-nav {
  background: linear-gradient(90deg, #12372a, #1d6545);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

body:has(.teacher-hero) .brand-mark {
  background: #d9f5df;
  color: #12372a;
}

body:has(.teacher-hero) .panel,
body:has(.teacher-hero) .control-tile,
body:has(.teacher-hero) .class-mission-card {
  border-color: rgba(38, 104, 69, 0.18);
  background: rgba(255, 255, 255, 0.96);
}

body:has(.teacher-hero) .btn-primary,
body:has(.teacher-hero) .btn.btn-primary {
  border-color: #17643f;
  background: #207a50;
  color: #ffffff;
}

body:has(.teacher-hero) .btn-outline-primary {
  border-color: #207a50;
  color: #17643f;
}

.teacher-tools-screen {
  display: grid;
  gap: 1.1rem;
}

.teacher-tools-hero {
  margin-bottom: 0;
}

.teacher-toolbox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1rem;
}

.teacher-toolbox p {
  margin: 0;
  color: #496370;
}

/* Super Admin Blockly theme editor and student Blockly skin */
.blockly-admin-grid {
  display: grid;
  grid-template-columns: minmax(22rem, 0.95fr) minmax(28rem, 1.25fr);
  gap: 1rem;
  align-items: start;
}

.blockly-theme-form {
  display: grid;
  gap: 1rem;
}

.blockly-theme-form label {
  display: grid;
  gap: 0.35rem;
  color: #244035;
  font-weight: 800;
}

.blockly-theme-form label span {
  color: #607169;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.blockly-admin-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.blockly-admin-fields input[type="color"] {
  width: 100%;
  height: 2.35rem;
  border: 1px solid rgba(33, 65, 49, 0.18);
  border-radius: 0.4rem;
  padding: 0.15rem;
  background: #ffffff;
}

.category-fields label {
  position: relative;
  padding-left: 1.1rem;
}

.category-fields label::before {
  content: "";
  position: absolute;
  top: 1.9rem;
  left: 0;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0.12rem rgba(13, 24, 18, 0.18);
}

.staff-checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  align-self: end;
  min-height: 2.35rem;
}

.staff-checkbox-row input {
  width: 1rem;
  height: 1rem;
}

.blockly-admin-preview-panel {
  min-height: 35rem;
}

.blockly-admin-preview-shell {
  height: 31rem;
  overflow: hidden;
  border: 1px solid rgba(43, 75, 58, 0.2);
  border-radius: 0.55rem;
  background: #f7dfad;
}

.blockly-admin-preview {
  width: 100%;
  height: 100%;
}

.blockly-instruction-reference {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.instruction-reference-intro {
  max-width: 68rem;
  margin: 0;
  color: #4f655c;
  font-weight: 650;
}

.instruction-reference-table-wrap {
  overflow-x: auto;
}

.instruction-reference-table {
  width: 100%;
  min-width: 58rem;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid rgba(43, 75, 58, 0.16);
  border-radius: 0.45rem;
  background: #ffffff;
}

.instruction-reference-table th,
.instruction-reference-table td {
  padding: 0.72rem 0.82rem;
  border-bottom: 1px solid rgba(43, 75, 58, 0.12);
  color: #244035;
  text-align: left;
  vertical-align: top;
}

.instruction-reference-table th {
  background: #eaf3ed;
  color: #274334;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.instruction-reference-table tr:last-child td {
  border-bottom: 0;
}

.instruction-reference-table code {
  color: #173528;
  font-weight: 850;
  white-space: nowrap;
}

.beaver-blockly-themed .blocklyMainBackground {
  fill: var(--bt-blockly-workspace, #f7dfad) !important;
  stroke: rgba(83, 50, 21, 0.38) !important;
}

.beaver-blockly-themed .blocklyToolboxDiv {
  width: 12.8rem;
  min-width: 12.8rem;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  border-right: 0.42rem solid #6d3f18;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 70%),
    var(--bt-blockly-toolbox, #f8e2b7) !important;
  color: var(--bt-blockly-text, #1f160d);
  box-shadow:
    inset -0.18rem 0 0 rgba(255, 220, 151, 0.34),
    0.2rem 0 0 rgba(52, 27, 9, 0.42);
  z-index: 20;
}

.beaver-blockly-themed .blocklyFlyout {
  z-index: 18;
}

.beaver-blockly-themed .blocklyFlyoutBackground {
  fill: var(--bt-blockly-flyout, #f9e7bf) !important;
  stroke: rgba(82, 47, 18, 0.72) !important;
  stroke-width: 2.2px;
}

.beaver-blockly-themed .blocklyTreeRow {
  display: flex;
  align-items: center;
  min-height: 2.35rem;
  margin: 0.28rem 0.45rem;
  padding: 0 0.45rem 0 0.35rem !important;
  border-radius: 0.28rem;
  color: var(--bt-blockly-text, #1f160d);
}

.beaver-blockly-themed .blocklyTreeRow::before {
  content: "";
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin-right: 0.55rem;
  border: 0.1rem solid rgba(0, 0, 0, 0.58);
  border-radius: 999px;
  background: var(--bt-category-colour, #0f79da);
  box-shadow: inset 0 0.12rem 0.15rem rgba(255, 255, 255, 0.45), 0 0.08rem 0.1rem rgba(0, 0, 0, 0.25);
}

.beaver-blockly-themed .blocklyTreeRow[data-beaver-category="Movement"]::before { background: var(--bt-blockly-movement, #0f79da); }
.beaver-blockly-themed .blocklyTreeRow[data-beaver-category="Turns"]::before { background: var(--bt-blockly-turns, #8638d9); }
.beaver-blockly-themed .blocklyTreeRow[data-beaver-category="Actions"]::before { background: var(--bt-blockly-actions, #43b82d); }
.beaver-blockly-themed .blocklyTreeRow[data-beaver-category="Loops"]::before { background: var(--bt-blockly-loops, #f5a000); }
.beaver-blockly-themed .blocklyTreeRow[data-beaver-category="Logic"]::before { background: var(--bt-blockly-logic, #ed2f29); }
.beaver-blockly-themed .blocklyTreeRow[data-beaver-category="Variables"]::before { background: var(--bt-blockly-variables, #d17d00); }

.beaver-blockly-themed .blocklyTreeIcon {
  display: none !important;
}

.beaver-blockly-themed .blocklyTreeLabel {
  color: inherit;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 1000;
  letter-spacing: 0;
}

.beaver-blockly-themed .blocklyTreeSelected {
  background: rgba(255, 203, 69, 0.36) !important;
  box-shadow: inset 0 0 0 0.08rem rgba(96, 56, 15, 0.24);
}

.beaver-blockly-themed .blocklyBlockCanvas {
  transform-origin: 0 0;
}

.beaver-blockly-themed .blocklyText {
  fill: #ffffff !important;
  font-family: "Segoe UI", Arial, sans-serif !important;
  font-weight: 900 !important;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.24);
  stroke-width: 0.5px;
}

.student-game-player.beaver-player-root .blockly-host.beaver-blockly-themed {
  border: 0.14rem solid rgba(83, 50, 21, 0.58);
  background: var(--bt-blockly-workspace, #f7dfad);
  box-shadow:
    inset 0 0 0 0.18rem rgba(255, 255, 255, 0.18),
    inset 13.25rem 0 0 rgba(109, 71, 32, 0.1);
}

@media (max-width: 1050px) {
  .blockly-admin-grid {
    grid-template-columns: 1fr;
  }

  .blockly-admin-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.teacher-notice {
  border-left: 0.35rem solid #b64b41;
  border-radius: 0.45rem;
  padding: 0.85rem 1rem;
  background: #fff4f2;
  color: #69342d;
  font-weight: 750;
}

.teacher-notice.success {
  border-left-color: #207a50;
  background: #effaf4;
  color: #15573a;
}

.teacher-level-list {
  display: grid;
  gap: 0.65rem;
}

.teacher-level-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  border: 1px solid rgba(38, 104, 69, 0.15);
  border-radius: 0.45rem;
  padding: 0.85rem 1rem;
  background: #ffffff;
}

.teacher-level-row strong,
.teacher-level-row span {
  display: block;
}

.teacher-level-row span {
  color: #627582;
}

.staff-create-panel,
.staff-edit-form,
.staff-stack-form,
.inline-form {
  min-width: 0;
}

.staff-create-panel h2 {
  margin: 0 0 0.75rem;
}

.staff-create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: 0.65rem;
  align-items: end;
}

.staff-edit-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: 0.45rem;
}

.staff-edit-form small {
  color: #60717e;
  font-weight: 750;
}

.staff-stack-form {
  display: grid;
  gap: 0.45rem;
}

.app-table .staff-edit-form,
.app-table .staff-stack-form,
.app-table .inline-form {
  max-width: 24rem;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.inline-form .form-control {
  width: min(9rem, 100%);
}

/* Staff portal shell from teacher mock-ups */
.staff-portal-body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 251, 248, 0.96)),
    radial-gradient(circle at 72% 0, rgba(141, 176, 150, 0.2), transparent 28rem),
    linear-gradient(180deg, #f7faf7, #eef5ef);
  color: #13221b;
  font-family: "Segoe UI", Arial, sans-serif;
}

.staff-portal-body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 15.5rem;
  height: 12rem;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.92)),
    url("../UI/beaver_shell/images/background.png") center 38% / cover no-repeat;
  opacity: 0.18;
  z-index: 0;
}

.staff-portal-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  min-height: 100vh;
}

.staff-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 1.1rem;
  height: 100vh;
  padding: 1.35rem 0.85rem;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(9, 53, 35, 0.96), rgba(8, 53, 38, 0.92)),
    radial-gradient(circle at 50% 18%, rgba(103, 160, 100, 0.24), transparent 12rem);
  box-shadow: 0.6rem 0 1.6rem rgba(4, 32, 22, 0.12);
}

.staff-sidebar::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 14rem;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(10, 37, 28, 0.86));
}

.staff-brand {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  color: #ffffff;
  text-decoration: none;
}

.staff-brand-mark {
  display: grid;
  width: 2.35rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #e9f5ea, #8ab783);
  color: #173d29;
  font-weight: 1000;
}

.staff-brand strong,
.staff-brand small {
  display: block;
  line-height: 1;
}

.staff-brand strong {
  font-size: 1.25rem;
  font-weight: 1000;
}

.staff-brand small {
  margin-top: 0.25rem;
  color: #e5c45b;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08rem;
}

.staff-nav {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 0.25rem;
}

.staff-nav a {
  display: grid;
  grid-template-columns: 1.85rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  min-height: 2.75rem;
  border-radius: 0.45rem;
  padding: 0 0.65rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.94rem;
  font-weight: 800;
  text-decoration: none;
}

.staff-nav a span {
  display: grid;
  width: 1.6rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.36rem;
  color: #d8ecd8;
  font-size: 0.78rem;
  font-weight: 950;
}

.staff-nav a:hover,
.staff-nav a:focus-visible,
.staff-nav a.active {
  background: rgba(91, 153, 80, 0.72);
  color: #ffffff;
}

.staff-user-card,
.staff-signout {
  position: relative;
  z-index: 1;
}

.staff-user-card {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.55rem;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.08);
}

.staff-user-card strong,
.staff-user-card small {
  display: block;
}

.staff-user-card small {
  color: #d4e9d5;
}

.staff-user-avatar {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 999px;
  background: #dceedd;
  color: #145037;
  font-weight: 1000;
}

.staff-signout {
  color: #eff8ef;
  font-weight: 800;
  text-decoration: none;
}

.staff-workspace {
  min-width: 0;
}

.staff-topbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  align-items: center;
  min-height: 4.4rem;
  padding: 0 1.65rem;
}

.staff-search {
  width: min(25rem, 42vw);
  border: 1px solid rgba(28, 64, 43, 0.14);
  border-radius: 0.7rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.86);
  color: #79857e;
  box-shadow: 0 0.3rem 0.9rem rgba(23, 53, 38, 0.08);
}

.staff-topbar-link {
  color: #1d5d3e;
  font-weight: 850;
  text-decoration: none;
}

.staff-main {
  display: grid;
  gap: 1rem;
  padding: 0 1.65rem 1.65rem;
}

.staff-page-heading,
.teacher-hero,
.admin-hero,
.page-heading.compact-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  border: 0;
  padding: 0.25rem 0 0.75rem;
  background: transparent;
  box-shadow: none;
}

.staff-page-heading h1,
.teacher-hero h1,
.admin-hero h1,
.page-heading.compact-heading h1 {
  margin: 0;
  color: #061f16;
  font-size: clamp(1.65rem, 2.4vw, 2.25rem);
  font-weight: 950;
  letter-spacing: 0;
}

.staff-page-heading p,
.teacher-hero p,
.admin-hero p,
.page-heading.compact-heading p {
  margin: 0.35rem 0 0;
  color: #55665d;
  font-size: 0.98rem;
}

.staff-metric-grid,
.teacher-metrics,
.admin-stats,
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.85rem;
}

.staff-metric-card,
.control-tile,
.stat-card {
  display: grid;
  gap: 0.3rem;
  min-height: 6.35rem;
  border: 1px solid rgba(25, 65, 43, 0.12);
  border-radius: 0.55rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0.55rem 1.2rem rgba(20, 47, 32, 0.08);
}

.staff-metric-card span,
.control-tile span,
.stat-card span {
  color: #5a6d62;
  font-size: 0.82rem;
  font-weight: 750;
}

.staff-metric-card strong,
.control-tile strong,
.stat-card strong {
  color: #071b13;
  font-size: 1.85rem;
  font-weight: 950;
}

.staff-metric-card small {
  color: #247643;
  font-weight: 750;
}

.staff-metric-card.alert small {
  color: #b85b10;
}

.staff-panel,
.panel {
  border: 1px solid rgba(25, 65, 43, 0.12);
  border-radius: 0.55rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0.55rem 1.35rem rgba(20, 47, 32, 0.08);
}

.staff-panel h2,
.panel h2 {
  margin: 0 0 0.75rem;
  color: #071b13;
  font-size: 1.1rem;
  font-weight: 900;
}

.staff-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.staff-content-grid.two-one {
  grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.9fr);
}

.staff-content-grid.one-two {
  grid-template-columns: minmax(16rem, 0.75fr) minmax(0, 2fr);
}

.staff-panel-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.staff-filter-row,
.staff-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.staff-table {
  margin-bottom: 0;
}

.staff-table th {
  color: #45544b;
  font-size: 0.78rem;
  font-weight: 850;
}

.staff-table td {
  vertical-align: middle;
  color: #25342b;
}

.staff-inline-form {
  display: inline-flex;
  margin: 0;
}

.staff-table small {
  color: #6b786f;
}

.staff-progress {
  display: inline-block;
  width: 4.6rem;
  height: 0.34rem;
  margin-right: 0.45rem;
  border-radius: 999px;
  background: #e6ece7;
  overflow: hidden;
  vertical-align: middle;
}

.staff-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2d7d43, #79ad44);
}

.staff-list {
  display: grid;
  gap: 0.55rem;
}

.staff-list-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  border-bottom: 1px solid rgba(22, 65, 42, 0.08);
  padding: 0.55rem 0;
}

.staff-list-row strong,
.staff-list-row small {
  display: block;
}

.staff-list-row small {
  color: #6e7c73;
}

.staff-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  border-bottom: 1px solid rgba(32, 74, 48, 0.13);
  margin-bottom: 0.8rem;
}

.staff-tabs span {
  padding: 0 0 0.7rem;
  color: #59675e;
  font-weight: 800;
}

.staff-tabs .active {
  border-bottom: 2px solid #28763e;
  color: #145a34;
}

.staff-review-panel {
  align-content: start;
}

.staff-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.75rem;
}

.staff-report-grid button {
  border: 1px solid rgba(32, 91, 51, 0.15);
  border-radius: 0.45rem;
  padding: 1rem;
  background: #ffffff;
  color: #16482f;
  font-weight: 850;
  text-align: left;
}

.asset-admin-grid {
  align-items: start;
}

.asset-import-panel,
.asset-library-panel {
  min-width: 0;
}

.asset-import-form {
  display: grid;
  gap: 0.8rem;
}

.asset-import-form label {
  display: grid;
  gap: 0.35rem;
}

.asset-import-form span {
  color: #45544b;
  font-size: 0.78rem;
  font-weight: 850;
}

.super-admin-settings-form {
  align-items: start;
}

.super-admin-settings-form .btn {
  justify-self: start;
  width: auto;
}

.asset-pack-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.2rem;
}

.asset-pack-row {
  display: grid;
  gap: 0.1rem;
  border-bottom: 1px solid rgba(22, 65, 42, 0.08);
  padding: 0.55rem 0;
}

.asset-pack-row small,
.asset-muted,
.asset-table small {
  color: #68786f;
}

.asset-filter-form .form-select {
  width: auto;
  min-width: 10rem;
}

.asset-table-wrap {
  overflow-x: auto;
}

.asset-page-summary,
.asset-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: center;
  margin: 0.55rem 0 0.75rem;
  color: #53645b;
  font-size: 0.84rem;
  font-weight: 800;
}

.asset-pagination {
  justify-content: flex-end;
  margin: 0.85rem 0 0;
}

.asset-pagination span {
  min-width: 5rem;
  text-align: center;
}

.asset-table td:first-child,
.asset-table th:first-child {
  width: 5.5rem;
}

.asset-preview-cell {
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  border: 1px solid rgba(18, 55, 35, 0.16);
  border-radius: 0.35rem;
  background:
    linear-gradient(45deg, #dfe7e1 25%, transparent 25%),
    linear-gradient(-45deg, #dfe7e1 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dfe7e1 75%),
    linear-gradient(-45deg, transparent 75%, #dfe7e1 75%),
    #f7faf7;
  background-position: 0 0, 0 0.4rem, 0.4rem -0.4rem, -0.4rem 0;
  background-size: 0.8rem 0.8rem;
}

.asset-preview-cell img {
  max-width: 3.9rem;
  max-height: 3.9rem;
  object-fit: contain;
  image-rendering: auto;
}

.asset-grid-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.4rem;
  border-radius: 0.25rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.74rem;
  font-weight: 850;
}

.asset-grid-badge.ok {
  background: #dff0e2;
  color: #145037;
}

.asset-grid-badge.pending {
  background: #fff0d8;
  color: #8b4c09;
}

.asset-region-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.asset-region-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(26, 79, 45, 0.16);
  border-radius: 0.35rem;
  padding: 0.18rem 0.35rem 0.18rem 0.5rem;
  background: #f2f7f2;
  color: #1c5d3a;
  font-size: 0.78rem;
  font-weight: 800;
}

.asset-region-pill button {
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border: 0;
  border-radius: 50%;
  background: #dcebdd;
  color: #23543a;
  line-height: 1;
}

.asset-assign-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  min-width: 14rem;
}

.asset-padding-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.35rem;
  min-width: 15rem;
}

.mechanics-grid {
  align-items: start;
}

.mechanics-demo-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.mechanics-demo-toggle span {
  color: #45544b;
  font-size: 0.82rem;
  font-weight: 850;
}

.mechanics-list {
  display: grid;
  gap: 0.5rem;
}

.mechanic-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  border-bottom: 1px solid rgba(22, 65, 42, 0.08);
  padding: 0.65rem 0;
}

.mechanic-row strong,
.mechanic-row small {
  display: block;
}

.mechanic-row small {
  color: #68786f;
}

.mechanics-form {
  display: grid;
  gap: 0.65rem;
}

.mechanics-form label {
  display: grid;
  gap: 0.3rem;
}

.mechanics-form label > span {
  color: #45544b;
  font-size: 0.78rem;
  font-weight: 850;
}

.mechanics-check {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.45rem !important;
}

.region-kit-grid {
  align-items: start;
}

.region-slot-list,
.region-pack-list,
.region-background-list {
  display: grid;
  gap: 0.55rem;
}

.region-slot-row,
.region-pack-row,
.region-background-row {
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(18rem, 1.8fr) auto;
  gap: 0.55rem;
  align-items: center;
  border-bottom: 1px solid rgba(22, 65, 42, 0.08);
  padding: 0.65rem 0;
}

.region-pack-row {
  grid-template-columns: 1fr auto;
}

.region-background-row {
  grid-template-columns: 1fr auto auto auto;
}

.region-slot-copy strong,
.region-slot-copy small,
.region-pack-row strong,
.region-pack-row small {
  display: block;
}

.region-slot-copy small,
.region-pack-row small {
  color: #68786f;
}

.region-slot-form,
.region-kit-form-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.region-kit-form-row.stacked {
  display: grid;
  margin-bottom: 0.85rem;
}

.region-kit-preview {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  color: #203529;
  font-size: 0.82rem;
  font-weight: 800;
}

.region-kit-preview img {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(18, 55, 35, 0.16);
  border-radius: 0.3rem;
  object-fit: contain;
  background: #f5f8f5;
}

.region-kit-placeholder {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px dashed rgba(18, 55, 35, 0.28);
  border-radius: 0.3rem;
  background:
    linear-gradient(45deg, #edf2ee 25%, transparent 25%),
    linear-gradient(-45deg, #edf2ee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf2ee 75%),
    linear-gradient(-45deg, transparent 75%, #edf2ee 75%),
    #f8fbf8;
  background-position: 0 0, 0 0.45rem, 0.45rem -0.45rem, -0.45rem 0;
  background-size: 0.9rem 0.9rem;
}

.region-kit-placeholder::before {
  content: "";
  width: 1rem;
  height: 1rem;
  border-radius: 0.18rem;
  border: 0.12rem solid rgba(18, 55, 35, 0.38);
  box-shadow: inset 0 -0.18rem 0 rgba(18, 55, 35, 0.12);
}

.region-kit-preview.empty {
  color: #65756c;
}

.region-kit-preview.fallback {
  color: #65756c;
  font-size: 0.78rem;
}

.region-asset-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.45rem;
  max-height: 17rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.region-asset-choice {
  display: grid;
  gap: 0.22rem;
  border: 1px solid rgba(18, 55, 35, 0.12);
  border-radius: 0.35rem;
  padding: 0.35rem;
  background: #fbfdfb;
}

.region-asset-choice.selected {
  border-color: #238550;
  background: #edf8ef;
}

.region-asset-choice img {
  width: 100%;
  height: 4.5rem;
  object-fit: contain;
  border-radius: 0.25rem;
  background: #f2f6f2;
}

.region-asset-choice strong,
.region-asset-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.region-asset-choice strong {
  color: #193726;
  font-size: 0.76rem;
}

.region-asset-choice small {
  color: #68786f;
  font-size: 0.7rem;
}

body:has(.teacher-login-screen) header,
body:has(.teacher-login-screen) .app-footer {
  display: none;
}

body:has(.teacher-login-screen) .app-shell,
body:has(.teacher-login-screen) main {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0 !important;
}

body:has(.teacher-login-screen) {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(8, 33, 23, 0.18), rgba(255, 255, 255, 0.26)),
    url("../UI/beaver_shell/images/background.png") center / cover fixed no-repeat,
    #122e22;
}

body:has(.teacher-login-screen) .app-shell {
  display: block;
}

.teacher-login-screen {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: center;
  gap: 1.4rem;
}

.teacher-login-brand {
  display: grid;
  justify-items: center;
  color: #103722;
  text-align: center;
}

.teacher-login-brand img {
  width: min(33rem, 72vw);
}

.teacher-login-card {
  width: min(36rem, 92vw);
  border-radius: 0.55rem;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  background: rgba(255, 255, 255, 0.93);
}

.teacher-login-card button {
  background: linear-gradient(180deg, #3e8e4d, #226d3a);
}

@media (max-width: 980px) {
  .staff-portal-shell {
    grid-template-columns: 1fr;
  }

  .staff-sidebar {
    position: relative;
    height: auto;
  }

  .staff-nav {
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  }

  .staff-portal-body::before {
    left: 0;
  }

  .staff-content-grid.two-one,
  .staff-content-grid.one-two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .teacher-login-screen {
    grid-template-columns: 1fr;
  }

  .teacher-login-brand {
    display: grid;
    justify-items: center;
  }

  .teacher-login-brand img {
    width: min(28rem, 88vw);
  }

  .student-oops-otto {
    display: none;
  }
}

