:root {
  --ink: #15213b;
  --muted: #66708b;
  --cream: #fffaf0;
  --paper: #fffdf8;
  --coral: #ff6746;
  --coral-dark: #e3482f;
  --mango: #ffc641;
  --lemon: #ffe979;
  --sky: #7fd3ff;
  --blue: #3578f6;
  --mint: #59d5a5;
  --pink: #ff96ad;
  --line: #dce1ea;
  --shadow: 0 24px 60px rgba(54, 44, 26, 0.14);
  --display: "YouYuan", "幼圆", "Hiragino Maru Gothic ProN", "Microsoft YaHei", sans-serif;
  --body: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #f5ecd9;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 233, 121, 0.8), transparent 22rem),
    radial-gradient(circle at 91% 18%, rgba(127, 211, 255, 0.7), transparent 24rem),
    linear-gradient(135deg, #fff5d8 0%, #f5f2e9 45%, #dff5ff 100%);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.sky-noise {
  position: fixed;
  inset: 0;
  z-index: -3;
  opacity: 0.2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

.orbit {
  position: fixed;
  z-index: -2;
  width: 46rem;
  height: 46rem;
  border: 2px dashed rgba(21, 33, 59, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  top: -26rem;
  right: -10rem;
}

.orbit-two {
  bottom: -33rem;
  left: -11rem;
}

.floating-sticker {
  position: fixed;
  z-index: -1;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  font: 900 1.35rem var(--display);
  filter: drop-shadow(4px 6px 0 rgba(21, 33, 59, 0.12));
  animation: float-sticker 6s ease-in-out infinite;
}

.sticker-star {
  top: 18%;
  left: 1.5%;
  color: var(--coral);
  background: var(--lemon);
  clip-path: polygon(50% 0, 62% 31%, 96% 24%, 75% 53%, 100% 74%, 65% 72%, 51% 100%, 39% 72%, 3% 77%, 27% 52%, 5% 27%, 39% 32%);
}

.sticker-bolt {
  right: 2%;
  bottom: 12%;
  color: var(--ink);
  background: var(--mango);
  clip-path: polygon(48% 0, 100% 0, 67% 39%, 93% 39%, 26% 100%, 40% 55%, 7% 55%);
  animation-delay: -2s;
}

.sticker-smile {
  top: 50%;
  right: 1.5%;
  color: var(--ink);
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: 50%;
  transform: rotate(8deg);
  animation-delay: -4s;
}

@keyframes float-sticker {
  0%, 100% { translate: 0 0; rotate: -4deg; }
  50% { translate: 0 -14px; rotate: 7deg; }
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1480px, calc(100% - 48px));
  height: 92px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--coral);
  border: 3px solid var(--ink);
  border-radius: 16px 10px 17px 11px;
  box-shadow: 4px 5px 0 var(--ink);
  transform: rotate(-4deg);
}

.brand-rocket {
  color: white;
  font: 900 1.8rem var(--display);
  transform: rotate(5deg);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong {
  font: 900 1.15rem var(--display);
  letter-spacing: 0.06em;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

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

.sound-toggle,
.teacher-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 15px;
  border: 1.5px solid rgba(21, 33, 59, 0.16);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.sound-toggle span:first-child {
  color: var(--coral);
  font-size: 1rem;
}

.teacher-link:hover,
.sound-toggle:hover {
  background: white;
  transform: translateY(-1px);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(280px, 345px) minmax(0, 1fr);
  width: min(1480px, calc(100% - 48px));
  min-height: calc(100vh - 128px);
  margin: 0 auto 36px;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.94);
  border: 2px solid rgba(21, 33, 59, 0.88);
  border-radius: 32px 32px 38px 26px;
  box-shadow: 10px 12px 0 rgba(21, 33, 59, 0.9), var(--shadow);
}

.mission-rail {
  position: relative;
  padding: clamp(30px, 4vw, 54px) clamp(24px, 3vw, 40px);
  color: white;
  background:
    linear-gradient(rgba(21, 33, 59, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 33, 59, 0.14) 1px, transparent 1px),
    var(--coral);
  background-size: 22px 22px;
  border-right: 2px solid var(--ink);
  overflow: hidden;
}

.mission-rail::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -65px;
  top: -55px;
  border: 26px solid rgba(255, 198, 65, 0.85);
  border-radius: 50%;
}

.mission-rail::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  left: -40px;
  bottom: 100px;
  border: 14px solid rgba(255, 255, 255, 0.16);
  transform: rotate(22deg);
}

