/* Login and registration only: midnight study hall, independent of the signed-in legacy workspace. */
.page-shell:has(#auth-intro:not([hidden])) {
  --auth-gutter: clamp(18px, 4vw, 68px);
  --auth-ink: #eaf1fa;
  --auth-muted: #aebdd0;
  --auth-night: #071425;
  --auth-blue: #102641;
  --auth-gold: #e2bd68;
  width: 100%;
  max-width: 1580px;
  margin: 0 auto;
  padding: 0 var(--auth-gutter);
  color: var(--auth-ink);
}

body:has(#auth-intro:not([hidden])) {
  min-height: 100vh;
  overflow-x: hidden;
  color: #eaf1fa;
  background:
    radial-gradient(ellipse at 76% 22%, rgba(38, 92, 137, .30), transparent 31%),
    radial-gradient(ellipse at 12% 84%, rgba(20, 68, 104, .26), transparent 34%),
    linear-gradient(135deg, #071321 0%, #0c1d32 51%, #07111f 100%);
}

body:has(#auth-intro:not([hidden])):before {
  position: fixed;
  z-index: 0;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(170, 198, 224, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170, 198, 224, .055) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 88%);
}

.page-shell:has(#auth-intro:not([hidden])) > .topbar {
  position: relative;
  z-index: 1;
  left: 50%;
  width: 100vw;
  min-height: 68px;
  height: 68px;
  margin: 0;
  padding: 0 clamp(var(--auth-gutter), calc((100vw - 1580px) / 2 + var(--auth-gutter)), 225px);
  transform: translateX(-50%);
  border-bottom: 1px solid rgba(226, 189, 104, .78);
  background: linear-gradient(105deg, rgba(7, 19, 33, .96), rgba(17, 42, 68, .96) 56%, rgba(8, 21, 36, .97));
  color: #eaf1fa;
  box-shadow: 0 10px 35px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .06);
  backdrop-filter: blur(16px);
}

.page-shell:has(#auth-intro:not([hidden])) .brand-mark {
  width: auto;
  height: auto;
  padding: 6px 0;
  border-radius: 0;
  background: transparent;
  color: #f0ca71;
  font: 800 14px/1 "Segoe UI", "Microsoft YaHei UI", sans-serif;
  letter-spacing: .16em;
  text-shadow: 0 0 18px rgba(240, 202, 113, .28);
  box-shadow: none;
}

.page-shell:has(#auth-intro:not([hidden])) .brand-copy strong {
  color: #f5f7fa;
  font-size: 16px;
  letter-spacing: .04em;
}

.page-shell:has(#auth-intro:not([hidden])) .brand-copy small {
  color: #9fb1c6;
  letter-spacing: .025em;
}

.page-shell:has(#auth-intro:not([hidden])) .top-meta {
  color: #c2d2e4;
  font-size: 11px;
  letter-spacing: .04em;
}

