:root {
  color-scheme: dark;
  --bg: #050713;
  --panel: rgba(13, 18, 39, 0.78);
  --panel-strong: rgba(21, 31, 66, 0.9);
  --text: #f7fbff;
  --muted: #b7c0d9;
  --cyan: #43d9ff;
  --gold: #ffd36a;
  --green: #74f0a7;
  --coral: #ff7aa8;
  --violet: #a78bfa;
  --ink: #080b18;
}

* {
  box-sizing: border-box;
}

.sr-only {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(115deg, rgba(67, 217, 255, 0.12), transparent 28%),
    linear-gradient(245deg, rgba(255, 122, 168, 0.13), transparent 32%),
    radial-gradient(circle at 72% 0%, rgba(255, 211, 106, 0.12), transparent 18rem),
    linear-gradient(180deg, #050713 0%, #111631 48%, #070914 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.75), transparent 82%);
  z-index: -1;
}

.student-page {
  text-shadow: 0 0 9px rgba(247, 251, 255, .16);
}

.student-page h1 {
  text-shadow:
    0 0 7px rgba(255, 255, 255, .62),
    0 0 24px rgba(67, 217, 255, .48),
    0 0 52px rgba(167, 139, 250, .3);
}

.student-page h2,
.student-page strong,
.student-page label {
  text-shadow:
    0 0 6px rgba(255, 255, 255, .42),
    0 0 17px rgba(67, 217, 255, .3);
}

.student-page .meta,
.student-page p,
.student-page span,
.student-page select,
.student-page input {
  text-shadow: 0 0 8px rgba(129, 211, 255, .17);
}

.student-page button {
  text-shadow: 0 0 7px rgba(6, 16, 29, .26);
}

.sparkle-text {
  position: relative;
}

.text-sparkle {
  animation: text-sparkle 2.8s ease-in-out infinite;
  animation-delay: var(--sparkle-delay, 0s);
  background: var(--sparkle-color, var(--cyan));
  box-shadow:
    0 0 7px var(--sparkle-color, var(--cyan)),
    0 0 15px var(--sparkle-color, var(--cyan));
  color: var(--sparkle-color, var(--cyan));
  height: var(--sparkle-size, 6px);
  left: var(--sparkle-x, 50%);
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: var(--sparkle-y, 0%);
  transform: rotate(45deg) scale(.2);
  width: var(--sparkle-size, 6px);
  z-index: 4;
}

.text-sparkle::before,
.text-sparkle::after {
  background: currentColor;
  border-radius: 999px;
  content: "";
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.text-sparkle::before {
  height: 240%;
  width: 1px;
}

.text-sparkle::after {
  height: 1px;
  width: 240%;
}

.student-page .animated-shiny-text {
  animation: animated-shiny-text 3.8s linear infinite;
  background-image: linear-gradient(
    110deg,
    rgba(67, 217, 255, .64) 34%,
    rgba(247, 251, 255, .98) 47%,
    rgba(255, 211, 106, .94) 51%,
    rgba(67, 217, 255, .64) 65%
  );
  background-position: 135% 0;
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  max-width: 100%;
}

.tilt-card {
  --glare-x: 50%;
  --glare-y: 50%;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  isolation: isolate;
  position: relative;
  transform-style: preserve-3d;
}

.tilt-card > :not(.tilt-glare) {
  position: relative;
  transform: translateZ(18px);
  transform-style: preserve-3d;
  z-index: 1;
}

.tilt-glare {
  background:
    radial-gradient(
      circle at var(--glare-x) var(--glare-y),
      rgba(255, 255, 255, .34),
      rgba(67, 217, 255, .11) 21%,
      transparent 48%
    );
  border-radius: inherit;
  inset: 0;
  opacity: .22;
  pointer-events: none;
  position: absolute;
  transform: translateZ(6px);
  transition: opacity 220ms ease;
  z-index: 3;
}

@media (hover: hover) and (pointer: fine) {
  .tilt-card {
    transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
    transition:
      transform 260ms cubic-bezier(.2, .75, .25, 1),
      box-shadow 260ms ease;
    will-change: transform;
  }

  .tilt-card.is-tilting {
    box-shadow:
      0 28px 58px rgba(0, 0, 0, .42),
      0 0 34px rgba(67, 217, 255, .16),
      inset 0 1px 0 rgba(255, 255, 255, .15);
    transition-duration: 70ms;
    z-index: 4;
  }

  .tilt-card.is-tilting .tilt-glare {
    opacity: .76;
  }
}

.star-canvas {
  inset: 0;
  opacity: 0.82;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

button,
input {
  font: inherit;
}

select {
  font: inherit;
}

.hidden {
  display: none !important;
}

button,
.student-link {
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--green) 52%, var(--gold));
  color: #06101d;
  cursor: pointer;
  font-weight: 800;
  padding: 0.8rem 1.1rem;
  text-decoration: none;
  box-shadow: 0 0 28px rgba(67, 217, 255, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

button:hover,
.student-link:hover {
  box-shadow: 0 0 36px rgba(116, 240, 167, 0.34);
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
.student-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.shell,
.space-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
  position: relative;
  z-index: 1;
}

.admin-hero,
.space-hero,
.panel,
.profile,
.level-roadmap,
.leaderboard,
.status-grid > div {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(14px);
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 8px;
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(67, 217, 255, .45);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 3.8rem;
  line-height: 1.02;
  letter-spacing: 0;
  max-width: 720px;
  text-shadow: 0 0 24px rgba(67,217,255,.18);
}

h2 {
  font-size: 1.35rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.status-grid > div,
.panel,
.profile,
.level-roadmap,
.leaderboard {
  border-radius: 8px;
  padding: 20px;
}

.status-grid span,
.mission-card span,
.meta {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
}

.status-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1.5rem;
}

.panel {
  margin-top: 20px;
}

.panel-heading {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.panel-heading h2 {
  margin-bottom: 0;
}

.quality-status {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 12px;
}

.quality-status.is-ready {
  background: rgba(116, 240, 167, 0.12);
  color: var(--green);
}

.quality-status.has-issue {
  background: rgba(255, 122, 168, 0.12);
  color: var(--coral);
}

.course-health {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.course-health-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.7fr) auto;
  padding: 14px 16px;
}

.course-health-row.has-issue {
  border-left-color: var(--coral);
}

.course-health-row span,
.course-health-row time {
  color: var(--muted);
  display: block;
  font-size: 0.86rem;
  margin-top: 4px;
}

.quality-warning {
  color: var(--coral);
  margin: 4px 0 0;
}

.rank-list,
.leader-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  align-items: center;
  background: linear-gradient(90deg, rgba(67,217,255,.08), rgba(255,255,255,.055));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 56px 1fr 100px 140px;
  padding: 12px 14px;
}

.adjustment-rule {
  color: var(--muted);
  font-size: .86rem;
}

.adjustment-targets,
.adjustment-columns {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.adjustment-targets {
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  margin-top: 20px;
  padding-bottom: 18px;
}

.adjustment-columns {
  margin-top: 20px;
}

.adjustment-form,
.camera-control {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.camera-control {
  border-left: 1px solid rgba(255, 255, 255, .1);
  padding-left: 18px;
}

.adjustment-panel label {
  display: grid;
  gap: 7px;
}

.adjustment-panel label > span,
.form-label {
  color: var(--text);
  font-size: .9rem;
  font-weight: 750;
  margin: 0;
}

.form-help {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.55;
  margin: 5px 0 0;
}

.adjustment-panel select,
.adjustment-panel input:not([type="checkbox"]) {
  background: rgba(5, 9, 24, .72);
  border: 1px solid rgba(183, 192, 217, .25);
  border-radius: 6px;
  color: var(--text);
  min-height: 42px;
  min-width: 0;
  padding: 0 11px;
  width: 100%;
}

.adjustment-panel select:focus-visible,
.adjustment-panel input:focus-visible {
  border-color: var(--cyan);
  outline: 2px solid rgba(67, 217, 255, .22);
  outline-offset: 1px;
}

.check-row {
  align-items: center;
  border: 1px solid rgba(255, 211, 106, .2);
  border-radius: 6px;
  display: flex !important;
  gap: 10px !important;
  min-height: 42px;
  padding: 9px 11px;
}

.check-row input {
  accent-color: var(--gold);
  height: 18px;
  margin: 0;
  width: 18px;
}

.form-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.secondary-button,
.danger-button {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: none;
  color: var(--text);
}

.danger-button {
  border-color: rgba(255, 122, 168, .35);
  color: #ffc2d5;
}

.deduction-history {
  border-top: 1px solid rgba(255, 255, 255, .1);
  margin-top: 22px;
  padding-top: 18px;
}

.deduction-history h3 {
  font-size: 1rem;
  margin: 0 0 10px;
}

.deduction-list {
  display: grid;
  gap: 8px;
}

.deduction-row {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 8px 0 12px;
}

.deduction-row > div:first-child {
  display: grid;
  gap: 4px;
}

.deduction-row strong {
  color: #ffc2d5;
}

.deduction-row span {
  color: var(--muted);
  font-size: .88rem;
}

.deduction-row button {
  padding: 7px 10px;
}

.space-hero {
  min-height: 460px;
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  padding: 46px;
  background:
    linear-gradient(135deg, rgba(9, 14, 32, .92), rgba(17, 24, 55, .68)),
    radial-gradient(circle at 20% 25%, rgba(67, 217, 255, .22), transparent 28%),
    radial-gradient(circle at 90% 18%, rgba(255, 122, 168, .16), transparent 26%);
}

.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1px),
    radial-gradient(circle, rgba(67,217,255,.8) 0 1px, transparent 1px);
  background-position: 0 0, 32px 45px;
  background-size: 74px 74px, 116px 116px;
  opacity: 0.32;
}

.globe-stage {
  aspect-ratio: 1;
  filter: drop-shadow(0 0 42px rgba(67, 217, 255, .2));
  position: absolute;
  right: -54px;
  top: -34px;
  width: 520px;
  z-index: 0;
}

.globe-canvas {
  cursor: grab;
  display: block;
  height: 100%;
  opacity: .96;
  touch-action: none;
  width: 100%;
}

.globe-canvas:active {
  cursor: grabbing;
}

.globe-canvas:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -42px;
}

.mission-ring {
  border: 1px solid rgba(67,217,255,.34);
  border-left-color: rgba(255,211,106,.75);
  border-radius: 50%;
  bottom: -115px;
  box-shadow:
    0 0 42px rgba(67,217,255,.18),
    inset 0 0 28px rgba(255,255,255,.08);
  height: 330px;
  position: absolute;
  right: -62px;
  transform: rotate(-18deg);
  width: 330px;
}

.mission-ring::before,
.mission-ring::after {
  border: 1px dashed rgba(255,255,255,.2);
  border-radius: 50%;
  content: "";
  inset: 38px;
  position: absolute;
}

.mission-ring::after {
  border-style: solid;
  border-color: rgba(255,122,168,.28);
  inset: 88px;
}

.comet-line {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), rgba(67,217,255,.1), transparent);
  height: 1px;
  left: 46%;
  position: absolute;
  top: 72px;
  transform: rotate(-18deg);
  width: 360px;
}