.rail-eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rail-eyebrow::before,
.kicker::before {
  content: "";
  width: 20px;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
}

.mission-rail h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font: 900 clamp(2.1rem, 3vw, 3.15rem)/1.12 var(--display);
  letter-spacing: -0.05em;
}

.rail-intro {
  position: relative;
  z-index: 1;
  max-width: 260px;
  margin: 22px 0 40px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  line-height: 1.75;
}

.step-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 13px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  opacity: 0.5;
  transition: 240ms ease;
}

.step-list li > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 900;
}

.step-list strong,
.step-list small {
  display: block;
}

.step-list strong {
  font: 800 0.92rem var(--display);
}

.step-list small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.7rem;
}

.step-list li.is-active {
  color: var(--ink);
  background: var(--lemon);
  border-color: var(--ink);
  box-shadow: 4px 5px 0 rgba(21, 33, 59, 0.92);
  opacity: 1;
  transform: translateX(4px) rotate(-0.7deg);
}

.step-list li.is-active small {
  color: rgba(21, 33, 59, 0.64);
}

.step-list li.is-active > span {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.step-list li.is-complete {
  opacity: 0.9;
}

.step-list li.is-complete > span {
  color: var(--ink);
  background: white;
  border-color: white;
}

.rail-tip {
  position: absolute;
  z-index: 1;
  right: 28px;
  bottom: 27px;
  left: 28px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  padding: 14px;
  color: var(--ink);
  background: white;
  border: 2px solid var(--ink);
  border-radius: 15px 19px 14px 16px;
  box-shadow: 4px 5px 0 var(--ink);
  transform: rotate(0.8deg);
}

.rail-tip p {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.5;
}

.workspace {
  position: relative;
  min-width: 0;
  min-height: 720px;
  padding: clamp(26px, 4vw, 52px);
  background:
    radial-gradient(circle at 88% 18%, rgba(127, 211, 255, 0.12), transparent 18rem),
    var(--paper);
}

.workspace-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
}

.class-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 70%;
  padding: 7px 12px;
  color: #216449;
  background: #e3faef;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.chip-dot {
  width: 7px;
  height: 7px;
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(89, 213, 165, 0.2);
}

.mission-number,
.request-label {
  color: #8b93a7;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.request-label {
  position: absolute;
  right: 28px;
  bottom: 18px;
}