.page-shell:has(#auth-intro:not([hidden])) .online-dot {
  background: #80c5a4;
  box-shadow: 0 0 0 4px rgba(128, 197, 164, .12), 0 0 15px rgba(128, 197, 164, .5);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  min-height: 236px;
  margin: 0;
  padding: clamp(43px, 5vw, 68px) 0 26px;
  overflow-x: clip;
  color: var(--auth-ink);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro:after {
  position: absolute;
  z-index: -1;
  top: 12%;
  right: -25%;
  width: min(46vw, 620px);
  height: 220px;
  content: "";
  pointer-events: none;
  opacity: .6;
  background:
    radial-gradient(ellipse at 68% 52%, rgba(77, 137, 181, .22), transparent 52%),
    radial-gradient(ellipse at 42% 51%, rgba(218, 180, 100, .09), transparent 59%);
  filter: blur(4px);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro .eyebrow,
.page-shell:has(#auth-intro:not([hidden])) #auth-intro .eyebrow span {
  color: #e3bd68;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro .eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 9px;
  letter-spacing: .22em;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro .eyebrow i {
  color: #7791ad;
  font-style: normal;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 {
  max-width: 920px;
  margin: 16px 0 10px;
  color: #f1f5fb;
  font: 500 clamp(36px, 4vw, 52px)/1.22 "Iowan Old Style", Georgia, "Songti SC", serif;
  letter-spacing: .03em;
  text-shadow: 0 7px 32px rgba(0, 0, 0, .2);
  overflow-wrap: anywhere;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 em {
  color: #e6c573;
  font-style: normal;
  text-shadow: 0 0 28px rgba(226, 189, 104, .19);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro > p {
  max-width: 700px;
  margin: 0;
  color: #afc0d3;
  font: 13px/1.85 "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro .notice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-top: 16px;
  padding: 8px 11px;
  border: 1px solid rgba(226, 189, 104, .25);
  border-radius: 7px;
  background: rgba(226, 189, 104, .075);
  color: #c9d1da;
  font-size: 10px;
  line-height: 1.6;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro .notice strong {
  color: #e9cb83;
  font-weight: 700;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro .notice-icon {
  display: grid;
  flex: 0 0 17px;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(226, 189, 104, .19);
  color: #edce82;
  font: 700 10px/1 Georgia, serif;
}

.page-shell:has(#auth-intro:not([hidden])) .workspace {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, .9fr);
  gap: 22px;
  align-items: stretch;
  margin: 0 0 35px;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card {
  min-width: 0;
  min-height: 486px;
  padding: 32px clamp(24px, 3vw, 42px) 24px;
  border: 1px solid rgba(255, 255, 255, .76);
  border-top: 3px solid #e2bd68;
  border-radius: 13px;
  background:
    radial-gradient(ellipse at 93% 0, rgba(229, 213, 174, .24), transparent 34%),
    linear-gradient(145deg, #fffefa 0%, #f5f8fb 100%);
  color: #20344b;
  box-shadow: 0 24px 68px rgba(0, 0, 0, .27), inset 0 1px #fff;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .section-kicker {
  color: #9a7734;
  letter-spacing: .18em;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .card-heading h2 {
  margin-top: 7px;
  color: #18314d;
  font-size: 25px;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .step-mark span {
  background: #e4e8ed;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .step-mark .step-active {
  background: linear-gradient(90deg, #d7a94c, #f0d58b);
  box-shadow: 0 0 12px rgba(214, 169, 76, .25);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .tabs {
  border-color: #d9e1e9;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .tab {
  color: #728198;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .tab.active {
  color: #17314f;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .tab.active:after {
  height: 3px;
  background: #d3a64d;
  box-shadow: 0 0 12px rgba(211, 166, 77, .25);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card label {
  color: #344b65;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card input {
  min-height: 46px;
  border-color: #ccd7e3;
  border-radius: 7px;
  background: rgba(255, 255, 255, .9);
  color: #182f49;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card input:focus {
  border-color: #c89e45;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(200, 158, 69, .14), 0 7px 22px rgba(25, 49, 76, .08);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .hint,
.page-shell:has(#auth-intro:not([hidden])) #auth-card .card-foot {
  color: #718198;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-submit {
  min-height: 49px;
  margin-top: 22px;
  border: 1px solid #f2d486;
  border-bottom: 3px solid #a97620;
  border-radius: 7px;
  background: linear-gradient(105deg, #f0d184, #d9ad50 52%, #c89232);
  color: #13263d;
  box-shadow: 0 9px 22px rgba(169, 119, 33, .22), inset 0 1px rgba(255, 255, 255, .45);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 750;
  transition: transform .18s, box-shadow .18s, filter .18s;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .account-type-options {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 12px 0 4px;
  padding: 10px 12px;
  border: 1px solid #d9dfd8;
  border-radius: 8px;
  background: #f8f7f0;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .account-type-options[hidden] { display: none !important; }
.page-shell:has(#auth-intro:not([hidden])) #auth-card .account-type-options legend { padding: 0 5px; color: #536b70; font-size: 12px; font-weight: 700; }
.page-shell:has(#auth-intro:not([hidden])) #auth-card .account-type-options label { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: #314b56; font-size: 13px; cursor: pointer; }
.page-shell:has(#auth-intro:not([hidden])) #auth-card .account-type-options input[type="radio"] { width: 16px; height: 16px; min-height: 16px; margin: 0; accent-color: #b5872b; }
.learning-nav [data-home-module="teacher"][hidden] { display: none !important; }

.page-shell:has(#auth-intro:not([hidden])) #auth-submit:hover {
  transform: translateY(-2px);
  filter: saturate(1.08) brightness(1.04);
  box-shadow: 0 13px 26px rgba(169, 119, 33, .28), inset 0 1px rgba(255, 255, 255, .5);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-submit:focus-visible,
.page-shell:has(#auth-intro:not([hidden])) #auth-card .tab:focus-visible {
  outline: 3px solid rgba(217, 174, 83, .65);
  outline-offset: 3px;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .card-foot {
  border-color: #dfe5eb;
}

.page-shell:has(#auth-intro:not([hidden])) .side-note {
  position: relative;
  min-width: 0;
  min-height: 486px;
  padding: 33px clamp(23px, 2.6vw, 36px) 24px;
  overflow: hidden;
  border: 1px solid rgba(116, 157, 196, .28);
  border-bottom: 3px solid #d5af5c;
  border-radius: 13px;
  background:
    radial-gradient(ellipse at 83% 44%, rgba(43, 97, 143, .45), transparent 48%),
    linear-gradient(148deg, #183653 0%, #102943 52%, #0b1d31 100%);
  color: #eef4fa;
  box-shadow: 0 24px 68px rgba(0, 0, 0, .25), inset 0 1px rgba(255, 255, 255, .1);
  isolation: isolate;
}

.page-shell:has(#auth-intro:not([hidden])) .side-note:before {
  position: absolute;
  z-index: -1;
  top: 11%;
  right: -24%;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(226, 189, 104, .28);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 22px rgba(226, 189, 104, .045), 0 0 0 48px rgba(226, 189, 104, .03), 0 0 65px rgba(77, 142, 190, .14);
}

.page-shell:has(#auth-intro:not([hidden])) .auth-book-scene {
  position: absolute;
  z-index: -1;
  top: 20%;
  right: 0;
  width: 54%;
  height: 53%;
  pointer-events: none;
  perspective: 550px;
}

.page-shell:has(#auth-intro:not([hidden])) .scene-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 186px;
  height: 186px;
  border: 1px solid rgba(226, 189, 104, .24);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(226, 189, 104, .025), 0 0 0 39px rgba(226, 189, 104, .018);
  transform: translate(-50%, -50%);
}

.page-shell:has(#auth-intro:not([hidden])) .scene-book {
  position: absolute;
  top: 53%;
  left: 52%;
  width: 142px;
  height: 91px;
  transform: translate(-50%, -50%) rotateX(52deg) rotateZ(-8deg);
  filter: drop-shadow(0 22px 15px rgba(0, 0, 0, .35));
  animation: auth-book-float 5s ease-in-out infinite;
}

.page-shell:has(#auth-intro:not([hidden])) .scene-book:before,
.page-shell:has(#auth-intro:not([hidden])) .scene-book:after {
  position: absolute;
  top: 0;
  width: 68px;
  height: 66px;
  border: 1px solid rgba(255, 243, 204, .55);
  border-radius: 5px 9px 3px 5px;
  background: repeating-linear-gradient(0deg, rgba(246, 235, 202, .95) 0 3px, #dfc990 4px 5px);
  content: "";
}

.page-shell:has(#auth-intro:not([hidden])) .scene-book:before {
  left: 2px;
  transform: skewY(5deg) rotateY(-18deg);
}

.page-shell:has(#auth-intro:not([hidden])) .scene-book:after {
  right: 2px;
  transform: skewY(-5deg) rotateY(18deg);
}

.page-shell:has(#auth-intro:not([hidden])) .scene-book i {
  position: absolute;
  z-index: 1;
  bottom: 7px;
  left: 3px;
  width: 66px;
  height: 7px;
  border-radius: 0 0 0 4px;
  background: linear-gradient(90deg, #c2974d, #f0d890);
  transform: rotate(2deg);
}

.page-shell:has(#auth-intro:not([hidden])) .scene-book i:nth-child(2) {
  right: 3px;
  left: auto;
  transform: rotate(-2deg);
}

.page-shell:has(#auth-intro:not([hidden])) .scene-book b {
  position: absolute;
  z-index: 2;
  top: 1px;
  left: 50%;
  width: 5px;
  height: 71px;
  border-radius: 4px;
  background: linear-gradient(90deg, #8d632e, #f1d282, #a77c3a);
  transform: translateX(-50%);
}

.page-shell:has(#auth-intro:not([hidden])) .scene-word {
  position: absolute;
  display: block;
  padding: 5px 9px;
  border: 1px solid rgba(225, 237, 249, .16);
  border-radius: 5px;
  background: rgba(8, 24, 41, .46);
  color: rgba(218, 231, 244, .75);
  font: italic 12px Georgia, serif;
  letter-spacing: .06em;
  transform: rotate(-9deg);
}

.page-shell:has(#auth-intro:not([hidden])) .scene-word-one { top: 6%; left: 5%; }
.page-shell:has(#auth-intro:not([hidden])) .scene-word-two { right: 0; bottom: 9%; transform: rotate(7deg); }
.page-shell:has(#auth-intro:not([hidden])) .scene-spark { position: absolute; color: #f2d182; text-shadow: 0 0 15px rgba(242, 209, 130, .65); }
.page-shell:has(#auth-intro:not([hidden])) .scene-spark-one { top: 7%; right: 22%; font-size: 14px; }
.page-shell:has(#auth-intro:not([hidden])) .scene-spark-two { top: 28%; left: 11%; font-size: 24px; }

.page-shell:has(#auth-intro:not([hidden])) .side-number {
  position: relative;
  z-index: 1;
  color: #e9c46f;
  font-size: 48px;
  text-shadow: 0 0 22px rgba(226, 189, 104, .2);
}

.page-shell:has(#auth-intro:not([hidden])) .side-number span {
  color: #aebfd2;
}

.page-shell:has(#auth-intro:not([hidden])) .side-note h3 {
  z-index: 1;
  max-width: 62%;
  margin-top: 27px;
  color: #f5f1e7;
  font-size: 23px;
}

.page-shell:has(#auth-intro:not([hidden])) .side-note > p {
  z-index: 1;
  max-width: 64%;
  color: #bdccdc;
  font-size: 11px;
  line-height: 1.9;
}

.page-shell:has(#auth-intro:not([hidden])) .side-rule {
  z-index: 1;
  background: linear-gradient(90deg, #f0cf7c, rgba(240, 207, 124, .15));
}

.page-shell:has(#auth-intro:not([hidden])) .side-stat {
  z-index: 1;
  max-width: 70%;
}

.page-shell:has(#auth-intro:not([hidden])) .stat-icon {
  border-color: rgba(226, 189, 104, .48);
  background: rgba(226, 189, 104, .07);
  color: #e8c773;
}

.page-shell:has(#auth-intro:not([hidden])) .side-stat small,
.page-shell:has(#auth-intro:not([hidden])) .side-bottom {
  color: #aebfd2;
}

.page-shell:has(#auth-intro:not([hidden])) > .footer {
  position: relative;
  z-index: 1;
  border-color: rgba(173, 196, 220, .15);
  color: #8fa3ba;
}

@keyframes auth-book-float {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -7px; }
}

@media (max-width: 900px) {
  .page-shell:has(#auth-intro:not([hidden])) .workspace {
    grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr);
    gap: 15px;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-card,
  .page-shell:has(#auth-intro:not([hidden])) .side-note {
    min-height: 472px;
  }

  .page-shell:has(#auth-intro:not([hidden])) .side-note {
    padding-right: 20px;
    padding-left: 22px;
  }
}

@media (max-width: 760px) {
  .page-shell:has(#auth-intro:not([hidden])) {
    --auth-gutter: clamp(16px, 4.5vw, 28px);
  }

  .page-shell:has(#auth-intro:not([hidden])) > .topbar {
    min-height: 60px;
    height: 60px;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-intro {
    min-height: 0;
    padding: 35px 0 23px;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-intro:after {
    top: 20%;
    right: -36%;
    width: 90vw;
    height: 170px;
    opacity: .42;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 {
    max-width: 100%;
    font-size: clamp(30px, 7vw, 39px);
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-intro .notice {
    align-items: flex-start;
    font-size: 10px;
  }

  .page-shell:has(#auth-intro:not([hidden])) .workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 24px;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-card {
    min-height: 0;
    padding: 26px clamp(18px, 5vw, 28px) 21px;
  }

  .page-shell:has(#auth-intro:not([hidden])) .side-note {
    min-height: 270px;
    padding: 24px;
  }

  .page-shell:has(#auth-intro:not([hidden])) .side-note h3 {
    margin-top: 16px;
  }

  .page-shell:has(#auth-intro:not([hidden])) .auth-book-scene {
    top: 18%;
    right: -3%;
    width: 49%;
    height: 64%;
    opacity: .68;
  }

  .page-shell:has(#auth-intro:not([hidden])) > .footer {
    flex-wrap: wrap;
    gap: 9px 16px;
  }
}

@media (max-width: 420px) {
  .page-shell:has(#auth-intro:not([hidden])) {
    --auth-gutter: 16px;
  }

  .page-shell:has(#auth-intro:not([hidden])) > .topbar {
    gap: 8px;
  }

  .page-shell:has(#auth-intro:not([hidden])) .brand-copy small {
    display: none;
  }

  .page-shell:has(#auth-intro:not([hidden])) .top-meta {
    max-width: 126px;
    font-size: 9px;
    line-height: 1.4;
    text-align: right;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-card .tabs {
    gap: 18px;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-card .card-heading h2 {
    font-size: 22px;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-card .card-foot {
    font-size: 10px;
  }

  .page-shell:has(#auth-intro:not([hidden])) .side-note > p,
  .page-shell:has(#auth-intro:not([hidden])) .side-stat {
    max-width: 76%;
  }

  .page-shell:has(#auth-intro:not([hidden])) .scene-orbit {
    width: 145px;
    height: 145px;
  }

  .page-shell:has(#auth-intro:not([hidden])) .scene-book {
    transform: translate(-50%, -50%) scale(.78) rotateX(52deg) rotateZ(-8deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-shell:has(#auth-intro:not([hidden])) .scene-book {
    animation: none;
  }
}

/* Login refresh: reuse the public homepage classroom art and keep the form compact. */
body:has(#auth-intro:not([hidden])) {
  color: #173244;
  background:
    linear-gradient(90deg, rgba(249, 247, 238, .90) 0%, rgba(248, 246, 236, .79) 42%, rgba(12, 43, 40, .18) 100%) center / cover no-repeat fixed,
    url("auth-homepage-classroom.png") 58% 48% / cover no-repeat fixed !important;
}

body:has(#auth-intro:not([hidden])):before {
  display: none;
}

.page-shell:has(#auth-intro:not([hidden])) {
  --auth-gutter: clamp(22px, 5vw, 82px);
  --auth-ink: #183849;
  --auth-muted: #425e66;
  width: 100%;
  max-width: 1640px;
  color: var(--auth-ink);
}

.page-shell:has(#auth-intro:not([hidden])) main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  grid-template-rows: 1fr;
  align-items: center;
  column-gap: clamp(34px, 6vw, 104px);
  width: 100%;
  min-height: calc(100vh - 68px);
  max-width: 1450px;
  margin: 0 auto;
  padding: clamp(28px, 5vh, 68px) var(--auth-gutter);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  max-width: 690px;
  min-height: 0;
  padding: 0;
  color: #183849;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro:after {
  display: none;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro .eyebrow,
.page-shell:has(#auth-intro:not([hidden])) #auth-intro .eyebrow span {
  color: #8c6827;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 {
  max-width: 660px;
  margin: 20px 0 16px;
  color: #163847;
  font-size: clamp(38px, 4.15vw, 62px);
  line-height: 1.24;
  text-shadow: 0 1px rgba(255, 255, 255, .35);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 em {
  display: inline;
  color: #a86f18;
  text-shadow: none;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro > p {
  max-width: 570px;
  color: #38545d;
  font-size: 15px;
  line-height: 1.9;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro .notice {
  margin-top: 21px;
  border-color: rgba(146, 111, 49, .34);
  background: rgba(255, 250, 235, .88);
  color: #5c4b2d;
  font-size: 12px;
  box-shadow: 0 5px 18px rgba(44, 51, 37, .08);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro .notice strong {
  color: #79551d;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro .notice-icon {
  background: #ead49d;
  color: #614a18;
}

.page-shell:has(#auth-intro:not([hidden])) .workspace {
  display: block;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 440px;
  margin: 0;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card {
  width: 100%;
  min-height: 0;
  padding: 21px 27px 15px;
  border: 1px solid rgba(110, 105, 82, .2);
  border-top: 3px solid #d7ad4b;
  border-radius: 13px;
  background: rgba(255, 254, 249, .97);
  color: #20394a;
  box-shadow: 0 18px 48px rgba(21, 43, 39, .2), inset 0 1px #fff;
  backdrop-filter: blur(8px);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .card-heading h2 {
  color: #19394b;
  font-size: 23px;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .section-kicker {
  color: #77551c;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .tabs {
  gap: 22px;
  margin: 14px 0 11px;
  border-color: #d5dedb;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .tab {
  padding-bottom: 9px;
  color: #596e73;
  font-size: 13px;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .tab.active {
  color: #173f36;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card label {
  margin: 10px 0 5px;
  color: #314b56;
  font-size: 12px;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card input {
  height: 40px;
  min-height: 40px;
  border-color: #b8c8c9;
  background: #fff;
  color: #183849;
  font-size: 14px;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card input::placeholder {
  color: #687b80;
  opacity: 1;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .hint,
.page-shell:has(#auth-intro:not([hidden])) #auth-card .card-foot {
  color: #536b70;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .hint {
  margin-top: 4px;
  color: #4a6268;
  font-size: 12px;
  line-height: 1.45;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .message:empty {
  display: none;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-card .card-foot {
  margin-top: 10px;
  padding-top: 11px;
  font-size: 12px;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-submit {
  height: 41px;
  min-height: 41px;
  margin-top: 12px;
  border: 1px solid #c18a2c;
  background: linear-gradient(135deg, #edc766, #d39b32);
  color: #172d35;
  box-shadow: 0 5px 0 #a97825, 0 10px 22px rgba(133, 91, 25, .18);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-submit:hover {
  background: linear-gradient(135deg, #f3d681, #dfa940);
}

.page-shell:has(#auth-intro:not([hidden])) .side-note {
  display: none !important;
}

.page-shell:has(#auth-intro:not([hidden])) > .footer {
  color: #36545c;
}

@media (max-width: 1020px) {
  .page-shell:has(#auth-intro:not([hidden])) main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: start;
    row-gap: 27px;
    min-height: 0;
    padding-top: 42px;
    padding-bottom: 32px;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-intro {
    grid-column: 1;
    grid-row: 1;
  }

  .page-shell:has(#auth-intro:not([hidden])) .workspace {
    grid-column: 1;
    grid-row: 2;
    max-width: 520px;
    margin: 0 auto;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 {
    font-size: clamp(38px, 5vw, 48px);
  }
}

@media (max-width: 760px) {
  body:has(#auth-intro:not([hidden])) {
    background:
      linear-gradient(180deg, rgba(249, 247, 238, .83) 0%, rgba(249, 247, 238, .91) 54%, rgba(249, 247, 238, .96) 100%) center / cover no-repeat scroll,
      url("auth-homepage-classroom.png") 58% center / cover no-repeat scroll !important;
  }

  .page-shell:has(#auth-intro:not([hidden])) main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: start;
    row-gap: 24px;
    min-height: 0;
    padding-top: 34px;
    padding-bottom: 28px;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-intro {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 {
    margin: 14px 0 10px;
    font-size: clamp(34px, 7vw, 46px);
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-intro > p {
    font-size: 14px;
  }

  .page-shell:has(#auth-intro:not([hidden])) .workspace {
    grid-column: 1;
    grid-row: 2;
    max-width: 520px;
    margin: 0 auto;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-card {
    padding: 21px clamp(19px, 5vw, 28px) 15px;
  }
}

@media (max-width: 420px) {
  .page-shell:has(#auth-intro:not([hidden])) main {
    row-gap: 19px;
    padding-top: 26px;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 {
    font-size: 33px;
  }

  .page-shell:has(#auth-intro:not([hidden])) #auth-intro .notice {
    padding: 8px 9px;
    font-size: 11px;
  }
}

/* Branded greeting: restrained metallic gold with a moving highlight. */
.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .16em;
  max-width: 690px;
  margin: 20px 0 16px;
  font-family: "Iowan Old Style", "Songti SC", Georgia, serif;
  font-size: clamp(54px, 5.2vw, 70px);
  font-weight: 750;
  letter-spacing: .035em;
  line-height: 1.14;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .75), 0 4px 15px rgba(106, 74, 14, .16);
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 .auth-title-name,
.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 .auth-title-greeting {
  color: #8c5a09;
  background: linear-gradient(108deg, #754609 0%, #a56a09 18%, #d59d20 32%, #f0c956 44%, #fff0b7 48%, #ce9418 56%, #f6d36c 69%, #a86d0c 82%, #e7b83b 94%, #754609 100%);
  background-size: 240% 100%;
  background-position: 100% 50%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .5px rgba(104, 62, 0, .52);
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .56)) drop-shadow(0 2px 1px rgba(99, 61, 5, .34)) drop-shadow(0 4px 7px rgba(111, 75, 8, .18));
  animation: auth-gold-sheen 5.5s ease-in-out infinite;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 .auth-title-name {
  letter-spacing: .015em;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 .auth-title-greeting {
  white-space: nowrap;
  animation-delay: .28s;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 .auth-title-spark {
  position: relative;
  top: -.72em;
  margin-left: -.12em;
  color: #c18b1c;
  font: 700 .3em/1 Georgia, serif;
  text-shadow: 0 0 5px rgba(255, 218, 111, .9), 0 0 13px rgba(184, 129, 18, .55);
  animation: auth-title-twinkle 2.8s ease-in-out infinite;
}

@keyframes auth-gold-sheen {
  0%, 20% { background-position: 100% 50%; }
  68%, 100% { background-position: 0% 50%; }
}

@keyframes auth-title-twinkle {
  0%, 100% { opacity: .68; transform: scale(.82) rotate(-8deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(8deg); }
}

@media (max-width: 1020px) {
  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 {
    font-size: clamp(48px, 6.6vw, 62px);
  }
}

@media (max-width: 760px) {
  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 {
    margin: 14px 0 10px;
    font-size: clamp(38px, 10vw, 48px);
  }
}

@media (max-width: 420px) {
  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 {
    font-size: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 .auth-title-name,
  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 .auth-title-greeting,
  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1 .auth-title-spark {
    animation: none;
  }
}

/* Login motivation headline deployed 2026-10-10. */
.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1.auth-motivation {
  display: block;
  max-width: 690px;
  margin: 20px 0 16px;
  color: #12384a;
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: #12384a;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: clamp(26px, 3.15vw, 42px);
  font-weight: 800;
  letter-spacing: .025em;
  line-height: 1.48;
  text-shadow: none;
  filter: none;
  animation: none;
}
.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1.auth-motivation span { display: block; }
@media (max-width: 760px) {
  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1.auth-motivation {
    margin: 14px 0 10px;
    font-size: clamp(24px, 5.5vw, 34px);
  }
}

/* Login motivation headline: calligraphic ink, editorial line breaks, no glow. */
.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1.auth-motivation {
  display: block;
  max-width: 720px;
  margin: 0;
  padding: 2px 0 2px 22px;
  border-left: 3px solid #c69a55;
  color: #173d4b;
  font-family: "STXingkai", "华文行楷", "KaiTi", "楷体", "FangSong", "仿宋", serif;
  font-size: clamp(28px, 2.8vw, 36px);
  font-weight: 500;
  letter-spacing: .055em;
  line-height: 1.52;
  text-shadow: none;
  filter: none;
  animation: none;
  overflow-wrap: normal;
  text-wrap: balance;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1.auth-motivation > span {
  display: block;
}

.page-shell:has(#auth-intro:not([hidden])) #auth-intro h1.auth-motivation > .auth-motivation-question {
  margin-top: 14px;
  color: #526b72;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: .68em;
  font-weight: 600;
  letter-spacing: .045em;
  line-height: 1.6;
}

@media (max-width: 1020px) {
  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1.auth-motivation {
    font-size: clamp(27px, 3.5vw, 34px);
  }
}

@media (max-width: 760px) {
  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1.auth-motivation {
    max-width: 100%;
    padding-left: 16px;
    font-size: clamp(23px, 6vw, 30px);
    line-height: 1.58;
  }
}

@media (max-width: 420px) {
  .page-shell:has(#auth-intro:not([hidden])) #auth-intro h1.auth-motivation {
    font-size: 23px;
  }
}

/* Pending account activation, adapted from the legacy payment application page. */
.activation-panel{margin-top:18px;padding:22px;border:1px solid #e2d7bc;border-radius:13px;background:linear-gradient(145deg,#fffdf8,#f7f2e6);color:#243247;box-shadow:0 14px 32px rgba(25,39,54,.12)}
.activation-panel[hidden]{display:none!important}
.activation-intro{text-align:center;margin-bottom:19px}
.activation-kicker{display:block;color:#9b731d;font-size:9px;font-weight:800;letter-spacing:.2em}
.activation-intro h2{margin:7px 0;color:#1c2e44;font-family:Georgia,"Noto Serif SC",serif;font-size:25px}
.activation-intro p{margin:0;color:#66758a;font-size:13px}
.activation-intro p strong{color:#bd7900;font-size:15px}
.activation-content{display:grid;grid-template-columns:minmax(185px, .8fr) minmax(250px,1.2fr);gap:20px;align-items:start}
.activation-qr-card{display:flex;flex-direction:column;align-items:center;gap:10px;padding:15px 12px;border:1px solid #e2d5b8;border-radius:11px;background:#fff;text-align:center}
.activation-qr-heading{color:#04a75b;font-size:14px;font-weight:800}
.activation-qr-card img{display:block;width:min(100%,210px);height:auto;border-radius:5px}
.activation-qr-card>strong{color:#526174;font-size:12px}
.activation-request{min-width:0;padding:6px 2px}
.activation-account-line{margin:0 0 16px;color:#66758a;font-size:12px}
.activation-account-line strong{color:#233b55}
.activation-request form{display:grid;gap:8px}
.activation-request label{color:#304359;font-size:12px;font-weight:750}
.activation-request input{width:100%;min-height:43px;border:1px solid #d4c8ad;border-radius:7px;background:#fff;padding:9px 12px;color:#233b55;font:inherit;font-size:15px;letter-spacing:.06em}
.activation-request input:focus{outline:3px solid rgba(207,158,50,.22);border-color:#bb8a20}
.activation-request small{color:#718095;font-size:11px;line-height:1.55}
.activation-request .button{margin-top:6px;min-height:46px;font-weight:750}
.activation-steps{margin-top:15px;padding:12px 14px;border:1px solid #e8d09a;background:#fffaf0;color:#665333;font-size:12px;line-height:1.7}
.activation-steps strong{color:#573f15}
.activation-steps ol{margin:5px 0 0;padding-left:20px}
.activation-steps b{color:#1b3b61;letter-spacing:.02em}
.activation-waiting{margin-top:13px;padding:12px;border-radius:7px;background:#edf7ef;color:#27633f;font-size:13px;font-weight:750;text-align:center}
.activation-back{display:block;margin:14px auto 0;border:0;background:transparent;color:#64748b;font:inherit;font-size:11px;text-decoration:underline;cursor:pointer}
.auth-card.is-activation #auth-card-heading,.auth-card.is-activation #auth-tabs,.auth-card.is-activation #auth-form,.auth-card.is-activation #auth-message{display:none}
@media(max-width:600px){.activation-panel{padding:17px 13px}.activation-content{grid-template-columns:1fr}.activation-qr-card img{width:min(100%,195px)}.activation-request{padding:2px}}

/* Pending activation is a focused, single-screen task. */
body.activation-active {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  color: #1d3544;
  background:
    linear-gradient(135deg, rgba(250, 248, 241, .92), rgba(247, 246, 238, .86) 52%, rgba(224, 234, 226, .78)),
    url("auth-homepage-classroom.png") center / cover no-repeat fixed;
}

.page-shell:has(#activation-panel:not([hidden])) {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 clamp(14px, 4vw, 52px);
}

.page-shell:has(#activation-panel:not([hidden])) > .topbar {
  flex: 0 0 64px;
  height: 64px;
  min-height: 64px;
  border-color: rgba(226, 189, 104, .62);
}

.page-shell:has(#activation-panel:not([hidden])) main {
  display: grid;
  flex: 1 0 auto;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  min-height: 0;
  padding: 12px 0 18px;
}

.page-shell:has(#activation-panel:not([hidden])) #auth-intro,
.page-shell:has(#activation-panel:not([hidden])) .workspace > .welcome-card,
.page-shell:has(#activation-panel:not([hidden])) .workspace > .side-note,
.page-shell:has(#activation-panel:not([hidden])) > .footer {
  display: none !important;
}

.page-shell:has(#activation-panel:not([hidden])) .workspace {
  display: block;
  width: min(100%, 560px);
  margin: 0;
}

.page-shell:has(#activation-panel:not([hidden])) #auth-card {
  min-height: 0;
  padding: clamp(16px, 3vh, 24px) clamp(17px, 4vw, 34px) 14px;
  border: 1px solid rgba(110, 105, 82, .2);
  border-top: 3px solid #d7ad4b;
  border-radius: 15px;
  background: rgba(255, 254, 249, .97);
  color: #20394a;
  box-shadow: 0 18px 48px rgba(21, 43, 39, .18), inset 0 1px #fff;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-panel {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-intro {
  margin: 0 0 13px;
  text-align: center;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-kicker {
  display: none;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-intro h2 {
  margin: 0 0 4px;
  color: #1c3444;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 25px;
  font-weight: 750;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-intro > p:not(.activation-account-line) {
  margin: 0;
  color: #526b72;
  font-size: 12px;
  line-height: 1.55;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-account-line {
  margin: 5px 0 0;
  color: #718084;
  font-size: 11px;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-account-line strong {
  color: #29485a;
  font-size: 12px;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-qr-card {
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-qr-heading {
  color: #3c6955;
  font-size: 12px;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-qr-card img {
  width: clamp(118px, 21vh, 158px);
  max-height: 21vh;
  object-fit: contain;
  border: 5px solid #fff;
  border-radius: 9px;
  box-shadow: 0 3px 15px rgba(37, 53, 44, .12);
}

.page-shell:has(#activation-panel:not([hidden])) .activation-request {
  padding: 0;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-request form {
  gap: 6px;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-request label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  color: #263f4e;
  font-size: 14px;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-request label span {
  color: #b3382d;
  font-size: 11px;
  font-weight: 750;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-request input {
  min-height: 54px;
  border: 2px solid #d8b055;
  border-radius: 9px;
  padding: 11px 14px;
  color: #163849;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: .1em;
  text-align: center;
  box-shadow: 0 2px 0 rgba(173, 130, 41, .12);
}

.page-shell:has(#activation-panel:not([hidden])) .activation-request input::placeholder {
  color: #89959a;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .02em;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-request small {
  color: #667a80;
  font-size: 11px;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-request .button {
  min-height: 46px;
  margin-top: 3px;
  font-weight: 750;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-contact {
  margin: 10px 0 0;
  color: #687a7b;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-contact b {
  color: #294c60;
  letter-spacing: .04em;
}

.page-shell:has(#activation-panel:not([hidden])) .activation-back {
  margin-top: 8px;
  color: #61747a;
}

@media (max-height: 700px) {
  .page-shell:has(#activation-panel:not([hidden])) > .topbar {
    flex-basis: 54px;
    height: 54px;
    min-height: 54px;
  }

  .page-shell:has(#activation-panel:not([hidden])) main {
    padding: 8px 0 12px;
  }

  .page-shell:has(#activation-panel:not([hidden])) #auth-card {
    padding-top: 12px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-intro {
    margin-bottom: 8px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-content {
    gap: 8px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-qr-card img {
    width: 118px;
    max-height: 18vh;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-request input {
    min-height: 48px;
  }
}

@media (max-height: 600px) {
  .page-shell:has(#activation-panel:not([hidden])) > .topbar {
    flex-basis: 48px;
    height: 48px;
    min-height: 48px;
  }

  .page-shell:has(#activation-panel:not([hidden])) main {
    padding: 2px 0 4px;
  }

  .page-shell:has(#activation-panel:not([hidden])) #auth-card {
    padding: 8px 12px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-intro {
    margin-bottom: 4px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-intro h2 {
    margin: 0;
    font-size: 22px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-intro > p:not(.activation-account-line) {
    font-size: 10px;
    line-height: 1.3;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-account-line {
    margin-top: 2px;
    font-size: 10px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-content {
    gap: 4px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-qr-card {
    gap: 2px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-qr-heading {
    font-size: 10px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-qr-card img {
    width: 102px;
    max-height: 16vh;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-request form {
    gap: 4px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-request label {
    font-size: 12px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-request input {
    min-height: 44px;
    padding: 7px 10px;
    font-size: 17px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-request small {
    font-size: 10px;
    line-height: 1.25;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-request .button {
    min-height: 40px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-contact {
    margin-top: 5px;
    font-size: 9px;
    line-height: 1.25;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-back {
    margin-top: 4px;
    font-size: 10px;
  }
}

@media (max-width: 600px) {
  .page-shell:has(#activation-panel:not([hidden])) {
    padding-right: 13px;
    padding-left: 13px;
  }

  .page-shell:has(#activation-panel:not([hidden])) .activation-contact {
    max-width: 320px;
    margin-right: auto;
    margin-left: auto;
  }
}

/* Show the high-resolution payment code as a focused scan target. The original
   poster asset stays intact; this viewport crops its center around the QR code. */
.page-shell:has(#activation-panel:not([hidden])) .activation-qr-image-frame {
  position: relative;
  flex: 0 0 auto;
  width: clamp(150px, 31vh, 220px);
  height: clamp(150px, 31vh, 220px);
  overflow: hidden;
  border: 1px solid #dce6df;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(37, 53, 44, .12);
}

.page-shell:has(#activation-panel:not([hidden])) .activation-qr-image-frame img {
  position: absolute;
  top: -86%;
  left: 50%;
  display: block;
  width: 208%;
  max-width: none;
  max-height: none;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: initial;
  transform: translateX(-50%);
}

.page-shell:has(#activation-panel.teacher-activation:not([hidden])) .activation-qr-image-frame {
  width: min(100%, 220px);
  height: auto;
  aspect-ratio: 454 / 539;
}

.page-shell:has(#activation-panel.teacher-activation:not([hidden])) .activation-qr-image-frame img {
  position: static;
  width: 100%;
  height: auto;
  max-width: 100%;
  transform: none;
  object-fit: contain;
}