.hero-copy {
  position: relative;
  width: min(640px, 64%);
  z-index: 2;
}

.search-box {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 22px;
  width: min(520px, 100%);
}

.moving-border-field {
  background: rgba(151, 211, 232, .24);
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .035),
    0 10px 28px rgba(1, 6, 18, .25),
    0 0 28px rgba(67, 217, 255, .08);
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  padding: 1px;
  position: relative;
  transition: box-shadow 180ms ease;
}

.moving-border-field::before {
  animation: search-border-orbit 3.6s linear infinite;
  background: conic-gradient(
    from 0turn,
    transparent 0 38%,
    rgba(67, 217, 255, .16) 43%,
    rgba(67, 217, 255, .98) 47%,
    rgba(247, 251, 255, 1) 49%,
    rgba(255, 211, 106, .98) 51%,
    rgba(116, 240, 167, .2) 56%,
    transparent 61% 100%
  );
  content: "";
  inset: -180%;
  pointer-events: none;
  position: absolute;
}

.moving-border-field::after {
  background: radial-gradient(circle, rgba(67, 217, 255, .2), transparent 68%);
  content: "";
  filter: blur(10px);
  height: 28px;
  left: 16%;
  opacity: .62;
  pointer-events: none;
  position: absolute;
  top: -14px;
  width: 42%;
}