.panel {
  display: none;
  min-height: 590px;
  padding: clamp(56px, 9vh, 100px) clamp(10px, 4vw, 50px) 50px;
  animation: panel-enter 480ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.panel.is-visible {
  display: block;
}

@keyframes panel-enter {
  from { opacity: 0; transform: translateY(18px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.panel-copy {
  position: relative;
  z-index: 2;
  max-width: 570px;
}

.kicker {
  color: var(--coral);
}

.panel-copy h2,
.publishing-stage h2,
.success-copy h2 {
  margin: 0;
  font: 900 clamp(2.4rem, 5vw, 4.8rem)/1.05 var(--display);
  letter-spacing: -0.07em;
}

.panel-copy p,
.publishing-stage > p,
.success-copy > p {
  max-width: 590px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(0.93rem, 1.5vw, 1.05rem);
  line-height: 1.75;
}

.focus-form {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
  margin-top: 42px;
}

.focus-form label,
.field-group label {
  display: block;
  margin-bottom: 9px;
  font-size: 0.78rem;
  font-weight: 900;
}

.field-group label span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
}

.code-field {
  position: relative;
}

.code-field input {
  width: 100%;
  height: 86px;
  padding: 0 28px;
  color: var(--ink);
  background: white;
  border: 3px solid var(--ink);
  border-radius: 19px 13px 18px 15px;
  outline: none;
  box-shadow: 7px 8px 0 var(--mango);
  font: 900 clamp(1.8rem, 4vw, 2.8rem) var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: 180ms ease;
}

.code-field input:focus {
  box-shadow: 7px 8px 0 var(--sky);
  transform: translateY(-2px);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  border: 2px solid var(--ink);
  border-radius: 15px 12px 16px 13px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: 160ms ease;
}

.primary-button {
  min-width: 205px;
  padding: 0 11px 0 22px;
  color: white;
  background: var(--coral);
  box-shadow: 5px 6px 0 var(--ink);
}

.focus-form .primary-button {
  width: 100%;
  margin-top: 28px;
}

.primary-button:hover:not(:disabled) {
  background: var(--coral-dark);
  transform: translate(-1px, -2px);
  box-shadow: 7px 8px 0 var(--ink);
}

.primary-button:active:not(:disabled),
.secondary-button:active {
  transform: translate(3px, 4px);
  box-shadow: 2px 2px 0 var(--ink);
}

.primary-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.button-arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--ink);
  background: var(--mango);
  border-radius: 10px;
  font-size: 1.25rem;
}

.text-button {
  display: block;
  margin: 18px auto 0;
  padding: 5px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.text-button:hover {
  color: var(--coral-dark);
}

.decorative-launch {
  position: absolute;
  right: clamp(30px, 8vw, 110px);
  bottom: 70px;
  width: 245px;
  height: 300px;
  pointer-events: none;
}

.planet-ring {
  position: absolute;
  right: -30px;
  bottom: 0;
  width: 175px;
  height: 65px;
  border: 13px solid var(--sky);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.planet-ring::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -53px;
  left: 24px;
  width: 100px;
  height: 100px;
  background: var(--blue);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset -20px -13px 0 rgba(21, 33, 59, 0.12);
}

.launch-capsule {
  position: absolute;
  top: 30px;
  left: 70px;
  width: 82px;
  height: 138px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 50% 50% 25% 25%;
  box-shadow: 7px 7px 0 var(--ink);
  transform: rotate(18deg);
  animation: capsule-hover 3s ease-in-out infinite;
}

.launch-capsule::before,
.launch-capsule::after {
  content: "";
  position: absolute;
  bottom: 8px;
  width: 31px;
  height: 42px;
  background: var(--coral);
  border: 3px solid var(--ink);
}

.launch-capsule::before {
  left: -23px;
  border-radius: 20px 5px 5px 20px;
}

.launch-capsule::after {
  right: -23px;
  border-radius: 5px 20px 20px 5px;
}

.launch-capsule span {
  position: absolute;
  top: 32px;
  left: 19px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: white;
  background: var(--blue);
  border: 3px solid var(--ink);
  border-radius: 50%;
  font: 900 0.8rem var(--display);
}

.launch-capsule i {
  position: absolute;
  right: 20px;
  bottom: -48px;
  width: 34px;
  height: 55px;
  background: linear-gradient(var(--mango) 0 55%, var(--coral) 55%);
  border: 3px solid var(--ink);
  clip-path: polygon(20% 0, 80% 0, 100% 45%, 50% 100%, 0 45%);
}

.launch-trail {
  position: absolute;
  top: 30px;
  left: 0;
  width: 210px;
  height: 210px;
  border: 2px dashed rgba(21, 33, 59, 0.25);
  border-color: rgba(21, 33, 59, 0.25) transparent transparent rgba(21, 33, 59, 0.25);
  border-radius: 50%;
  transform: rotate(-22deg);
}

@keyframes capsule-hover {
  0%, 100% { translate: 0 0; rotate: 18deg; }
  50% { translate: 0 -9px; rotate: 15deg; }
}

.stack-form {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 20px;
  width: min(520px, 100%);
  margin-top: 34px;
}

.field-group input,
.field-group select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  color: var(--ink);
  background: white;
  border: 2px solid var(--ink);
  border-radius: 12px;
  outline: 0;
  font-weight: 750;
  transition: 160ms ease;
}

.field-group input:focus,
.field-group select:focus {
  box-shadow: 4px 4px 0 var(--sky);
  transform: translateY(-1px);
}

.field-group small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.66rem;
}