.moving-border-field__surface {
  background:
    linear-gradient(100deg, rgba(10, 24, 45, .94), rgba(3, 9, 22, .92)),
    rgba(3, 9, 22, .94);
  border-radius: 7px;
  height: 100%;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.search-box input {
  background: transparent;
  border: 0;
  color: var(--text);
  height: 100%;
  min-height: 50px;
  min-width: 0;
  outline: none;
  padding: 0 1rem;
  width: 100%;
}

.search-box input::placeholder {
  color: rgba(183, 192, 217, .72);
}

.moving-border-field:focus-within {
  box-shadow:
    0 0 0 1px rgba(255, 211, 106, .28),
    0 12px 32px rgba(1, 6, 18, .34),
    0 0 30px rgba(67, 217, 255, .22),
    0 0 18px rgba(255, 211, 106, .12);
}

.moving-border-field:focus-within::before {
  animation-duration: 2.2s;
}

.search-box input:focus-visible {
  outline: 0;
}

.search-box button {
  min-height: 52px;
  min-width: 82px;
  padding-inline: 1.2rem;
}

.mission-card {
  background: rgba(4, 10, 26, .72);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  bottom: 30px;
  box-shadow: 0 18px 55px rgba(0,0,0,.3), inset 0 0 34px rgba(67,217,255,.08);
  min-width: 286px;
  padding: 18px;
  position: absolute;
  right: 32px;
  z-index: 2;
}

.mission-card strong {
  display: block;
  font-size: 1.8rem;
  margin-top: 6px;
}

.mission-stats {
  border-top: 1px solid rgba(255,255,255,.1);
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
  padding-top: 14px;
}

.mission-stats b {
  color: var(--gold);
  font-size: 1.25rem;
}

.profile {
  margin: 18px 0;
}

.profile.hidden {
  display: none;
}

.profile-head {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr auto;
}

.level-badge {
  align-items: center;
  aspect-ratio: 1;
  background:
    linear-gradient(150deg, rgba(255,255,255,.72), transparent 18%),
    radial-gradient(circle at 30% 25%, #ffffff, var(--gold) 28%, #e7794a 62%, #381032 100%);
  border-radius: 50%;
  color: #141016;
  display: grid;
  font-weight: 900;
  justify-items: center;
  min-width: 130px;
  padding: 18px;
  box-shadow: 0 0 36px rgba(255, 211, 106, .34);
}

.xp-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  height: 18px;
  overflow: hidden;
}

.xp-fill {
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--gold), var(--coral));
  height: 100%;
  width: var(--pct, 0%);
  box-shadow: 0 0 22px rgba(67,217,255,.5);
}

.lesson-switcher {
  align-items: end;
  background:
    linear-gradient(90deg, rgba(67, 217, 255, .09), rgba(255,255,255,.04)),
    rgba(4, 10, 26, .42);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.7fr) auto;
  margin-top: 18px;
  padding: 14px;
}

.lesson-switcher label {
  color: var(--cyan);
  font-size: .86rem;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(67, 217, 255, .34);
}