.compact-form .primary-button {
  margin-top: 8px;
}

.back-button {
  margin-left: 0;
}

.identity-card {
  position: absolute;
  right: clamp(40px, 10vw, 140px);
  bottom: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 210px;
  height: 280px;
  padding-top: 58px;
  background: var(--lemon);
  border: 3px solid var(--ink);
  border-radius: 20px 20px 36px 36px;
  box-shadow: 10px 12px 0 var(--ink);
  transform: rotate(4deg);
}

.lanyard {
  position: absolute;
  top: -92px;
  left: 72px;
  width: 62px;
  height: 112px;
  border: 12px solid var(--blue);
  border-bottom: 0;
  border-radius: 34px 34px 0 0;
}

.avatar-face {
  position: relative;
  width: 105px;
  height: 105px;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: 44% 56% 46% 54%;
}

.avatar-face i {
  position: absolute;
  top: 40px;
  width: 10px;
  height: 14px;
  background: var(--ink);
  border-radius: 50%;
}

.avatar-face i:first-child { left: 28px; }
.avatar-face i:nth-child(2) { right: 28px; }

.avatar-face b {
  position: absolute;
  bottom: 25px;
  left: 42px;
  width: 22px;
  height: 12px;
  border-bottom: 4px solid var(--ink);
  border-radius: 50%;
}

.identity-card > strong {
  margin-top: 22px;
  font: 900 2.2rem var(--display);
  letter-spacing: 0.1em;
}

.identity-card > small {
  margin-top: 6px;
  color: rgba(21, 33, 59, 0.56);
  font-weight: 900;
  letter-spacing: 0.2em;
}

.panel-wide {
  padding-top: 42px;
}

.inline-copy {
  display: flex;
  align-items: end;
  justify-content: space-between;
  max-width: none;
  gap: 40px;
}

.inline-copy h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.inline-copy p {
  max-width: 330px;
  margin-bottom: 4px;
  font-size: 0.82rem;
}

code {
  padding: 2px 5px;
  color: var(--coral-dark);
  background: #fff0d1;
  border-radius: 5px;
  font-family: ui-monospace, monospace;
  font-weight: 800;
}

.project-fields {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1.4fr;
  gap: 14px;
  margin-top: 27px;
}

.drop-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 270px;
  margin-top: 18px;
  padding: 26px;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(127, 211, 255, 0.08) 50%, transparent 50%),
    white;
  background-size: 28px 28px;
  border: 2px dashed #a5aec1;
  border-radius: 24px;
  transition: 200ms ease;
}

.drop-zone.is-dragging {
  background-color: #eefaff;
  border-color: var(--blue);
  box-shadow: inset 0 0 0 4px rgba(53, 120, 246, 0.08);
  transform: scale(1.01);
}

.drop-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 62px;
  margin-bottom: 8px;
  color: white;
  background: var(--blue);
  border: 3px solid var(--ink);
  border-radius: 12px 12px 16px 16px;
  box-shadow: 5px 5px 0 var(--ink);
}

.drop-icon::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 6px;
  width: 31px;
  height: 15px;
  background: var(--blue);
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.drop-icon span {
  font-size: 1.8rem;
  font-weight: 900;
}