.lesson-switcher select {
  appearance: none;
  background:
    linear-gradient(135deg, rgba(3, 9, 22, .9), rgba(21, 31, 66, .86)),
    linear-gradient(90deg, transparent, rgba(67,217,255,.12));
  border: 1px solid rgba(67, 217, 255, .28);
  border-radius: 8px;
  color: var(--text);
  color-scheme: dark;
  cursor: pointer;
  font-weight: 800;
  min-width: 0;
  outline: none;
  padding: .82rem 2.5rem .82rem 1rem;
  width: 100%;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%),
    linear-gradient(135deg, rgba(3, 9, 22, .9), rgba(21, 31, 66, .86));
  background-position:
    calc(100% - 18px) 52%,
    calc(100% - 12px) 52%,
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    100% 100%;
  background-repeat: no-repeat;
}

.lesson-switcher select option {
  background-color: #101936;
  color: #f7fbff;
  text-shadow: none;
}

.lesson-switcher select option:checked {
  background-color: #24345f;
  color: #fff0b5;
}

.lesson-switcher select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (forced-colors: active) {
  .lesson-switcher select {
    appearance: auto;
    background: Canvas;
    border-color: ButtonText;
    color: CanvasText;
  }

  .lesson-switcher select option,
  .lesson-switcher select option:checked {
    background: Canvas;
    color: CanvasText;
  }
}

.lesson-switcher span {
  color: var(--muted);
  font-size: .86rem;
  white-space: nowrap;
}

.selected-lesson {
  margin-top: 14px;
}

.xp-rules {
  margin-top: 22px;
}

.rule-list {
  counter-reset: xp-rule;
  display: grid;
  gap: 0 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.rule-list li {
  border-top: 1px solid rgba(255, 255, 255, .12);
  counter-increment: xp-rule;
  min-width: 0;
  padding: 14px 0 15px 40px;
  position: relative;
}

.rule-list li::before {
  color: var(--cyan);
  content: counter(xp-rule, decimal-leading-zero);
  font-size: .72rem;
  font-weight: 900;
  left: 0;
  position: absolute;
  top: 17px;
}

.rule-list strong {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  justify-content: space-between;
}

.rule-list strong span {
  color: var(--gold);
  font-size: .82rem;
  white-space: nowrap;
}

.rule-list p,
.rule-note {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.65;
}

.rule-list p {
  margin: 7px 0 0;
}

.rule-note {
  border-top: 1px solid rgba(255, 211, 106, .22);
  margin: 0;
  padding-top: 12px;
}

.lesson-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  margin-top: 18px;
}