.drop-icon i {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--mango);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.drop-icon i:nth-of-type(1) { right: -16px; top: -17px; }
.drop-icon i:nth-of-type(2) { left: -21px; top: 8px; }
.drop-icon i:nth-of-type(3) { right: -23px; bottom: -10px; }

.drop-copy strong,
.drop-copy span {
  display: block;
}

.drop-copy strong {
  font: 900 1.2rem var(--display);
}

.drop-copy span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
}

.drop-actions {
  display: flex;
  gap: 10px;
  margin-top: 17px;
}

.secondary-button {
  min-height: 43px;
  padding: 0 16px;
  color: var(--ink);
  background: white;
  box-shadow: 3px 4px 0 var(--ink);
  font-size: 0.75rem;
}

.secondary-button.warm {
  background: var(--lemon);
}

.secondary-button:hover {
  transform: translateY(-2px);
  box-shadow: 4px 6px 0 var(--ink);
}

.selected-project {
  display: flex;
  align-items: center;
  gap: 13px;
  width: min(540px, 90%);
  padding: 13px;
  text-align: left;
  background: #effaf5;
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 5px 0 var(--mint);
}

.file-badge {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  flex: 0 0 auto;
  color: white;
  background: var(--coral);
  border: 2px solid var(--ink);
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 900;
}

.selected-project div {
  min-width: 0;
  flex: 1;
}

.selected-project strong,
.selected-project small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-project strong {
  font: 900 0.9rem var(--display);
}

.selected-project small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.66rem;
}

.selected-project button {
  width: 34px;
  height: 34px;
  background: white;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
}

.drop-zone.has-files .drop-icon,
.drop-zone.has-files .drop-copy,
.drop-zone.has-files .drop-actions {
  display: none;
}

.upload-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

.upload-footer .text-button {
  margin: 0;
}

.inspection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.95fr);
  gap: 24px;
}

.inspection-main {
  min-width: 0;
}

.score-orbit {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
  background: var(--lemon);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(4deg);
}

.score-orbit strong,
.score-orbit small {
  display: block;
  text-align: center;
}

.score-orbit strong {
  font: 900 1.5rem var(--display);
}

.score-orbit small {
  font-size: 0.55rem;
  font-weight: 900;
}

.check-progress {
  position: relative;
  min-height: 245px;
  margin-top: 30px;
  padding: 42px;
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(rgba(53, 120, 246, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 120, 246, 0.07) 1px, transparent 1px),
    #f4faff;
  background-size: 24px 24px;
  border: 2px solid var(--ink);
  border-radius: 20px;
}

.check-progress span {
  display: inline-block;
  width: 25px;
  height: 25px;
  margin: 45px 4px 24px;
  background: var(--coral);
  border: 2px solid var(--ink);
  border-radius: 50%;
  animation: check-dot 1s ease-in-out infinite;
}

.check-progress span:nth-of-type(2) {
  background: var(--mango);
  animation-delay: 0.12s;
}

.check-progress span:nth-of-type(3) {
  background: var(--sky);
  animation-delay: 0.24s;
}

.check-progress p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.scanner-line {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--coral);
  box-shadow: 0 0 22px var(--coral);
  animation: scan 2s ease-in-out infinite alternate;
}

@keyframes check-dot {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-17px); }
}

@keyframes scan {
  from { top: 5%; }
  to { top: 95%; }
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 26px;
}

.summary-cell {
  padding: 14px;
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 13px;
}

.summary-cell strong,
.summary-cell span {
  display: block;
}

.summary-cell strong {
  font: 900 1.2rem var(--display);
}

.summary-cell span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.62rem;
}

.result-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  margin-top: 13px;
  padding-right: 4px;
  overflow-y: auto;
}

.result-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 12px;
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 12px;
}

.result-item > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: white;
  background: var(--mint);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-weight: 900;
}

.result-item.warning > span {
  color: var(--ink);
  background: var(--mango);
}

.result-item.error > span {
  background: var(--coral);
}

.result-item strong,
.result-item p,
.result-item small {
  display: block;
  margin: 0;
}

.result-item strong {
  font-size: 0.75rem;
}

.result-item p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.45;
}

.result-item small {
  margin-top: 5px;
  color: var(--blue);
  font-size: 0.62rem;
}

.preview-card {
  min-width: 0;
  height: 460px;
  overflow: hidden;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 17px;
  box-shadow: 7px 8px 0 var(--ink);
  transform: rotate(0.6deg);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 12px;
  background: #edf0f4;
  border-bottom: 2px solid var(--ink);
}

.browser-bar > span {
  width: 9px;
  height: 9px;
  background: var(--coral);
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.browser-bar > span:nth-child(2) { background: var(--mango); }
.browser-bar > span:nth-child(3) { background: var(--mint); }

.browser-bar div {
  flex: 1;
  margin-left: 8px;
  padding: 5px 12px;
  color: var(--muted);
  background: white;
  border-radius: 6px;
  font-size: 0.58rem;
  text-align: center;
}

.preview-card iframe {
  width: 100%;
  height: calc(100% - 42px);
  border: 0;
  background: white;
}

.inspection-footer {
  justify-content: flex-end;
  gap: 12px;
}

.publishing-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.publishing-stage h2 {
  margin-top: 8px;
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.launch-illustration {
  position: relative;
  width: 240px;
  height: 230px;
  margin: -30px 0 10px;
}

.rocket-body {
  position: absolute;
  z-index: 3;
  top: 20px;
  left: 83px;
  width: 78px;
  height: 137px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 50% 50% 25% 25%;
  box-shadow: 6px 6px 0 var(--ink);
  animation: launch-shake 0.5s linear infinite;
}

.rocket-body strong {
  position: absolute;
  top: 35px;
  left: 19px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: white;
  background: var(--blue);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font: 900 0.75rem var(--display);
}

.rocket-body::before,
.rocket-body::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 27px;
  height: 42px;
  background: var(--coral);
  border: 3px solid var(--ink);
}

.rocket-body::before { left: -22px; border-radius: 20px 5px 5px 20px; }
.rocket-body::after { right: -22px; border-radius: 5px 20px 20px 5px; }

.rocket-flame {
  position: absolute;
  z-index: 2;
  top: 148px;
  left: 105px;
  width: 37px;
  height: 73px;
  background: linear-gradient(90deg, var(--coral), var(--mango), var(--coral));
  border: 3px solid var(--ink);
  clip-path: polygon(12% 0, 88% 0, 100% 45%, 50% 100%, 0 45%);
  animation: flame 0.28s ease-in-out infinite alternate;
}

.launch-cloud {
  position: absolute;
  z-index: 1;
  bottom: 3px;
  width: 95px;
  height: 53px;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.cloud-left { left: 18px; }
.cloud-right { right: 12px; bottom: 11px; }

.launch-cloud::before,
.launch-cloud::after {
  content: "";
  position: absolute;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.launch-cloud::before {
  width: 45px;
  height: 45px;
  top: -23px;
  left: 14px;
}

.launch-cloud::after {
  width: 35px;
  height: 35px;
  top: -8px;
  right: -12px;
}

@keyframes launch-shake {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(1px, -2px); }
}

@keyframes flame {
  from { transform: scaleY(0.86); transform-origin: top; }
  to { transform: scaleY(1.08); transform-origin: top; }
}

.deploy-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(720px, 100%);
  margin: 38px 0 0;
  padding: 0;
  list-style: none;
}

.deploy-steps li {
  position: relative;
  padding: 35px 8px 0;
  color: #a3a9b7;
  font-size: 0.7rem;
  font-weight: 800;
}

.deploy-steps li::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 50%;
  left: -50%;
  height: 3px;
  background: #dfe3e9;
}