.lesson-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.095), rgba(255,255,255,.045)),
    radial-gradient(circle at 100% 0%, rgba(67,217,255,.1), transparent 44%);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.lesson-card::before {
  background: linear-gradient(90deg, var(--cyan), rgba(116,240,167,.86), var(--gold), var(--coral));
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.lesson-title {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  margin-bottom: 12px;
}

.lesson-title > span {
  background: rgba(255, 211, 106, .14);
  border: 1px solid rgba(255, 211, 106, .28);
  border-radius: 999px;
  color: var(--gold);
  font-size: .88rem;
  font-weight: 900;
  padding: 5px 9px;
  white-space: nowrap;
}

.lesson-score-summary {
  background: rgba(5, 9, 24, .42);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
  padding: 10px 12px;
}

.lesson-score-summary span {
  color: var(--muted);
  display: grid;
  font-size: .76rem;
  gap: 3px;
}

.lesson-score-summary strong {
  color: var(--text);
  font-size: .96rem;
}

.lesson-score-summary span:nth-child(2) strong {
  color: #ffc2d5;
}

.lesson-score-summary span:last-child strong {
  color: var(--gold);
}

.part-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.part-chip {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  min-height: 86px;
  padding: 10px;
}

.part-chip div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.part-chip strong {
  font-size: .95rem;
}

.part-chip span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.part-chip p {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
  margin: 8px 0 0;
}

.part-done {
  background: linear-gradient(180deg, rgba(116, 240, 167, .16), rgba(67, 217, 255, .07));
  border-color: rgba(116, 240, 167, .24);
}

.part-done span {
  color: var(--green);
}

.part-partial {
  background: linear-gradient(180deg, rgba(255, 211, 106, .16), rgba(255, 255, 255, .05));
  border-color: rgba(255, 211, 106, .26);
}

.part-partial span {
  color: var(--gold);
}

.part-missed {
  background: linear-gradient(180deg, rgba(255, 122, 168, .14), rgba(255, 255, 255, .045));
  border-color: rgba(255, 122, 168, .22);
}

.part-missed span {
  color: var(--coral);
}

.deduction-section {
  border-top: 1px solid rgba(255, 122, 168, .2);
  margin-top: 14px;
  padding-top: 12px;
}

.deduction-section h3 {
  color: #ffc2d5;
  font-size: .92rem;
  margin: 0 0 8px;
}

.student-deduction-list {
  display: grid;
  gap: 7px;
}

.student-deduction-row {
  align-items: center;
  background: rgba(255, 122, 168, .09);
  border: 1px solid rgba(255, 122, 168, .2);
  border-radius: 6px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px 10px;
}

.student-deduction-row p {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
  margin: 4px 0 0;
}

.student-deduction-row > span {
  color: #ffc2d5;
  font-size: .84rem;
  font-weight: 900;
  white-space: nowrap;
}

.lesson-note {
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: .84rem;
  margin: 12px 0 0;
  padding-top: 10px;
}

.lesson-perfect {
  color: var(--green);
}

.parts {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.leaderboard {
  margin-top: 18px;
}

.level-roadmap {
  margin-top: 18px;
  position: relative;
}

.level-roadmap::before {
  background: linear-gradient(90deg, transparent, rgba(67,217,255,.32), rgba(255,211,106,.36), transparent);
  content: "";
  height: 1px;
  left: 22px;
  position: absolute;
  right: 22px;
  top: 92px;
}

.section-head {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head h2 {
  margin-bottom: 0;
}

.section-head .meta {
  max-width: 460px;
}

.level-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  position: relative;
}

.level-step {
  align-items: center;
  background: linear-gradient(135deg, rgba(67, 217, 255, 0.13), rgba(255, 255, 255, 0.055));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: 58px 1fr;
  min-height: 104px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.level-step::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  content: "";
  height: 100%;
  left: -120%;
  position: absolute;
  top: 0;
  transform: skewX(-18deg);
  width: 80%;
}

.level-step:hover::after {
  animation: scan 950ms ease;
}

.level-orbit {
  align-items: center;
  aspect-ratio: 1;
  background:
    linear-gradient(145deg, rgba(255,255,255,.72), transparent 22%),
    radial-gradient(circle at 32% 28%, #ffffff, var(--cyan) 30%, #2454d6 68%, #0b1222 100%);
  border-radius: 50%;
  color: #03111c;
  display: grid;
  font-weight: 900;
  justify-items: center;
  box-shadow: 0 0 22px rgba(67,217,255,.28);
}

.level-step-2 .level-orbit { background: radial-gradient(circle at 32% 28%, #ffffff, #74f0a7 31%, #0e7a77 70%, #07111b 100%); }
.level-step-3 .level-orbit { background: radial-gradient(circle at 32% 28%, #ffffff, #ffd36a 31%, #b56728 70%, #1b0e10 100%); }
.level-step-4 .level-orbit { background: radial-gradient(circle at 32% 28%, #ffffff, #ff7aa8 31%, #8739a5 70%, #14081c 100%); }
.level-step-5 .level-orbit { background: radial-gradient(circle at 32% 28%, #ffffff, #a78bfa 31%, #4d46b5 70%, #090b1e 100%); }
.level-step-6 .level-orbit { background: radial-gradient(circle at 32% 28%, #ffffff, #f7fbff 20%, #ffd36a 47%, #ff7aa8 74%, #120711 100%); }

.level-step strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.mini-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
}

.mini-bar i {
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  display: block;
  height: 100%;
}

.podium {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
  margin: 12px 0 18px;
  min-height: 232px;
}

.podium-card {
  align-content: start;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .045)),
    linear-gradient(120deg, rgba(67, 217, 255, .08), rgba(255, 255, 255, .025));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255,255,255,.12);
  display: grid;
  justify-items: center;
  min-height: 176px;
  overflow: hidden;
  padding: 18px 16px 0;
  position: relative;
  text-align: center;
}

.podium-card::before {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
  border-radius: 999px;
  content: "";
  height: 3px;
  left: 16px;
  position: absolute;
  right: 16px;
  top: 0;
}

.podium-card::after {
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 58%);
  content: "";
  height: 150px;
  position: absolute;
  right: -70px;
  top: -80px;
  width: 150px;
}

.podium-card h2 {
  font-size: 1.35rem;
  margin: 8px 0 8px;
  position: relative;
  z-index: 1;
}

.podium-card > strong {
  color: var(--text);
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

.podium-card .meta,
.podium-card .eyebrow {
  position: relative;
  z-index: 1;
}

.podium-1 {
  background:
    linear-gradient(180deg, rgba(255, 211, 106, .28), rgba(255, 255, 255, .06)),
    linear-gradient(135deg, rgba(255, 122, 168, .12), rgba(67, 217, 255, .08));
  border-color: rgba(255, 211, 106, .46);
  box-shadow: 0 26px 62px rgba(255, 211, 106, .18), inset 0 0 34px rgba(255, 211, 106, .08);
  min-height: 218px;
}

.podium-2 {
  background:
    linear-gradient(180deg, rgba(247, 251, 255, .18), rgba(255, 255, 255, .05)),
    linear-gradient(135deg, rgba(67, 217, 255, .11), rgba(255,255,255,.03));
  border-color: rgba(247, 251, 255, .28);
  min-height: 194px;
}

.podium-3 {
  background:
    linear-gradient(180deg, rgba(255, 180, 108, .2), rgba(255, 255, 255, .05)),
    linear-gradient(135deg, rgba(255, 122, 168, .08), rgba(67, 217, 255, .06));
  border-color: rgba(255, 180, 108, .28);
  min-height: 176px;
}

.medal {
  align-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset -8px -10px 18px rgba(0,0,0,.22), 0 0 28px rgba(255,255,255,.18);
  color: #15101a;
  display: grid;
  font-weight: 900;
  justify-items: center;
  position: relative;
  width: 52px;
  z-index: 1;
}

.medal::before {
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 50%;
  content: "";
  inset: 7px;
  position: absolute;
}

.medal-1 {
  background: radial-gradient(circle at 32% 24%, #fff9dd, #ffd36a 36%, #e19b2c 72%, #6d3412 100%);
  box-shadow: 0 0 34px rgba(255, 211, 106, .42), inset -8px -10px 18px rgba(0,0,0,.24);
  width: 64px;
}

.medal-2 {
  background: radial-gradient(circle at 32% 24%, #ffffff, #dce7f3 38%, #8aa4bd 74%, #293746 100%);
}

.medal-3 {
  background: radial-gradient(circle at 32% 24%, #fff0d6, #d99a62 38%, #935633 75%, #301b14 100%);
}

.podium-base {
  align-items: center;
  align-self: end;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.06)),
    linear-gradient(90deg, rgba(67,217,255,.14), rgba(255,211,106,.18), rgba(255,122,168,.12));
  border-top: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.9);
  display: grid;
  font-size: 2.4rem;
  font-weight: 900;
  justify-items: center;
  margin: 14px -16px 0;
  min-height: 54px;
  position: relative;
  text-shadow: 0 0 18px rgba(67, 217, 255, .24);
  width: calc(100% + 32px);
  z-index: 1;
}

.podium-1 .podium-base {
  min-height: 78px;
}

.podium-2 .podium-base {
  min-height: 64px;
}

.podium-3 .podium-base {
  min-height: 52px;
}

@keyframes scan {
  from { left: -120%; }
  to { left: 140%; }
}

@keyframes text-sparkle {
  0%, 18%, 100% {
    opacity: 0;
    transform: rotate(35deg) scale(.2);
  }
  35% {
    opacity: 1;
    transform: rotate(75deg) scale(1);
  }
  52% {
    opacity: 0;
    transform: rotate(125deg) scale(.25);
  }
}

@keyframes animated-shiny-text {
  from { background-position: 135% 0; }
  to { background-position: -65% 0; }
}

@keyframes search-border-orbit {
  to { transform: rotate(1turn); }
}

@media (max-width: 720px) {
  .admin-hero,
  .profile-head,
  .section-head,
  .status-grid,
  .podium {
    grid-template-columns: 1fr;
  }

  .podium {
    min-height: 0;
  }

  .podium-card {
    min-height: 168px;
  }

  .podium-1 {
    order: -3;
  }

  .podium-2 {
    order: -2;
  }

  .podium-3 {
    order: -1;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .course-health-row {
    grid-template-columns: 1fr;
  }

  .adjustment-targets,
  .adjustment-columns {
    grid-template-columns: 1fr;
  }

  .camera-control {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding-left: 0;
    padding-top: 18px;
  }

  .deduction-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .space-hero {
    min-height: 550px;
    padding: 28px 20px 168px;
  }

  .globe-stage {
    bottom: -38px;
    opacity: .74;
    right: -92px;
    top: auto;
    width: 330px;
  }

  .hero-copy {
    width: 100%;
  }

  h1 {
    font-size: 2.45rem;
  }

  .mission-card {
    left: 20px;
    right: auto;
    width: calc(100% - 40px);
  }

  .lesson-switcher {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .lesson-switcher span {
    white-space: normal;
  }

  .lesson-grid,
  .part-grid,
  .rule-list {
    grid-template-columns: 1fr;
  }

  .level-badge {
    justify-self: start;
    min-width: 130px;
    width: 130px;
  }

  .lesson-score-summary {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-sparkle {
    display: none;
  }

  .tilt-card,
  .tilt-card > :not(.tilt-glare) {
    transform: none;
  }

  .moving-border-field {
    background: linear-gradient(110deg, rgba(67, 217, 255, .84), rgba(255, 211, 106, .72));
  }

  .moving-border-field::before,
  .moving-border-field::after {
    display: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Cloud teacher workspace */
.compact-hero h1 {
  font-size: 2.6rem;
}

.header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cloud-status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
}

.auth-panel {
  margin-inline: auto;
  max-width: 620px;
}

.auth-form,
.cloud-login-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-form label,
.cloud-login-form label {
  display: grid;
  gap: 7px;
}

.auth-form label > span,
.cloud-login-form label > span {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}

.auth-form input,
.cloud-login-form input {
  background: rgba(5, 9, 24, .82);
  border: 1px solid rgba(183, 192, 217, .28);
  border-radius: 6px;
  color: var(--text);
  min-height: 46px;
  padding: 0 12px;
  width: 100%;
}

.binding-code-box {
  align-items: center;
  background: rgba(255, 211, 106, .08);
  border: 1px solid rgba(255, 211, 106, .28);
  border-radius: 6px;
  display: grid;
  gap: 8px 18px;
  grid-template-columns: auto 1fr auto;
  margin-top: 16px;
  padding: 14px 16px;
}

.binding-code-box span,
.binding-code-box time,
.binding-row span,
.batch-row span {
  color: var(--muted);
  font-size: .82rem;
}

.binding-code-box strong {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.4rem;
  letter-spacing: .08em;
}

.binding-list,
.batch-list,
.review-table {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.term-list {
  border-top: 1px solid rgba(255, 255, 255, .09);
  display: grid;
  margin-top: 16px;
}

.term-space {
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  min-width: 0;
  padding: 15px 2px 16px;
}

.term-space-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.term-space-header > div {
  display: grid;
  gap: 4px;
}

.term-space-header strong,
.term-batch-heading strong {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.term-space-header span,
.term-batch-heading span {
  color: var(--muted);
  font-size: .8rem;
}

.term-pending,
.term-settled {
  border-left: 3px solid var(--gold);
  padding-left: 9px;
}

.term-settled {
  border-left-color: var(--green);
}

.term-space-branches {
  display: grid;
  gap: 7px;
  margin-top: 13px;
  padding-left: 14px;
}

.term-space-branches > div {
  align-items: baseline;
  display: grid;
  gap: 9px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
}

.term-space-branches strong {
  color: var(--text);
  font-size: .88rem;
}

.tree-mark {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.term-batch-group + .term-batch-group {
  margin-top: 18px;
}

.term-batch-heading {
  align-items: baseline;
  border-bottom: 1px solid rgba(67, 217, 255, .2);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 0 2px 9px;
}

.shop-order-list {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.shop-order-row {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, .09);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto minmax(260px, auto);
  padding: 13px 2px;
}

.shop-order-row > div:first-child {
  display: grid;
  gap: 4px;
}

.shop-order-row span {
  color: var(--muted);
  font-size: .82rem;
}

.shop-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.shop-order-actions button {
  padding: 8px 10px;
}

.binding-row,
.batch-row,
.review-table > div {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, .09);
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px 2px;
}

.binding-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.binding-row > div,
.batch-row > div:not(.batch-state):not(.batch-actions) {
  display: grid;
  gap: 4px;
}

.batch-row {
  grid-template-columns: 96px minmax(0, 1fr) auto;
}

.batch-row > .batch-actions {
  display: flex;
  gap: 8px;
}

.batch-actions button {
  min-width: 72px;
}

.batch-state {
  border-left: 3px solid var(--gold);
  color: var(--gold);
  font-size: .82rem;
  font-weight: 900;
  padding-left: 10px;
}

.batch-state.published {
  border-left-color: var(--green);
  color: var(--green);
}

.batch-state.needs_attention {
  border-left-color: var(--coral);
  color: var(--coral);
}

.review-counts {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 18px;
}

.review-counts > div {
  border-bottom: 2px solid rgba(67, 217, 255, .28);
  padding: 10px 2px;
}

.review-counts span {
  color: var(--muted);
  display: block;
  font-size: .78rem;
}

.review-counts strong {
  display: block;
  font-size: 1.35rem;
  margin-top: 5px;
}

.review-warnings {
  margin-top: 14px;
}

.review-warnings p {
  border-left: 3px solid var(--coral);
  color: #ffc2d5;
  font-size: .86rem;
  margin: 7px 0;
  padding-left: 10px;
}

.batch-review h3 {
  font-size: .96rem;
  margin: 22px 0 0;
}

.review-table > div {
  grid-template-columns: minmax(0, 1fr) auto;
}

.roster-review > div {
  grid-template-columns: minmax(160px, 1fr) minmax(120px, .6fr) minmax(130px, .6fr);
}

.review-table span {
  color: var(--muted);
  font-size: .82rem;
}

.ready-text {
  color: var(--green) !important;
}

.issue-text {
  color: var(--coral) !important;
}

.publish-confirmation {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 18px;
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(.8);
  opacity: .48;
  transform: none;
}

/* Cloud student access */
.auth-space-shell {
  align-items: center;
  display: grid;
  min-height: 100vh;
}

.login-hero {
  min-height: min(680px, calc(100vh - 56px));
}

.login-hero .hero-copy {
  max-width: 560px;
  width: 58%;
}

.cloud-login-form {
  background: rgba(4, 10, 26, .7);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  margin-top: 24px;
  padding: 18px;
}

.login-status {
  color: #ffc2d5;
  font-size: .86rem;
  margin: 0;
  min-height: 1.4em;
}

.access-marker {
  align-content: center;
  aspect-ratio: 1;
  background:
    repeating-radial-gradient(circle, transparent 0 22px, rgba(67, 217, 255, .15) 23px 24px),
    radial-gradient(circle, rgba(255, 211, 106, .2), rgba(67, 217, 255, .08) 48%, transparent 70%);
  display: grid;
  justify-items: center;
  position: absolute;
  right: 6%;
  top: 12%;
  width: min(34vw, 360px);
  z-index: 1;
}

.access-marker span {
  color: var(--gold);
  font-size: 8rem;
  font-weight: 900;
  line-height: .9;
  text-shadow: 0 0 38px rgba(255, 211, 106, .42);
}

.access-marker strong {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
  letter-spacing: .22em;
}

.portal-logout {
  margin-top: 18px;
}

.student-commerce {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .08);
  margin-top: 20px;
  padding: 24px;
}

.student-commerce-head,
.commerce-shop-summary,
.product-foot-cloud,
.order-row-cloud,
.achievement-meta-cloud {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.student-commerce-head h2 {
  margin-bottom: 6px;
}

.commerce-wallet {
  border-left: 3px solid var(--gold);
  display: grid;
  gap: 4px;
  min-width: 126px;
  padding-left: 12px;
}

.commerce-wallet span,
.commerce-wallet strong,
.commerce-shop-summary,
.product-foot-cloud span,
.order-row-cloud span,
.achievement-card-cloud small {
  color: var(--muted);
  font-size: .82rem;
}

.commerce-wallet strong {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.2rem;
}

.commerce-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  gap: 8px;
  margin-top: 22px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.commerce-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: none;
  color: var(--muted);
  font-size: .86rem;
  padding: 8px 12px;
  white-space: nowrap;
}

.commerce-tab:hover,
.commerce-tab.is-active {
  background: rgba(67, 217, 255, .12);
  border-color: rgba(67, 217, 255, .52);
  color: var(--cyan);
  transform: none;
}

.commerce-view {
  min-height: 120px;
  padding-top: 18px;
}

.commerce-summary {
  align-items: baseline;
  border-left: 3px solid var(--green);
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding-left: 10px;
}

.commerce-summary strong {
  color: var(--green);
  font-size: 1.5rem;
}

.achievement-grid-cloud,
.product-grid-cloud {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.achievement-card-cloud,
.product-card-cloud,
.order-row-cloud,
.commerce-empty {
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: 14px;
}

.achievement-card-cloud {
  display: grid;
  gap: 12px;
  grid-template-columns: 56px minmax(0, 1fr);
}

.achievement-card-cloud.is-locked {
  opacity: .72;
}

.achievement-orb-cloud {
  align-items: center;
  aspect-ratio: 1;
  background: color-mix(in srgb, var(--badge-accent) 24%, transparent);
  border: 1px solid color-mix(in srgb, var(--badge-accent) 70%, white);
  border-radius: 50%;
  color: var(--badge-accent);
  display: grid;
  font-size: 1.5rem;
  justify-items: center;
  max-width: 56px;
}

.achievement-meta-cloud {
  font-size: .72rem;
}

.achievement-meta-cloud span:first-child {
  color: var(--cyan);
}

.achievement-card-cloud h3,
.product-card-cloud h3,
.order-row-cloud strong {
  margin: 6px 0 0;
}

.achievement-card-cloud p,
.product-card-cloud p {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
  margin: 6px 0 10px;
}

.achievement-meter-cloud {
  background: rgba(255, 255, 255, .1);
  border-radius: 999px;
  height: 5px;
  overflow: hidden;
}

.achievement-meter-cloud i {
  background: var(--badge-accent);
  box-shadow: 0 0 12px var(--badge-accent);
  display: block;
  height: 100%;
}

.commerce-shop-summary {
  margin-bottom: 14px;
}

.product-card-cloud {
  display: grid;
  gap: 8px;
}

.product-art-cloud {
  align-items: end;
  aspect-ratio: 2.2 / 1;
  background:
    radial-gradient(circle at 30% 30%, rgba(67, 217, 255, .44), transparent 22%),
    linear-gradient(135deg, rgba(167, 139, 250, .34), rgba(67, 217, 255, .06));
  border: 1px solid rgba(67, 217, 255, .18);
  border-radius: 6px;
  display: flex;
  padding: 8px;
}

.product-art-cloud span {
  background: rgba(5, 7, 19, .68);
  border-radius: 4px;
  color: var(--gold);
  font-size: .72rem;
  padding: 4px 6px;
}

.product-card-cloud.is-out {
  opacity: .62;
}

.product-foot-cloud {
  margin-top: 4px;
}

.product-foot-cloud strong {
  color: var(--gold);
}

.product-redeem-cloud {
  margin-top: 4px;
  width: 100%;
}

.order-list-cloud {
  display: grid;
  gap: 8px;
}

.order-row-cloud {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.order-row-cloud > div {
  display: grid;
  gap: 4px;
}

.order-status-cloud.pending { color: var(--gold); }
.order-status-cloud.approved { color: var(--green); }
.order-status-cloud.cancelled,
.order-status-cloud.expired { color: var(--muted); }

.commerce-empty {
  border-style: dashed;
  color: var(--muted);
  text-align: center;
}

.commerce-empty h3 {
  color: var(--text);
  margin-bottom: 6px;
}

.commerce-empty p {
  margin: 0;
}

.site-compliance {
  color: var(--muted);
  font-size: .78rem;
  padding: 18px 16px 24px;
  position: relative;
  text-align: center;
  z-index: 2;
}

.site-compliance a {
  color: inherit;
  text-decoration: none;
}

.site-compliance a:hover {
  color: var(--cyan);
  text-decoration: underline;
}

@media (max-width: 720px) {
  .cloud-status-grid,
  .review-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .binding-code-box,
  .batch-row,
  .roster-review > div {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .term-space-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .shop-order-row {
    align-items: stretch;
    grid-template-columns: 1fr auto;
  }

  .shop-order-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .shop-order-actions button {
    flex: 1 1 0;
  }

  .term-space-branches {
    padding-left: 2px;
  }

  .publish-confirmation {
    align-items: stretch;
    flex-direction: column;
  }

  .login-hero .hero-copy {
    width: 100%;
  }

  .student-commerce-head,
  .commerce-shop-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .achievement-grid-cloud,
  .product-grid-cloud {
    grid-template-columns: 1fr;
  }

  .order-row-cloud {
    align-items: start;
    grid-template-columns: 1fr auto;
  }

  .order-row-cloud .order-status-cloud {
    grid-column: 1 / 2;
  }

  .order-row-cloud button {
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
  }

  .compact-hero h1 {
    font-size: 1.9rem;
  }

  .access-marker {
    bottom: 18px;
    opacity: .45;
    right: -38px;
    top: auto;
    width: 220px;
  }

  .access-marker span {
    font-size: 4.6rem;
  }
}