.deploy-steps li:first-child::before {
  display: none;
}

.deploy-steps li > span {
  position: absolute;
  z-index: 1;
  top: 1px;
  left: calc(50% - 12px);
  width: 24px;
  height: 24px;
  background: white;
  border: 3px solid #c8ced9;
  border-radius: 50%;
}

.deploy-steps li.is-current,
.deploy-steps li.is-complete {
  color: var(--ink);
}

.deploy-steps li.is-current > span {
  background: var(--mango);
  border-color: var(--ink);
  box-shadow: 0 0 0 5px rgba(255, 198, 65, 0.25);
  animation: pulse-dot 1s ease infinite;
}

.deploy-steps li.is-complete > span {
  background: var(--mint);
  border-color: var(--ink);
}

.deploy-steps li.is-complete > span::after {
  content: "✓";
  position: absolute;
  top: -3px;
  left: 3px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.deploy-steps li.is-complete::before,
.deploy-steps li.is-current::before {
  background: var(--mint);
}

@keyframes pulse-dot {
  50% { transform: scale(0.82); }
}

.success-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(30px, 6vw, 80px);
  align-items: center;
  max-width: 950px;
  margin: 35px auto 0;
}

.celebration-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 17px;
  padding: 7px 12px;
  color: var(--ink);
  background: var(--lemon);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  transform: rotate(-2deg);
}

.celebration-badge span {
  color: var(--coral);
}

.success-copy h2 {
  font-size: clamp(2.8rem, 6vw, 5.7rem);
}

.success-copy > p strong {
  color: var(--coral-dark);
}

.public-link {
  position: relative;
  display: grid;
  gap: 5px;
  margin-top: 28px;
  padding: 14px 78px 14px 16px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 13px;
  box-shadow: 4px 5px 0 var(--sky);
}

.public-link span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.public-link strong {
  overflow: hidden;
  color: var(--blue);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-link button {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: 55px;
  color: white;
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 28px;
}

.qr-ticket {
  position: relative;
  padding: 25px;
  text-align: center;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 17px;
  box-shadow: 9px 10px 0 var(--ink);
  transform: rotate(2.5deg);
}

.qr-ticket::before,
.qr-ticket::after {
  content: "";
  position: absolute;
  top: 44%;
  width: 22px;
  height: 22px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.qr-ticket::before { left: -14px; }
.qr-ticket::after { right: -14px; }

.qr-ticket > span {
  display: block;
  margin-bottom: 15px;
  color: var(--coral-dark);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.qr-ticket img {
  display: block;
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 8px;
}

.qr-ticket strong {
  display: block;
  margin-top: 13px;
  font: 900 1.25rem var(--display);
  letter-spacing: 0.16em;
}

.qr-ticket button {
  margin-top: 13px;
  padding: 7px 10px;
  color: var(--blue);
  background: transparent;
  border: 0;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti i {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 18px;
  border: 1px solid var(--ink);
  animation: confetti-fall 3.5s linear forwards;
}

@keyframes confetti-fall {
  to { transform: translateY(750px) rotate(720deg); }
}

.toast {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 24px;
  max-width: min(390px, calc(100vw - 48px));
  padding: 14px 18px;
  color: white;
  background: var(--ink);
  border: 2px solid white;
  border-radius: 13px;
  box-shadow: 5px 6px 0 var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: 220ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: var(--coral-dark);
  box-shadow: 5px 6px 0 var(--ink);
}

.help-dialog {
  width: min(440px, calc(100% - 36px));
  padding: 38px;
  color: var(--ink);
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 10px 11px 0 var(--ink);
  text-align: center;
}

.help-dialog::backdrop {
  background: rgba(21, 33, 59, 0.55);
  backdrop-filter: blur(5px);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 35px;
  height: 35px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
}

.dialog-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 17px;
  color: var(--ink);
  background: var(--mango);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 4px 5px 0 var(--ink);
  font-size: 2rem;
}

.help-dialog h2 {
  margin: 0;
  font: 900 1.8rem var(--display);
}

.help-dialog p {
  color: var(--muted);
  line-height: 1.7;
}

.example-code {
  margin: 20px 0;
  padding: 15px;
  background: white;
  border: 2px dashed var(--ink);
  border-radius: 12px;
  font: 900 1.45rem var(--display);
  letter-spacing: 0.12em;
}

.dialog-confirm {
  margin: 0 auto;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1050px) {
  .decorative-launch,
  .identity-card {
    opacity: 0.22;
    right: 20px;
  }

  .panel-copy,
  .focus-form,
  .stack-form {
    max-width: 630px;
  }

  .project-fields {
    grid-template-columns: 1fr 0.7fr;
  }

  .description-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .site-header {
    width: calc(100% - 28px);
    height: 78px;
  }

  .sound-toggle {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
    min-height: calc(100vh - 96px);
    margin-bottom: 20px;
    border-radius: 22px;
    box-shadow: 5px 6px 0 var(--ink);
  }

  .mission-rail {
    padding: 18px;
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }

  .rail-eyebrow,
  .mission-rail h1,
  .rail-intro,
  .rail-tip {
    display: none;
  }

  .step-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }

  .step-list li {
    display: block;
    padding: 8px 4px;
    text-align: center;
  }

  .step-list li > span {
    width: 30px;
    height: 30px;
    margin: 0 auto;
  }

  .step-list div {
    display: none;
  }

  .workspace {
    min-height: 660px;
    padding: 22px;
  }

  .panel {
    min-height: 550px;
    padding: 45px 0 40px;
  }

  .panel-wide {
    padding-top: 32px;
  }

  .decorative-launch,
  .identity-card {
    display: none;
  }

  .inline-copy {
    display: block;
  }

  .inline-copy p {
    margin-top: 12px;
  }

  .inspection-layout {
    grid-template-columns: 1fr;
  }

  .preview-card {
    height: 390px;
  }

  .success-layout {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .qr-ticket {
    width: min(270px, 90%);
    margin: 0 auto 30px;
  }
}

@media (max-width: 580px) {
  .brand small {
    display: none;
  }

  .teacher-link {
    padding: 0 11px;
  }

  .workspace {
    padding: 17px;
  }

  .workspace-topline {
    align-items: flex-start;
    gap: 10px;
  }

  .class-chip {
    max-width: 68%;
    border-radius: 12px;
  }

  .panel-copy h2,
  .success-copy h2 {
    font-size: 2.35rem;
  }

  .code-field input {
    height: 72px;
    padding: 0 18px;
    font-size: 1.75rem;
  }

  .project-fields {
    grid-template-columns: 1fr;
  }

  .description-field {
    grid-column: auto;
  }

  .drop-zone {
    min-height: 300px;
    padding: 20px 12px;
  }

  .drop-actions {
    flex-direction: column;
  }

  .upload-footer {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 18px;
  }

  .upload-footer .primary-button {
    width: 100%;
  }

  .upload-footer .text-button {
    margin: 0 auto;
  }

  .inspection-footer {
    flex-direction: column-reverse;
  }

  .inspection-footer .secondary-button {
    width: 100%;
  }

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

  .preview-card {
    height: 330px;
  }

  .deploy-steps {
    grid-template-columns: 1fr;
    width: 240px;
    gap: 13px;
  }

  .deploy-steps li {
    min-height: 30px;
    padding: 5px 0 0 44px;
    text-align: left;
  }

  .deploy-steps li::before {
    top: -21px;
    right: auto;
    bottom: auto;
    left: 11px;
    width: 3px;
    height: 28px;
  }

  .deploy-steps li > span {
    top: 0;
    left: 0;
  }

  .success-actions {
    display: grid;
  }

  .success-actions > * {
    width: 100%;
  }

  .request-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
