:root {
  --xiyue-blue-700: #2447d8;
  --xiyue-blue-600: #315df6;
  --xiyue-blue-500: #477ff6;
  --xiyue-blue-100: #edf2ff;
  --xiyue-blue-050: #f6f8ff;
  --xiyue-canvas: #f7f9fc;
  --xiyue-surface: #fff;
  --xiyue-ink: #172036;
  --xiyue-muted: #737d94;
  --xiyue-subtle: #98a2b3;
  --xiyue-line: #e4e9f3;
  --xiyue-success: #168e70;
  --xiyue-warning: #d98a19;
  --xiyue-danger: #e34f67;
  --xiyue-radius-sm: 8px;
  --xiyue-radius-md: 12px;
  --xiyue-radius-lg: 16px;
  --xiyue-radius-xl: 20px;
  --xiyue-radius-pill: 999px;
  --xiyue-shadow-card: 0 8px 24px rgba(45, 67, 128, 0.07);
  --xiyue-shadow-overlay: 0 20px 56px rgba(30, 45, 90, 0.16);
  --home-ink: var(--xiyue-ink);
  --home-muted: var(--xiyue-muted);
  --home-blue: var(--xiyue-blue-600);
  --home-line: rgba(43, 60, 100, 0.09);
  --home-shadow: var(--xiyue-shadow-card);
}

/* Class management and customer-service contact refinements. */
.about-us-wechat-support {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--xiyue-line, #e7ebf3);
}

.about-us-wechat-support > img {
  display: block;
  width: 154px;
  height: 154px;
  box-sizing: border-box;
  object-fit: contain;
  border: 1px solid var(--xiyue-line, #e7ebf3);
  border-radius: 12px;
  background: #fff;
}

.about-us-wechat-support > div {
  display: grid;
  gap: 8px;
}

.about-us-wechat-support strong {
  color: var(--xiyue-ink, #172033);
  font-size: 16px;
  font-weight: 820;
}

.about-us-wechat-support > div > p {
  margin: 0;
  color: var(--xiyue-muted, #7d889f);
  font-size: 11px;
  line-height: 1.7;
}

@media (min-width: 961px) {
  body[data-active-screen="login"]:has(.teacher-student-action-card) .site-desktop-header-shell,
  body[data-active-screen="login"]:has(.teacher-student-detail-heading) .site-desktop-header-shell {
    position: sticky;
    z-index: 50;
    top: 0;
    display: block;
    padding: 0 clamp(24px, 3vw, 64px);
    background: #fff;
  }

  body[data-active-screen="login"]:has(.teacher-student-action-card) .home-desktop-nav > [data-action="home-ui-home"],
  body[data-active-screen="login"]:has(.teacher-student-detail-heading) .home-desktop-nav > [data-action="home-ui-home"] {
    color: var(--xiyue-muted);
    background: transparent;
  }

  body[data-active-screen="login"]:has(.teacher-student-action-card) #home-desktop-account-trigger,
  body[data-active-screen="login"]:has(.teacher-student-detail-heading) #home-desktop-account-trigger {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="login"]:has(.teacher-student-action-card),
  body[data-active-screen="login"]:has(.teacher-student-detail-heading),
  body[data-active-screen="login"]:has(.teacher-student-action-card) .mock-app,
  body[data-active-screen="login"]:has(.teacher-student-detail-heading) .mock-app {
    color: var(--xiyue-ink);
    background: #fff;
  }

  html body[data-active-screen="login"] .login-stage:has(.teacher-student-action-card),
  html body[data-active-screen="login"] .login-stage:has(.teacher-student-detail-heading) {
    display: block;
    min-height: calc(100vh - 76px);
    box-sizing: border-box;
    padding: 34px clamp(24px, 3vw, 64px) 64px;
    background: #fff;
  }

  html body[data-active-screen="login"] .login-shell:has(.teacher-student-action-card),
  html body[data-active-screen="login"] .login-shell:has(.teacher-student-detail-heading) {
    display: block;
    width: min(1600px, 100%);
    max-width: 1600px;
    margin: 0 auto;
  }

  body[data-active-screen="login"] .login-panel:has(.teacher-student-action-card),
  body[data-active-screen="login"] .login-panel:has(.teacher-student-detail-heading) {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .login-panel:has(.teacher-student-action-card) .account-ui-heading {
    display: block;
    width: 100%;
    height: 65px;
    min-height: 65px;
    box-sizing: border-box;
    margin: 0 0 28px;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="login"] .login-panel:has(.teacher-student-action-card) .account-ui-heading > button,
  body[data-active-screen="login"] .login-panel:has(.teacher-student-action-card) .account-ui-heading p {
    display: none;
  }

  body[data-active-screen="login"] .login-panel:has(.teacher-student-action-card) .account-ui-heading h1 {
    margin: 0;
    color: var(--xiyue-ink);
    font-size: 30px;
    font-weight: 880;
    letter-spacing: -.035em;
  }

  body[data-active-screen="login"] .teacher-student-action-card,
  body[data-active-screen="login"] .teacher-student-action-card:has(.student-binding-code-box),
  body[data-active-screen="login"] .teacher-student-action-card.teacher-student-identity-required {
    height: 99px;
    min-height: 99px;
    box-sizing: border-box;
    margin: 0;
    padding: 12px 0 30px;
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .teacher-student-action-card h2,
  body[data-active-screen="login"] .teacher-student-list-card h2 {
    margin-top: 0;
    font-size: 21px;
  }

  body[data-active-screen="login"] .teacher-student-action-card > div > small,
  body[data-active-screen="login"] .teacher-student-list-card > header small,
  body[data-active-screen="login"] .login-panel:has(.teacher-student-detail-heading) .teacher-student-heading p {
    display: none;
  }

  body[data-active-screen="login"] .teacher-student-action-card p {
    color: var(--xiyue-muted);
    font-size: 11px;
  }

  body[data-active-screen="login"] .teacher-student-list-card {
    margin: 0;
    padding: 28px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .teacher-student-list-card > header {
    height: auto;
    min-height: 62px;
    padding-bottom: 18px;
    border-bottom-color: var(--xiyue-line);
  }

  body[data-active-screen="login"] .teacher-student-person-card {
    min-height: 86px;
    border-bottom-color: var(--xiyue-line);
  }

  body[data-active-screen="login"] .login-panel:has(.teacher-student-detail-heading) .teacher-student-heading {
    margin: 0 0 24px;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="login"] .login-panel:has(.teacher-student-detail-heading) .teacher-student-detail-hero {
    padding: 8px 0 28px;
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .login-panel:has(.teacher-student-detail-heading) .teacher-student-detail-tabs {
    gap: 24px;
    margin: 0 0 28px;
    padding: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .login-panel:has(.teacher-student-detail-heading) .teacher-student-detail-tabs button {
    min-height: 54px;
    flex: 0 0 auto;
    padding: 0 5px;
    border-bottom: 3px solid transparent;
    border-radius: 0;
  }

  body[data-active-screen="login"] .login-panel:has(.teacher-student-detail-heading) .teacher-student-detail-tabs button.is-active {
    color: var(--xiyue-blue-600);
    border-bottom-color: var(--xiyue-blue-600);
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .login-panel:has(.teacher-student-detail-heading) .teacher-student-detail-tabs button span {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="login"] .teacher-student-calendar-card,
  body[data-active-screen="login"] .teacher-student-day-card,
  body[data-active-screen="login"] .teacher-student-wrong-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .teacher-student-calendar-card {
    padding: 0 34px 0 0;
  }

  body[data-active-screen="login"] .teacher-student-day-card {
    padding: 0 0 0 34px;
    border-left: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="login"] .teacher-student-wrong-card {
    padding: 21px 0;
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="login"] .about-us-hero {
    display: block;
    min-height: 0;
    padding: 14px 0 30px;
  }

  body[data-active-screen="login"] .about-us-hero > div {
    max-width: 900px;
  }
}

/* Local mobile evaluation: reuse the Acrobat-style question zoom control.
   The toolbar and paper navigation remain outside the scaled content. */
@media (max-width: 960px) {
  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-controls {
    display: inline-flex;
    width: 155px;
    min-width: 155px;
    height: 40px;
    flex: 0 0 155px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-step {
    display: inline-flex;
    width: 32px;
    min-width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #697386;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-step svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-step:active:not(:disabled),
  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-step:focus-visible {
    color: #244eea;
    background: #eef3ff;
    outline: none;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-step:disabled {
    color: #b6bfd0;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-select-shell {
    position: relative;
    display: inline-flex;
    width: 78px;
    min-width: 78px;
    height: 32px;
    margin-left: 3px;
    align-items: center;
    border-bottom: 1px solid #d9deea;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-select {
    width: 100%;
    height: 100%;
    appearance: none;
    padding: 0 23px 0 7px;
    border: 0;
    outline: 0;
    color: #505a6b;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-chevron {
    position: absolute;
    right: 7px;
    width: 10px;
    height: 7px;
    pointer-events: none;
    fill: none;
    stroke: #315df6;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-question-zoom-content {
    width: var(--exam-content-zoom-width, 100%);
    min-width: var(--exam-content-zoom-width, 100%);
    zoom: var(--exam-content-zoom-scale, 1);
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-main {
    overscroll-behavior: contain;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]):not([data-exam-content-zoom="100"]) .exam-main {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* Keep the Learning Materials landing page aligned with the flat exam and review hubs. */
body[data-active-screen="learning-materials"] .learning-materials-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 38px;
  row-gap: 0;
  margin-top: 0;
}

body[data-active-screen="learning-materials"] .learning-materials-category-card,
body[data-active-screen="learning-materials"][data-locale="en-GB"] .learning-materials-category-card {
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 16px;
  row-gap: 3px;
  height: 136px;
  min-height: 136px;
  align-content: center;
  padding: 18px 2px;
  border: 0;
  border-bottom: 1px solid var(--xiyue-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

body[data-active-screen="learning-materials"] .learning-materials-category-card:hover,
body[data-active-screen="learning-materials"] .learning-materials-category-card:active {
  background: var(--xiyue-blue-025);
  box-shadow: none;
  transform: none;
}

body[data-active-screen="learning-materials"] .learning-materials-category-card .learning-materials-card-icon {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: center;
}

body[data-active-screen="learning-materials"] .learning-materials-category-card :is(strong, p, small) {
  grid-column: 2;
  margin: 0;
}

body[data-active-screen="learning-materials"] .learning-materials-category-card strong {
  grid-row: 1;
  color: var(--xiyue-ink);
  font-size: 18px;
}

body[data-active-screen="learning-materials"] .learning-materials-category-card p {
  grid-row: 2;
  color: var(--xiyue-muted);
}

body[data-active-screen="learning-materials"] .learning-materials-category-card small {
  grid-row: 3;
  color: var(--xiyue-blue-600);
}

@media (max-width: 640px) {
  body[data-active-screen="learning-materials"] .learning-materials-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-active-screen="learning-materials"] .learning-materials-category-card,
  body[data-active-screen="learning-materials"][data-locale="en-GB"] .learning-materials-category-card {
    height: 126px;
    min-height: 126px;
    padding-inline: 1px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-category-card strong {
    font-size: 16px;
  }
}

@media (max-width: 760px) {
  .about-us-wechat-support {
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 16px;
    margin-top: 22px;
    padding-top: 22px;
  }

  .about-us-wechat-support > img {
    width: 124px;
    height: 124px;
    border-radius: 10px;
  }

  .about-us-wechat-support strong {
    font-size: 14px;
  }

  .about-us-wechat-support > div > p {
    font-size: 10px;
  }
}

/* The standalone VIP page opens this focused checkout inside its own dialog. */
html.is-membership-checkout-embed,
html.is-membership-checkout-embed body,
html.is-membership-checkout-embed .mock-app {
  height: 100%;
  min-height: 100%;
  background: #fff !important;
}

html.is-membership-checkout-embed[data-membership-checkout-presentation="desktop"],
html.is-membership-checkout-embed[data-membership-checkout-presentation="desktop"] body,
html.is-membership-checkout-embed[data-membership-checkout-presentation="desktop"] .mock-app {
  overflow: hidden !important;
}

html.is-membership-checkout-embed .site-desktop-header-shell {
  display: none !important;
}

html.is-membership-checkout-embed .home-mobile-nav {
  display: none !important;
}

html.is-membership-checkout-embed body[data-active-screen="recharge"] .recharge-stage {
  display: block !important;
  min-height: 100dvh !important;
  padding: 0 !important;
  background: #fff !important;
}

html.is-membership-checkout-embed body[data-active-screen="recharge"] .account-feature-shell {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

html.is-membership-checkout-embed body[data-active-screen="recharge"] .account-feature-titlebar {
  display: none !important;
}

html.is-membership-checkout-embed body[data-active-screen="recharge"] .recharge-panel {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.membership-embedded-checkout {
  display: grid;
  min-height: 100dvh;
  align-content: start;
  gap: 24px;
  box-sizing: border-box;
  padding: 42px 36px 34px;
  color: var(--xiyue-ink);
  background: #fff;
}

.membership-embedded-checkout > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding-right: 34px;
}

.membership-embedded-checkout > header > div {
  display: grid;
  gap: 5px;
}

.membership-embedded-checkout > header small,
.membership-embedded-checkout > small {
  color: var(--xiyue-blue-600);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .15em;
}

.membership-embedded-checkout h1 {
  margin: 0;
  color: var(--xiyue-ink);
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -.03em;
}

.membership-embedded-account {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 9px;
  color: #6f7b91;
  border-radius: 999px;
  background: #f2f5fb;
  font-size: 9px;
  font-weight: 800;
}

.membership-embedded-plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 22px 0;
  border-block: 1px solid var(--xiyue-line);
}

.membership-embedded-plan > div {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.membership-embedded-plan > div strong {
  font-size: 17px;
}

.membership-embedded-plan > div span {
  color: var(--xiyue-muted);
  font-size: 11px;
  line-height: 1.55;
}

.membership-embedded-plan > p {
  display: flex;
  align-items: baseline;
  margin: 0;
  color: var(--xiyue-blue-600);
}

.membership-embedded-plan > p small {
  font-size: 14px;
  font-weight: 850;
}

.membership-embedded-plan > p b {
  font-size: 38px;
  line-height: 1;
  letter-spacing: -.04em;
}

.membership-embedded-plan > p em {
  color: var(--xiyue-muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

body[data-active-screen="recharge"] .membership-embedded-consent {
  font-size: 11px;
  line-height: 1.75;
}

body[data-active-screen="recharge"] .membership-embedded-consent label {
  margin-right: 3px;
}

body[data-active-screen="recharge"] .membership-embedded-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 2px;
  border-radius: 12px;
  font-size: 13px;
}

.membership-embedded-note {
  margin: -12px 0 0;
  color: var(--xiyue-subtle);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.membership-embedded-checkout-unavailable {
  justify-items: center;
  align-content: center;
  text-align: center;
}

.membership-embedded-checkout-unavailable p {
  max-width: 320px;
  margin: 0;
  color: var(--xiyue-muted);
  font-size: 12px;
  line-height: 1.7;
}

html.is-membership-checkout-embed .membership-payment-dialog-overlay,
html.is-membership-checkout-embed .membership-agreement-dialog-overlay {
  padding: 10px;
}

@media (max-width: 520px) {
  .membership-embedded-checkout {
    gap: 20px;
    padding: 32px 20px 26px;
  }

  .membership-embedded-checkout > header {
    padding-right: 28px;
  }

  .membership-embedded-plan {
    gap: 12px;
  }

  .membership-embedded-plan > p b {
    font-size: 34px;
  }
}

@media (min-width: 761px) and (max-width: 960px) {
  body[data-active-screen="learning-calendar"] .learning-calendar-layout {
    height: auto;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-card {
    height: 546px;
    min-height: 546px;
  }

  body[data-active-screen="learning-calendar"] .learning-day-detail {
    height: 281px;
    min-height: 281px;
    overflow: auto;
  }
}

@media (min-width: 961px) {
  body[data-active-screen="learning-calendar"] .learning-day-detail {
    min-height: 252px;
  }
}

* {
  -webkit-tap-highlight-color: transparent !important;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

.home-desktop-header,
.site-desktop-header-shell,
.home-desktop-hero-actions,
.home-desktop-public-hero,
.home-desktop-progress-heading,
.home-desktop-week-calendar,
.home-desktop-feature-heading,
.home-desktop-header-actions,
.home-desktop-auth-actions,
.home-desktop-account {
  display: none;
}

body[data-active-screen="start"],
body[data-active-screen="learning-calendar"],
body[data-active-screen="learning-materials"],
body[data-active-screen="single-practice"],
body[data-active-screen="exam-preview"],
body[data-active-screen="wrong-review-hub"] {
  color: var(--home-ink);
  background: #f7f8fc;
}

body[data-active-screen="start"] .mock-app,
body[data-active-screen="learning-calendar"] .mock-app,
body[data-active-screen="learning-materials"] .mock-app,
body[data-active-screen="single-practice"] .mock-app,
body[data-active-screen="exam-preview"] .mock-app,
body[data-active-screen="wrong-review-hub"] .mock-app {
  background:
    radial-gradient(circle at 8% 0%, rgba(120, 185, 255, 0.13), transparent 27rem),
    radial-gradient(circle at 90% 22%, rgba(175, 153, 255, 0.09), transparent 24rem),
    #f7f8fc;
}

.start-stage {
  padding: 28px 24px 46px;
  background: transparent;
}

.start-shell.home-shell {
  width: min(1280px, 100%);
  gap: 18px;
}

.home-layout {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1.72fr) minmax(310px, 0.88fr);
  gap: 24px;
  align-items: start;
}

.home-main,
.home-side {
  display: grid;
  gap: 20px;
}

.home-welcome-card {
  position: relative;
  display: flex;
  height: 198px;
  min-height: 198px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 30px 230px 30px 38px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 255, 0.91));
  box-shadow: var(--home-shadow);
}

.home-welcome-card::before {
  position: absolute;
  right: -95px;
  bottom: -170px;
  width: 390px;
  height: 390px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(114, 196, 255, 0.15), rgba(86, 99, 249, 0.1));
  content: "";
}

.home-welcome-copy {
  position: relative;
  z-index: 1;
}

.home-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--home-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.home-welcome-copy h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.home-welcome-copy h1 span + span {
  margin-left: 0.12em;
}

.home-welcome-copy p {
  margin: 13px 0 0;
  color: var(--home-muted);
  font-size: 15px;
}

.home-welcome-mobile-title,
.home-welcome-mobile-tagline {
  display: none;
}

.home-welcome-art {
  position: absolute;
  z-index: 1;
  right: 32px;
  bottom: -16px;
  width: 190px;
  height: 190px;
  flex: none;
}

.home-welcome-art img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 17px 22px rgba(48, 83, 205, 0.2));
  transition: transform .16s ease;
}

.home-note {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--home-blue);
  border: 4px solid white;
  border-radius: 50%;
  background: white;
  box-shadow: 0 8px 22px rgba(37, 68, 147, 0.1);
  font-weight: 700;
}

.home-note-one { top: 13px; right: auto; left: 0; width: 34px; height: 34px; color: #8668d5; }
.home-note-two { top: -3px; right: 5px; left: auto; width: 40px; height: 40px; color: var(--home-blue); }
.home-note-three { top: 48px; right: 1px; left: auto; width: 27px; height: 27px; color: #24ad91; font-size: 12px; }

.start-dashboard.home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-stat {
  display: grid;
  min-height: 104px;
  place-content: center;
  justify-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  box-shadow: 0 9px 26px rgba(45, 67, 128, 0.07);
}

.home-stat-purple { background: linear-gradient(135deg, #f2ecff, #e7ddff); }
.home-stat-mint { background: linear-gradient(135deg, #e9faef, #d7f4e2); }
.home-stat-sky { background: linear-gradient(135deg, #e8f7ff, #d6f0ff); }
.home-stat strong { font-size: 28px; line-height: 1; }
.home-stat span { color: var(--home-muted); font-size: 12px; }
.home-stat-action { color: inherit; font: inherit; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.home-stat-action:hover { transform: translateY(-2px); box-shadow: 0 13px 30px rgba(45, 67, 128, 0.12); }
.home-stat-action:focus-visible { outline: 3px solid rgba(49,93,246,.24); outline-offset: 3px; }
.home-stat-action:active { transform: translateY(0); }

.home-shell .start-auth-bar { display: none; }

.home-section-heading {
  margin: 3px 4px 15px;
  font-size: 21px;
  font-weight: 800;
}

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

.home-learning-grid .start-card-group {
  grid-column: span 2;
  gap: 10px;
}

.home-learning-grid .start-card.home-feature-card {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 148px;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  padding: 24px;
  color: var(--home-ink);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 9px 26px rgba(45, 67, 128, 0.07);
  transform: none;
}

.home-learning-grid .start-card.home-feature-primary {
  min-height: 190px;
  color: white;
  border: 0;
  background:
    radial-gradient(circle at 90% 90%, rgba(80, 180, 255, 0.3), transparent 18rem),
    linear-gradient(135deg, #3564fb, #254bd8);
  box-shadow: 0 18px 38px rgba(42, 79, 218, 0.2);
}

.home-learning-grid .start-card.home-feature-preview {
  background:
    radial-gradient(circle at 90% 10%, rgba(102, 192, 255, 0.2), transparent 12rem),
    rgba(255, 255, 255, 0.94);
}

.home-feature-icon {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  color: white;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.13);
}

.home-feature-icon svg {
  width: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.home-feature-icon-preview { color: #315df6; background: #edf2ff; }
.home-feature-icon-materials { color: #315df6; background: #edf2ff; }
.home-feature-icon-practice { color: #7656c5; background: #f0e9ff; }
.home-feature-icon-wrong { color: #168e70; background: #e4f8ef; }

.home-feature-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
  text-align: left;
}

.home-feature-copy small { color: #9aabc9; font-size: 9px; font-weight: 800; letter-spacing: 0.13em; }
.home-feature-copy strong { font-size: 22px; }
.home-feature-copy > span { color: var(--home-muted); font-size: 12px; line-height: 1.65; }
.home-feature-primary .home-feature-copy small,
.home-feature-primary .home-feature-copy > span { color: rgba(255, 255, 255, 0.72); }

.home-feature-lock {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  margin-left: auto;
  place-items: center;
  color: #ef5470;
  border: 0;
  border-radius: 14px;
  background: #fff0f3;
  transform: none;
}
.home-feature-lock::before,.home-feature-lock::after { display: none; content: none; }
.home-feature-lock svg { position: static; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.home-feature-lock .home-lock-open { display: none; }
.home-feature-lock.is-unlocked { color: #168e70; background: #e4f8ef; }
.home-feature-lock.is-unlocked .home-lock-closed { display: none; }
.home-feature-lock.is-unlocked .home-lock-open { display: block; }
.home-feature-primary .home-feature-lock,
.home-feature-primary .home-feature-lock.is-unlocked { color: white; background: rgba(255,255,255,.16); }

.home-learning-grid .start-exam-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 10px;
  border: 0;
  border-radius: 20px;
  background: white;
}

.home-learning-grid .start-option-button {
  display: grid;
  min-height: 62px;
  align-content: center;
  justify-items: start;
  gap: 4px;
  padding: 10px 15px;
  text-align: left;
  border: 1px solid #e5e9f2;
  border-radius: 15px;
  box-shadow: none;
}

.start-option-button small { color: #929cb1; font-size: 9px; font-weight: 500; }

.home-side-card {
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--home-shadow);
}

.home-week-card header { display: flex; align-items: flex-start; justify-content: space-between; }
.home-week-card header small { color: #98a0b2; font-size: 9px; font-weight: 800; }
.home-week-card h2 { margin: 5px 0 0; font-size: 21px; }
.home-week-card header button { min-height: 31px; padding: 0 10px; color: #315df6; border: 0; border-radius: 10px; background: #edf2ff; font-size: 10px; font-weight: 800; }

.home-week-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 25px 0; }
.home-week-row span { display: grid; justify-items: center; gap: 8px; }
.home-week-row small { color: #98a0b2; font-size: 9px; }
.home-week-row b { display: grid; width: 30px; height: 30px; place-items: center; color: #737d94; border-radius: 10px; background: #f5f6f9; font-size: 10px; }
.home-week-row b.is-done { color: #168e70; background: #e3f8ee; }
.home-week-row b.is-today { color: white; background: #315df6; box-shadow: 0 7px 15px rgba(49,93,246,.23); }

.home-streak { display: flex; align-items: center; gap: 15px; padding-top: 19px; border-top: 1px solid var(--home-line); }
.home-streak > strong { display: grid; width: 66px; height: 66px; flex: 0 0 auto; align-content: center; justify-items: center; gap: 1px; box-sizing: border-box; padding: 8px; color: #315df6; border-radius: 50%; background: #edf2ff; line-height: 1; white-space: nowrap; }
.home-streak > strong .home-streak-count { font-size: 21px; font-weight: 850; letter-spacing: -.04em; }
.home-streak > strong[data-digits="3"] .home-streak-count { font-size: 18px; }
.home-streak > strong .home-streak-unit { color: #315df6; font-size: 8px; font-weight: 800; line-height: 1.1; text-transform: uppercase; }
.home-streak > span { display: grid; min-width: 0; gap: 5px; font-size: 14px; font-weight: 800; }
.home-streak small { color: var(--home-muted); font-size: 10px; font-weight: 500; line-height: 1.5; }

.home-side-menu { display: grid; padding-top: 10px; padding-bottom: 10px; }
.home-side-menu button { display: flex; min-height: 66px; align-items: center; padding: 10px 2px; text-align: left; border: 0; border-bottom: 1px solid var(--home-line); background: transparent; }
.home-side-menu button[hidden] { display: none; }
.home-side-menu button:last-child { border-bottom: 0; }
.home-side-menu button > span { display: grid; gap: 4px; font-size: 13px; font-weight: 800; }
.home-side-menu .home-side-logout > span { color: #e34f67; }
.home-side-menu small { color: #98a0b2; font-size: 10px; font-weight: 500; }
.home-side-menu b { margin-left: auto; color: #98a0b2; font-size: 22px; }

@media (min-width: 641px) {
  .account-class-management-entry {
    display: none !important;
  }
}

/* Entry pages use the shared site navigation, so their local back/title rows
   are intentionally omitted. Learning materials now follows the same flat
   introduction treatment as mock exams and wrong-answer review. */
body :is(
  .home-exam-menu-stage .entry-hub-titlebar,
  .wrong-review-hub-stage .wrong-review-hub-titlebar,
  .learning-materials-stage .learning-materials-titlebar,
  .single-practice-stage .single-practice-titlebar,
  .exam-preview-stage .exam-preview-titlebar
) {
  display: none !important;
}

body[data-active-screen="learning-materials"] .learning-materials-hero {
  width: 100%;
  height: 188px;
  min-height: 188px;
  box-sizing: border-box;
  padding: 28px 2px;
  overflow: visible;
  color: var(--xiyue-ink);
  border: 0;
  border-bottom: 1px solid var(--xiyue-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-active-screen="learning-materials"] .learning-materials-hero::after,
body[data-active-screen="learning-materials"] .learning-materials-hero-art {
  display: none;
}

body[data-active-screen="learning-materials"] .learning-materials-hero small {
  color: var(--xiyue-blue-600);
  font-size: 10px;
}

body[data-active-screen="learning-materials"] .learning-materials-hero h2 {
  margin: 7px 0 0;
  color: var(--xiyue-ink);
  font-size: 30px;
}

body[data-active-screen="learning-materials"] .learning-materials-hero p {
  max-width: 780px;
  margin-top: 10px;
  color: var(--xiyue-muted);
  font-size: 12px;
}

@media (min-width: 481px) and (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-materials-hero {
    height: 198px;
    min-height: 198px;
    padding: 24px 2px;
  }
}

@media (max-width: 480px) {
  body[data-active-screen="learning-materials"] .learning-materials-hero {
    height: 180px;
    min-height: 180px;
    padding: 22px 2px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-hero h2 {
    font-size: 25px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-hero p {
    font-size: 11px;
  }
}

/* WeChat landscape uses a desktop-width layout scaled into a much shorter
   visual viewport. Only the phone-landscape marker enters this branch: real
   desktop dimensions and controls remain untouched. */
html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .wide-stage {
  height: var(--phone-visual-viewport-height, 100dvh);
}

html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .wide-shell,
html[data-phone-landscape-desktop="true"] body[data-exam-shell="unified-question"] .wide-stage[data-screen="exam"] .wide-shell {
  height: var(--phone-visual-viewport-height, 100dvh);
  padding-top: max(12px, env(safe-area-inset-top));
  padding-right: max(12px, env(safe-area-inset-right));
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  padding-left: max(12px, env(safe-area-inset-left));
}

html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .exam-toolbar {
  padding-top: 10px;
  padding-bottom: 10px;
}

html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .toolbar-button,
html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .timer-pill {
  height: 56px;
}

html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .exam-content-zoom-controls {
  height: 56px;
}

html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .exam-content-zoom-step {
  width: 46px;
  min-width: 46px;
  height: 46px;
}

html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .exam-content-zoom-select-shell {
  height: 46px;
}

html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .exam-bottom-row {
  padding-bottom: 10px;
}

html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .paper-nav,
html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .paper-item,
html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .paper-nav-arrow,
html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .bottom-action {
  height: 58px;
  min-height: 58px;
}

/* Desktop prototype: zoom only the live question and answer canvas. */
.exam-question-zoom-content {
  display: flex;
  width: 100%;
  min-width: 100%;
  flex: 0 0 auto;
  flex-direction: column;
  gap: inherit;
  transform-origin: top left;
}

.exam-content-zoom-controls {
  display: none;
}

/* All question types, not just Q50–58, retain their unscaled desktop canvas
   in intermediate mouse-window widths. Native CSS zoom remains the only
   scale here so the proven desktop drag coordinates stay unchanged. */
body:is([data-active-screen="exam"], [data-active-screen="instructions"])
  .exam-question-zoom-content[data-desktop-canvas] {
  width: var(--desktop-exam-canvas-width, 1280px) !important;
  min-width: var(--desktop-exam-canvas-width, 1280px) !important;
}

/* A narrow mouse window remains a desktop workspace down to the same 760px
   boundary used by its toolbar. Apply the presentation to EVERY question,
   not only the special music-context canvas. Magnification never selects a
   mobile card layout. Touch tablets retain their existing responsive styles. */
@media (min-width: 761px) and (max-width: 960px) and (hover: hover) and (pointer: fine) {
  body:is([data-active-screen="exam"], [data-active-screen="instructions"]) .wide-stage :is(
    .exam-toolbar, .paper-nav
  ),
  body:is([data-active-screen="exam"], [data-active-screen="instructions"]) :is(#exam-main, #instructions-main) :is(
    .info-main-card-frame, .info-action-card-frame,
    .q1-question-card, .q1-reference-card, .q1-answer-card, .exam-card,
    .select-page-shell, .capture-page-wrap
  ) {
    border-radius: 0 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    background: var(--test-surface) !important;
  }

  body:is([data-active-screen="exam"], [data-active-screen="instructions"]) .wide-stage .exam-toolbar,
  body:is([data-active-screen="exam"], [data-active-screen="instructions"]) :is(#exam-main, #instructions-main)
    :is(.q1-question-card, .q1-reference-card) {
    border-bottom: 1px solid var(--exam-chrome-line) !important;
  }

  body:is([data-active-screen="exam"], [data-active-screen="instructions"]) .q1-card-stack {
    flex: none;
    min-height: 0;
  }
}

/* Browser pinch scales the score, not its layout viewport. The phone shell
   uses the available browser-chrome height, and the bottom navigation's
   painted layer follows visualViewport without changing the question rail. */
html[data-phone-portrait-exam="true"] body:is([data-active-screen="exam"], [data-active-screen="instructions"])
  .wide-stage,
html[data-phone-portrait-exam="true"] body:is([data-active-screen="exam"], [data-active-screen="instructions"])
  .wide-stage > .wide-shell {
  height: var(--phone-exam-viewport-height, 100dvh) !important;
}

.exam-bottom-row[data-visual-viewport-nav] {
  transform-origin: top left;
  transition: none !important;
  will-change: transform;
}

@media (min-width: 961px), (min-width: 761px) and (hover: hover) and (pointer: fine) {
  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-controls {
    display: inline-flex;
    height: 40px;
    flex: 0 0 auto;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-step {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #697386;
    background: transparent;
    cursor: pointer;
    transition: color 150ms ease, background-color 150ms ease;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-step svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-step:hover:not(:disabled),
  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-step:focus-visible {
    color: #244eea;
    background: #eef3ff;
    outline: none;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-step:disabled {
    color: #b6bfd0;
    background: transparent;
    cursor: default;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-select-shell {
    position: relative;
    display: inline-flex;
    width: 78px;
    height: 32px;
    margin-left: 3px;
    align-items: center;
    border-bottom: 1px solid #d9deea;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-select {
    width: 100%;
    height: 100%;
    appearance: none;
    padding: 0 23px 0 7px;
    border: 0;
    outline: 0;
    color: #505a6b;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-chevron {
    position: absolute;
    right: 7px;
    width: 10px;
    height: 7px;
    pointer-events: none;
    fill: none;
    stroke: #315df6;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-select-shell:focus-within {
    border-bottom-color: #315df6;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-question-zoom-content {
    width: var(--exam-content-zoom-width, 100%);
    min-width: var(--exam-content-zoom-width, 100%);
    zoom: var(--exam-content-zoom-scale, 1);
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-main {
    overscroll-behavior: contain;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]):not([data-exam-content-zoom="100"]) .exam-main {
    overflow-x: auto;
  }
}

html[data-phone-landscape-desktop="true"] body[data-active-screen="exam"][data-exam-fragment^="Info_"] .exam-main > .exam-question-zoom-content > .info-card-stack {
  flex: 0 0 auto;
}

/* A phone in landscape keeps the desktop toolbar, but its zoom canvas must
   continue to occupy the full reading rail.  Scaling the rail width itself
   made zoom-out collapse the question into the left side of the screen. */
html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
) .exam-question-zoom-content {
  width: 100%;
  min-width: 100%;
}

html[data-phone-landscape-desktop="true"] body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
):not([data-exam-content-zoom="100"]) .exam-main {
  overflow-x: auto !important;
  touch-action: pan-x pan-y pinch-zoom;
}

/* Phone portrait returns to the original compact exam toolbar.  The
   magnifier remains available on desktop and phone landscape. */
@media (max-width: 760px) and (orientation: portrait) {
  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-content-zoom-controls {
    display: none !important;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-question-zoom-content {
    width: 100% !important;
    min-width: 100% !important;
    zoom: 1 !important;
  }
}

html[data-phone-landscape-desktop="true"] body[data-active-screen="exam"][data-exam-fragment^="2020-G5-7."]
  .music-context-reference {
  margin-inline: 0 auto;
}

/* Q50–58: phone landscape, intermediate desktop widths, and any desktop zoom
   whose painted score exceeds the reading rail use one painted page. This
   avoids a separately zoomed SVG inside an unscaled/clipped score card. The
   normal fitting desktop and phone-portrait layouts remain untouched. */
.music-context-zoom-viewport {
  display: contents;
}

.music-context-zoom-shell {
  display: contents;
}

.music-context-page-scroll-proxy {
  display: none;
}

#exam-main .music-context-zoom-shell.is-page-scaled {
  display: block;
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
}

#exam-main .music-context-zoom-viewport.is-page-scaled {
  display: block;
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

#exam-main .music-context-zoom-viewport.is-page-scaled::-webkit-scrollbar {
  width: 0;
  height: 0;
}

#exam-main .music-context-zoom-shell.is-page-scaled .music-context-page-scroll-proxy {
  display: block;
  position: absolute;
  left: 0;
  z-index: 6;
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #8e9db5 #e3e9f3;
}

#exam-main .music-context-page-scroll-proxy::-webkit-scrollbar {
  height: 10px;
}

#exam-main .music-context-page-scroll-proxy::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #e3e9f3;
}

#exam-main .music-context-page-scroll-proxy::-webkit-scrollbar-thumb {
  min-width: 44px;
  border: 2px solid #e3e9f3;
  border-radius: 999px;
  background: #8e9db5;
}

#exam-main .music-context-page-scroll-proxy-content {
  height: 1px;
}

#exam-main .music-context-page-scroll-proxy:hover::-webkit-scrollbar-thumb {
  background: #6f7f99;
}

#exam-main .music-context-zoom-viewport.is-page-scaled > .exam-question-zoom-content {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--music-context-canvas-width) !important;
  min-width: var(--music-context-canvas-width) !important;
  height: auto;
  min-height: 0;
  zoom: 1 !important;
  transform: scale(var(--exam-content-zoom-scale, 1));
  transform-origin: top left;
}

#exam-main .music-context-zoom-viewport.is-page-scaled :is(
  .music-context-reference-scroll, .music-context-reference-fixed-scroll,
  .music-context-comparison-question, .q1-reference-card-body
) {
  overflow: visible !important;
  max-width: none;
}

/* Q50's A/B/C examples and Q58's answer controls need a second, local
   reading rail. The outer proxy moves the complete page; these widths keep
   the answer itself within the currently visible painted page. */
#exam-main .music-context-zoom-viewport.is-page-scaled :is(
  .music-context-comparison-scroll,
  .music-context-answer-scroll
) {
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

#exam-main .music-context-zoom-viewport.is-page-scaled .music-context-comparison-scroll {
  width: calc(
    var(--music-context-local-rail-width) - max(0px, var(--exam-question-shift, 0px))
  ) !important;
  max-width: calc(
    var(--music-context-local-rail-width) - max(0px, var(--exam-question-shift, 0px))
  ) !important;
}

#exam-main .music-context-zoom-viewport.is-page-scaled .music-context-answer-scroll {
  width: calc(
    var(--music-context-local-rail-width) - max(0px, var(--exam-answer-shift, 0px))
  ) !important;
  max-width: calc(
    var(--music-context-local-rail-width) - max(0px, var(--exam-answer-shift, 0px))
  ) !important;
}

body[data-exam-fragment="2020-G5-7.5"]
  #exam-main .music-context-zoom-viewport.is-page-scaled
  .music-context-answer-scroll-content {
  width: max-content;
  min-width: 100%;
}

#exam-main .music-context-zoom-viewport.is-page-scaled .q1-card-stack {
  flex: none;
  min-height: 0;
}

#exam-main .music-context-zoom-viewport.is-page-scaled .q1-card-stack > :is(
  .q1-question-card, .q1-reference-card, .q1-answer-card
) {
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#exam-main .music-context-zoom-viewport.is-page-scaled .music-context-reference {
  margin-inline: 0 auto;
}

.home-shell .start-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  color: #98a0b2;
  font-size: 10px;
}
.home-shell .start-footer-icp {
  color: inherit;
  text-decoration: none;
}
.home-shell .start-footer-icp:hover,
.home-shell .start-footer-icp:focus-visible {
  color: #64748b;
  text-decoration: underline;
}

.home-public-company {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 20px 0;
  color: var(--home-muted);
  border-top: 1px solid var(--home-line);
}

.home-public-company-layout {
  display: none;
}

.home-public-company-bottom {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 100%;
  padding-top: 0;
  color: #8c96aa;
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.home-public-company-bottom a {
  color: inherit;
  text-decoration: none;
}

.home-public-company-bottom a:hover,
.home-public-company-bottom a:focus-visible {
  color: var(--home-blue);
}

.home-mobile-nav { display: none; }
.home-mobile-official-site { display: none; }
.home-mobile-sitebar { display: none; }

.home-exam-menu-stage {
  min-height: 100vh;
  padding: 28px 24px 60px;
  background:
    radial-gradient(circle at 88% 3%, rgba(114, 181, 255, .18), transparent 25rem),
    radial-gradient(circle at 8% 34%, rgba(139, 117, 255, .09), transparent 22rem),
    #f5f7fc;
}
.home-exam-menu-shell { display: grid; width: min(1280px,100%); margin: 0 auto; gap: 16px; }
.home-exam-menu-stage .entry-hub-titlebar { height: 60px; margin-bottom: 2px; }
.home-exam-guide {
  position: relative;
  height: 198px;
  min-height: 190px;
  margin-bottom: 0;
  overflow: hidden;
  padding: 30px 220px 28px 31px;
  color: white;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.22), transparent 9rem),
    linear-gradient(135deg, #315df6 0%, #477ff6 64%, #64a8f4 100%);
  box-shadow: 0 18px 42px rgba(49,93,246,.2);
}
.home-exam-guide::after {
  content: "";
  position: absolute;
  right: -84px;
  bottom: -126px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
}
.home-exam-guide-copy { position: relative; z-index: 2; }
.home-exam-guide-copy > small { color: rgba(255,255,255,.72); font-size: 9px; font-weight: 850; letter-spacing: .16em; }
.home-exam-guide h2 { margin: 8px 0 0; color: white; font-size: 29px; line-height: 1.2; letter-spacing: -.035em; }
.home-exam-guide p { max-width: 430px; margin: 12px 0 0; color: rgba(255,255,255,.78); font-size: 11px; font-weight: 650; line-height: 1.65; }
.home-exam-guide-tags { display: flex; gap: 8px; margin-top: 18px; }
.home-exam-guide-tags span { padding: 7px 10px; color: white; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.12); font-size: 9px; font-weight: 800; }
.home-exam-guide-art { position: absolute; z-index: 1; right: 32px; bottom: -16px; width: 180px; height: 180px; }
.home-exam-guide-art img { position: absolute; right: 0; bottom: 0; width: 170px; height: 170px; object-fit: contain; filter: drop-shadow(0 15px 20px rgba(20,54,145,.24)); }
.home-exam-guide-note,
.home-exam-guide-spark { position: absolute; z-index: 2; display: grid; place-items: center; color: #315df6; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 8px 18px rgba(33,64,145,.16); font-weight: 850; }
.home-exam-guide-note.note-one { top: 13px; left: 0; width: 34px; height: 34px; color: #7b5ce2; font-size: 14px; }
.home-exam-guide-note.note-two { top: -3px; right: 5px; width: 40px; height: 40px; font-size: 15px; }
.home-exam-guide-spark { top: 48px; right: 1px; width: 27px; height: 27px; color: #19a987; font-size: 12px; }
.home-exam-menu-grid > .home-feature-preview { grid-column: span 2; min-height: 145px; }
.single-practice-intro { margin: -5px 0 2px 61px; color: var(--home-muted); font-size: 11px; line-height: 1.7; }

.learning-calendar-stage { min-height: 100vh; padding: 28px 24px 60px; }
.learning-calendar-shell { width: min(1280px, 100%); margin: 0 auto; }
.learning-calendar-titlebar { display: flex; min-height: 60px; align-items: center; gap: 14px; margin-bottom: 18px; }
.learning-calendar-titlebar > button { display: grid; width: 46px; height: 46px; place-items: center; color: #315df6; border: 0; border-radius: 15px; background: white; box-shadow: 0 9px 26px rgba(45,67,128,.07); font-size: 27px; }
.learning-calendar-titlebar small { color: #98a0b2; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.learning-calendar-titlebar h1 { margin: 2px 0 0; font-size: 28px; }
.learning-calendar-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 17px; }
.learning-calendar-summary article { display: grid; min-height: 94px; place-content: center; justify-items: center; gap: 5px; border-radius: 22px; background: white; box-shadow: 0 9px 26px rgba(45,67,128,.07); }
.learning-calendar-summary strong { font-size: 22px; }
.learning-calendar-summary small { color: #737d94; font-size: 10px; }
.learning-calendar-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(250px,.7fr); gap: 17px; align-items: start; }
.learning-calendar-card,.learning-day-detail { padding: 25px; border-radius: 27px; background: white; box-shadow: var(--home-shadow); }
.learning-calendar-card > header { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 10px; }
.learning-calendar-card > header button { width: 38px; height: 38px; color: #315df6; border: 0; border-radius: 13px; background: #edf2ff; font-size: 24px; }
.learning-calendar-card h2 { margin: 0; text-align: center; font-size: 20px; }
.learning-calendar-weekdays,.learning-calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 7px; }
.learning-calendar-weekdays { margin: 24px 0 9px; }
.learning-calendar-weekdays span { color: #98a0b2; font-size: 9px; line-height: 13px; text-align: center; }
.learning-calendar-day,.learning-calendar-spacer { aspect-ratio: 1; }
.learning-calendar-day { position: relative; display: grid; place-items: center; color: #737d94; border: 0; border-radius: 14px; background: #f7f8fb; font-size: 11px; font-weight: 700; }
.learning-calendar-day.is-learned { color: #168e70; background: #e3f8ee; }
.learning-calendar-day.is-today { color: white; background: #315df6; box-shadow: 0 8px 16px rgba(49,93,246,.22); }
.learning-calendar-day.is-selected { box-shadow: inset 0 0 0 2px #315df6; }
.learning-day-detail { min-height: 260px; }
.learning-day-detail > small { color: #98a0b2; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.learning-day-detail h2 { margin: 8px 0 0; font-size: 22px; line-height: 30px; }
.learning-day-detail > p { color: #737d94; font-size: 11px; line-height: 1.6; }
.learning-day-overview { display: grid; min-height: 48px; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 15px; }
.learning-day-overview > span { display: grid; min-width: 0; padding: 9px 4px; justify-items: center; gap: 2px; border-radius: 12px; background: #f7f8fc; }
.learning-day-overview strong { color: #27324b; font-size: 14px; }
.learning-day-overview small { color: #8a93a8; font-size: 8px; text-align: center; }
.learning-day-activity { display: grid; gap: 7px; margin-top: 13px; padding: 14px; border: 1px solid transparent; border-radius: 15px; background: #f4f7ff; }
.learning-day-activity.is-in-progress { border-color: #cfd9ff; background: #f7f8ff; }
.learning-day-activity header { display: flex; min-height: 19px; align-items: center; justify-content: space-between; gap: 8px; }
.learning-day-activity header strong { min-width: 0; font-size: 11px; }
.learning-day-activity header span { flex: 0 0 auto; padding: 4px 7px; color: #315df6; border-radius: 999px; background: #e8edff; font-size: 8px; font-weight: 800; }
.learning-day-activity p { margin: 0; color: #59657e; font-size: 9px; line-height: 1.65; }
.learning-day-activity > small { color: #98a0b2; font-size: 8px; }

.learning-materials-stage { min-height: 100vh; padding: 28px 24px 60px; }
.learning-materials-shell { width: min(1280px, 100%); margin: 0 auto; }
.learning-materials-stage.is-sign-template-preview .learning-materials-shell { width: min(1280px,100%); }
.learning-materials-stage.is-music-library .learning-materials-shell { width: min(1280px,100%); }
.learning-materials-hero { position: relative; min-height: 210px; padding: 38px 230px 38px 38px; overflow: hidden; color: white; border-radius: 30px; background: radial-gradient(circle at 86% 22%,rgba(255,255,255,.23),transparent 12rem),linear-gradient(135deg,#315df6,#5f8ff5); box-shadow: 0 20px 48px rgba(49,93,246,.2); }
.learning-materials-hero[hidden] { display: none; }
.learning-materials-hero::after { content: ""; position: absolute; right: -84px; bottom: -126px; width: 310px; height: 310px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; }
.learning-materials-hero > * { position: relative; z-index: 1; }
.learning-materials-hero small { font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.learning-materials-hero h2 { margin: 13px 0 8px; font-size: 32px; }
.learning-materials-all-grades-range { display: inline; }
.learning-materials-hero p { max-width: 530px; margin: 0; color: rgba(255,255,255,.78); font-size: 12px; line-height: 1.75; }
.learning-materials-hero .learning-materials-hero-art { position: absolute; z-index: 2; right: 32px; bottom: -16px; width: 190px; height: 190px; }
.learning-materials-hero-art img { position: absolute; right: 0; bottom: 0; width: 180px; height: 180px; object-fit: contain; filter: drop-shadow(0 15px 20px rgba(20,54,145,.24)); }
.learning-materials-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-top: 17px; }
.learning-materials-category-card { appearance: none; display: grid; height: 192px; min-height: 192px; align-content: start; gap: 7px; padding: 25px; color: inherit; border: 1px solid rgba(255,255,255,.9); border-radius: 24px; background: rgba(255,255,255,.94); text-align: left; touch-action: manipulation; cursor: pointer; box-shadow: var(--home-shadow); transition: transform .18s ease,box-shadow .18s ease; }
body[data-locale="en-GB"] .learning-materials-category-card { min-height: 192px; }
.learning-materials-card-icon { display: grid; width: 42px; height: 42px; place-items: center; color: #315df6; border-radius: 14px; background: #edf2ff; font-size: 18px; font-weight: 850; }
.learning-materials-card-icon svg { width: 26px; height: 26px; }
.learning-materials-category-card strong { margin-top: 4px; font-size: 19px; }
.learning-materials-category-card p { margin: 0; color: #737d94; font-size: 11px; line-height: 1.65; }
.learning-materials-category-card small { margin-top: auto; color: #9aabc9; font-size: 9px; }
.learning-materials-grade-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 11px; margin-top: 17px; }
.learning-materials-grade-grid.is-with-search { grid-template-columns: repeat(6,minmax(0,1fr)); }
.learning-materials-grade-card,.learning-materials-search-card { appearance: none; display: grid; min-height: 135px; align-content: center; justify-items: start; gap: 6px; padding: 20px; color: inherit; border: 1px solid #e4e9f5; border-radius: 21px; background: rgba(255,255,255,.95); font: inherit; text-align: left; touch-action: manipulation; cursor: pointer; box-shadow: var(--home-shadow); transition: transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.learning-materials-category-card:active,.learning-materials-grade-card:active,.learning-materials-search-card:active { transform: scale(.99); }
@media (hover: hover) and (pointer: fine) {
  .learning-materials-category-card:hover { transform: translateY(-2px); box-shadow: 0 22px 45px rgba(28,44,90,.14); }
  .learning-materials-grade-card:hover,.learning-materials-search-card:hover { transform: translateY(-2px); border-color: #d7e0f5; box-shadow: 0 19px 38px rgba(45,67,128,.12); }
}
.learning-materials-grade-card:focus-visible,.learning-materials-search-card:focus-visible { outline: 3px solid rgba(49,93,246,.28); outline-offset: 3px; }
.learning-materials-grade-card b { color: #315df6; font-size: 30px; line-height: 1; }
.learning-materials-grade-card strong,.learning-materials-search-card strong { font-size: 14px; }
.learning-materials-grade-card small,.learning-materials-search-card small { color: #8b95aa; font-size: 9px; }
.learning-materials-search-icon { display: grid; width: 30px; height: 30px; place-items: center; color: #315df6; }
.learning-materials-search-icon svg { width: 30px; height: 30px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; }
@media (min-width: 641px) and (max-width: 900px) {
  .learning-materials-grade-grid.is-with-search { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
.learning-materials-term-browser { display: grid; margin-top: 17px; }
.learning-materials-stage.is-term-detail .learning-materials-titlebar,
.learning-materials-stage.is-sign-detail .learning-materials-titlebar,
.learning-materials-stage.is-music-browser .learning-materials-titlebar,
.learning-materials-stage.is-music-detail .learning-materials-titlebar { display: none; }
@media (min-width: 761px) {
  .learning-materials-stage.is-music-instrument-hub .learning-materials-titlebar { display: none; }
}
.learning-materials-term-browser-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 3px 2px 20px; border-bottom: 1px solid #e6ebf4; }
.learning-materials-term-browser-heading > div { min-width: 0; }
.learning-materials-term-browser-heading small { color: #315df6; font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.learning-materials-term-browser-heading h2 { margin: 7px 0 5px; color: #172238; font-size: 28px; line-height: 1.25; }
.learning-materials-term-browser-heading p { min-height: 39.6px; max-width: 720px; margin: 0; color: #737d94; font-size: 12px; line-height: 1.65; }
.learning-materials-term-browser-back { appearance: none; display: inline-flex; flex: 0 0 auto; min-height: 40px; align-items: center; gap: 7px; padding: 0 14px; color: #315df6; border: 1px solid #dbe4f7; border-radius: 13px; background: #fff; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.learning-materials-term-browser-back span { font-size: 20px; font-weight: 500; line-height: 1; }
.learning-materials-term-tools { display: grid; grid-template-columns: minmax(0,auto) minmax(320px,480px); align-items: start; justify-content: space-between; gap: 18px; padding: 15px 0; background: #fff; }
.learning-materials-term-tools.is-search-only { grid-template-columns: minmax(0,560px); }
.learning-materials-grade-switcher { display: flex; min-width: 0; align-items: center; gap: 14px; padding: 0 2px; overflow-x: auto; border: 0; border-radius: 0; background: transparent; scrollbar-width: none; }
.learning-materials-grade-switcher::-webkit-scrollbar { display: none; }
.learning-materials-grade-switcher button { position: relative; appearance: none; flex: 0 0 auto; min-width: 48px; height: 46px; padding: 0 6px; color: #7a8499; border: 0; border-radius: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.learning-materials-grade-switcher button::after { position: absolute; right: 13px; bottom: 3px; left: 13px; height: 3px; border-radius: 999px; background: transparent; content: ""; }
.learning-materials-grade-switcher button:hover { color: #315df6; background: transparent; }
.learning-materials-grade-switcher button.is-active { color: #315df6; background: transparent; box-shadow: none; }
.learning-materials-grade-switcher button.is-active::after { background: #315df6; }
.learning-materials-grade-switcher button:focus-visible { outline: 3px solid rgba(49,93,246,.2); outline-offset: 1px; border-radius: 9px; }
.learning-materials-term-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; margin-top: 0; overflow: hidden; border: 1px solid #e2e7f0; border-radius: 18px; background: #fff; }
.learning-materials-search-panel { display: grid; gap: 5px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.learning-materials-search-field { display: grid; min-width: 0; height: 54px; grid-template-columns: 32px minmax(0,1fr) 40px; align-items: center; gap: 9px; padding: 0 8px 0 15px; border: 1px solid #dce4f4; border-radius: 16px; background: #f8faff; transition: border-color .16s ease,box-shadow .16s ease,background .16s ease; }
.learning-materials-search-field:focus-within { border-color: #8ca7fb; background: #fff; box-shadow: 0 0 0 4px rgba(49,93,246,.1); }
.learning-materials-search-field-icon { display: grid; width: 28px; height: 28px; place-items: center; color: #315df6; }
.learning-materials-search-field-icon svg { width: 27px; height: 27px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; }
.learning-materials-search-field input { width: 100%; min-width: 0; height: 100%; padding: 0; color: #172238; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; }
.learning-materials-search-field input::placeholder { color: #9aa5ba; opacity: 1; }
.learning-materials-search-field input::-webkit-search-cancel-button { display: none; }
.learning-materials-search-clear { appearance: none; display: grid; width: 36px; height: 36px; place-items: center; padding: 0; color: #66738d; border: 0; border-radius: 11px; background: #e9eef8; font-size: 23px; line-height: 1; cursor: pointer; }
.learning-materials-search-clear[hidden] { visibility: hidden; pointer-events: none; }
.learning-materials-search-clear:focus-visible { outline: 3px solid rgba(49,93,246,.25); outline-offset: 2px; }
.learning-materials-search-status { min-height: 14px; margin: 0 3px; color: #7c879e; font-size: 10px; font-weight: 750; line-height: 14px; }
.learning-materials-term-browser.is-grade-view .learning-materials-search-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; }
#learning-materials-search-results > .learning-materials-term-grid { margin-top: 0; }
.learning-materials-search-empty { margin-top: 0; }
.learning-materials-term-card { display: grid; min-height: 94px; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: auto auto; align-content: center; align-items: center; gap: 6px 18px; padding: 15px 18px; border: 0; border-bottom: 1px solid #e8ecf3; border-radius: 0; background: #fff; box-shadow: none; transition: background .16s ease; }
.learning-materials-term-card:nth-child(odd) { border-right: 1px solid #e8ecf3; }
.learning-materials-term-card:last-child,
.learning-materials-term-card:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.learning-materials-term-heading { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 7px; }
.learning-materials-term-card strong { min-width: 0; font-size: 16px; }
.learning-materials-term-card p { min-width: 0; margin: 0; color: #657089; font-size: 11px; line-height: 1.55; }
.learning-materials-term-grade { padding: 4px 7px; color: #315df6; border-radius: 999px; background: #edf2ff; font-size: 8px; font-weight: 800; line-height: 1; }
.learning-materials-term-actions { display: flex; grid-column: 2; grid-row: 1 / span 2; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 10px; }
.learning-materials-pronunciation-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.learning-materials-language-badge { flex: 0 0 auto; padding: 4px 7px; color: #315df6; border-radius: 999px; background: #edf2ff; font-size: 8px; font-weight: 800; }
.learning-materials-pronunciation-button { appearance: none; display: grid; width: 32px; height: 32px; place-items: center; padding: 0; color: #315df6; border: 1px solid #dbe4fb; border-radius: 10px; background: #fff; cursor: pointer; transition: transform .16s ease,box-shadow .16s ease,color .16s ease,background .16s ease; }
.learning-materials-pronunciation-button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(49,93,246,.14); }
.learning-materials-pronunciation-button svg { width: 18px; height: 18px; fill: currentColor; }
.learning-materials-pronunciation-button svg path:nth-child(n+2) { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.learning-materials-pronunciation-button.is-speaking { color: #fff; border-color: #315df6; background: #315df6; box-shadow: 0 7px 18px rgba(49,93,246,.26); }
.learning-materials-pronunciation-button.is-unavailable { opacity: .5; cursor: not-allowed; }
.learning-materials-term-browser.is-open-list .learning-materials-term-grid {
  column-gap: clamp(34px,4vw,72px);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.learning-materials-term-browser.is-open-list .learning-materials-term-card {
  min-height: 88px;
  gap: 5px 18px;
  padding: 17px 2px;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  background: transparent;
}
.learning-materials-term-browser.is-open-list .learning-materials-term-card:nth-child(odd) {
  border-right: 0;
}
.learning-materials-term-browser.is-open-list .learning-materials-term-card strong {
  color: #172238;
  font-size: 17px;
  letter-spacing: -.01em;
}
.learning-materials-term-browser.is-open-list .learning-materials-term-card p {
  color: #707b91;
  font-size: 12px;
}
.learning-materials-term-browser.is-open-list .learning-materials-term-actions {
  gap: 10px;
}
.learning-materials-term-browser.is-open-list .learning-materials-pronunciation-row {
  gap: 7px;
}
.learning-materials-term-browser.is-open-list .learning-materials-language-badge {
  padding: 4px 7px;
  color: #315df6;
  border-radius: 999px;
  background: #edf2ff;
  font-size: 8px;
  font-weight: 800;
}
.learning-materials-term-browser.is-open-list .learning-materials-pronunciation-button {
  width: 32px;
  height: 32px;
  border: 1px solid #dbe4fb;
  border-radius: 10px;
  background: #fff;
}
.learning-materials-term-browser.is-open-list .learning-materials-pronunciation-button:hover {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 8px 18px rgba(49,93,246,.14);
}
.learning-materials-term-browser.is-open-list .learning-materials-pronunciation-button.is-speaking {
  color: #fff;
  border-color: #315df6;
  background: #315df6;
  box-shadow: 0 7px 18px rgba(49,93,246,.2);
}
.learning-materials-symbol-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 17px; }
.learning-materials-symbol-grid.is-comparison-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.learning-materials-symbol-card { display: grid; min-height: 174px; grid-template-columns: minmax(0,184px) 1fr; align-items: stretch; gap: 17px; padding: 18px; border: 1px solid #e5eaf5; border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: var(--home-shadow); }
.learning-materials-symbol-card.is-comparison { grid-column: 1 / -1; grid-template-columns: minmax(0,1fr); grid-template-rows: auto 286px; gap: 14px; padding: 22px; }
.learning-materials-symbol-card.is-single-sign { min-height: 274px; grid-template-columns: minmax(0,1fr); grid-template-rows: auto 210px; gap: 14px; padding: 20px; }
.learning-materials-symbol-examples { position: relative; display: grid; min-width: 0; grid-template-columns: minmax(230px,30%) minmax(0,1fr); align-items: stretch; gap: 18px; }
.learning-materials-symbol-examples.is-single { grid-template-columns: minmax(0,1fr); }
.learning-materials-symbol-examples.is-three { grid-template-columns: minmax(170px,.72fr) minmax(170px,.72fr) minmax(0,1.56fr); }
.learning-materials-symbol-examples.is-four { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,280px); }
.learning-materials-symbol-card.is-comparison.is-four-examples { grid-template-rows: auto auto; }
.learning-materials-symbol-example { display: grid; min-width: 0; grid-template-rows: auto 1fr; gap: 8px; }
.learning-materials-symbol-example > small { justify-self: start; padding: 6px 10px; color: #315df6; border-radius: 999px; background: #edf2ff; font-size: 9px; font-weight: 850; }
.learning-materials-symbol-mark { position: relative; display: grid; min-width: 0; min-height: 136px; place-items: center; overflow: hidden; color: #18335f; border: 1px solid #e5eaf5; border-radius: 16px; background: #fff; text-align: center; }
.learning-materials-symbol-mark svg { display: block; width: 100% !important; height: auto !important; max-height: 136px; overflow: visible; }
.learning-materials-symbol-example .learning-materials-symbol-mark { min-height: 246px; }
.learning-materials-symbol-example .learning-materials-symbol-mark svg { max-height: 220px; }
.learning-materials-symbol-examples.is-single .learning-materials-symbol-mark { min-height: 170px; }
.learning-materials-symbol-examples.is-single .learning-materials-symbol-mark svg { width: min(100%,420px) !important; max-height: 160px; }
.learning-materials-symbol-example.is-standalone .learning-materials-symbol-mark svg { width: 180px !important; height: 150px !important; max-height: 150px; }
.learning-materials-symbol-example.is-wide-symbol .learning-materials-symbol-mark svg { width: min(88%,360px) !important; height: auto !important; max-height: 110px; }
.learning-materials-symbol-loading,.learning-materials-symbol-error { max-width: 100px; color: #8390a9; font-size: 8px; font-weight: 750; line-height: 1.45; }
.learning-materials-symbol-mark[aria-busy="true"]::after { content: ""; position: absolute; bottom: 14px; width: 34px; height: 2px; overflow: hidden; border-radius: 999px; background: linear-gradient(90deg,transparent,#8ea7ef,transparent); animation: learning-materials-symbol-loading 1.1s ease-in-out infinite; }
.learning-materials-symbol-copy { display: grid; min-width: 0; align-content: center; gap: 9px; }
.learning-materials-symbol-card.is-comparison .learning-materials-symbol-copy { min-height: 40px; grid-template-columns: minmax(0,1fr); align-items: start; align-content: start; }
.learning-materials-symbol-card.is-single-sign .learning-materials-symbol-copy { min-height: 40px; align-content: start; }
.learning-materials-symbol-heading { display: grid; gap: 4px; }
.learning-materials-symbol-title-row { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 8px; color: inherit; }
.learning-materials-symbol-copy strong { font-size: 16px; line-height: 1.35; }
.learning-materials-symbol-heading > span[lang] { color: #315df6; font-size: 10px; font-weight: 750; line-height: 1.4; }
.learning-materials-symbol-grade { padding: 4px 7px; color: #315df6; border-radius: 999px; background: #edf2ff; font-size: 8px; font-weight: 800; line-height: 1; }
.learning-materials-symbol-copy p { margin: 0; color: #657089; font-size: 10px; line-height: 1.65; }
.learning-materials-symbol-copy .learning-materials-symbol-context-note { color: #8b95aa; font-size: 8px; line-height: 1.55; }
.learning-materials-symbol-copy > small { justify-self: start; padding: 5px 8px; color: #315df6; border-radius: 999px; background: #edf2ff; font-size: 8px; font-weight: 800; }
.learning-materials-term-browser.is-sign-browser .learning-materials-symbol-grid,
.learning-materials-term-browser.is-sign-browser .learning-materials-symbol-grid.is-comparison-grid {
  grid-template-columns: minmax(0,1fr);
  gap: 0;
  margin-top: 0;
}
.learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card,
.learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card.is-single-sign {
  grid-column: 1;
  min-height: 190px;
  grid-template-columns: minmax(180px,250px) minmax(0,1fr);
  grid-template-rows: auto;
  align-items: center;
  gap: 30px;
  padding: 24px 2px;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card.is-comparison {
  min-height: 0;
  grid-template-columns: minmax(0,1fr);
  grid-template-rows: auto auto;
  align-items: stretch;
  gap: 16px;
  padding: 28px 2px;
}
.learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card.is-comparison.is-inline-comparison {
  min-height: 210px;
  grid-template-columns: minmax(180px,250px) minmax(0,1fr);
  grid-template-rows: auto;
  align-items: center;
  gap: 30px;
  padding: 24px 2px;
}
.learning-materials-term-browser.is-sign-browser .is-inline-comparison .learning-materials-symbol-examples {
  height: 170px;
  grid-template-columns: repeat(2,minmax(0,1fr));
  grid-template-rows: minmax(0,1fr);
  align-items: stretch;
  gap: 16px;
}
.learning-materials-term-browser.is-sign-browser .is-inline-comparison.is-three-examples .learning-materials-symbol-examples {
  grid-template-columns: repeat(3,minmax(0,1fr));
}
.learning-materials-term-browser.is-sign-browser .is-inline-comparison.is-four-examples .learning-materials-symbol-examples {
  grid-template-columns: repeat(4,minmax(0,1fr));
}
.learning-materials-term-browser.is-sign-browser .is-inline-comparison .learning-materials-symbol-example {
  grid-template-rows: auto minmax(0,1fr);
  gap: 6px;
}
.learning-materials-term-browser.is-sign-browser .is-inline-comparison .learning-materials-symbol-mark {
  min-height: 142px;
}
.learning-materials-term-browser.is-sign-browser .is-inline-comparison .learning-materials-symbol-mark svg {
  max-height: 132px;
}
.learning-materials-term-browser.is-sign-browser .is-inline-comparison [data-learning-material-sign-variant^="written"] svg {
  width: min(92%,280px) !important;
}
.learning-materials-term-browser.is-sign-browser .is-inline-comparison [data-learning-material-sign-variant^="realization"] svg {
  width: min(94%,340px) !important;
}
.learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card:last-child { border-bottom: 0; }
.learning-materials-term-browser.is-sign-browser .learning-materials-symbol-copy,
.learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card.is-single-sign .learning-materials-symbol-copy,
.learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card.is-comparison .learning-materials-symbol-copy {
  height: 44px;
  min-height: 44px;
  align-content: center;
}
.learning-materials-term-browser.is-sign-browser .learning-materials-symbol-mark {
  border-color: #e3e9f4;
  border-radius: 14px;
  background: #fbfcff;
}
@keyframes learning-materials-symbol-loading { 0%,100% { transform: translateX(-20px); opacity: .35; } 50% { transform: translateX(20px); opacity: 1; } }
.learning-materials-empty { margin-top: 17px; padding: 35px 24px; border: 1px dashed #ced8eb; border-radius: 22px; background: rgba(255,255,255,.8); text-align: center; }
.learning-materials-empty strong { display: block; font-size: 17px; }
.learning-materials-empty p { margin: 8px 0 0; color: #737d94; font-size: 10px; }

.learning-music-library { display: grid; width: 100%; max-width: 1600px; min-width: 0; box-sizing: border-box; gap: 14px; margin: 17px auto 0; }
.learning-music-instrument-hub { display: grid; width: 100%; max-width: 1600px; min-width: 0; box-sizing: border-box; gap: 18px; margin: 17px auto 0; }
.learning-music-instrument-heading { padding: 3px 2px 22px; border-bottom: 1px solid #e6ebf4; }
.learning-music-instrument-back { display: none; }
.learning-music-instrument-heading small { color: #315df6; font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.learning-music-instrument-heading h2 { margin: 7px 0 6px; color: #172238; font-size: 30px; line-height: 1.25; }
.learning-music-instrument-heading p { max-width: 720px; margin: 0; color: #737d94; font-size: 12px; line-height: 1.65; }
.learning-music-instrument-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; border-top: 1px solid #e8ecf3; }
.learning-music-instrument-card { position: relative; appearance: none; display: grid; min-width: 0; min-height: 98px; grid-template-columns: 56px minmax(0,1fr) 28px; align-items: center; gap: 16px; overflow: hidden; padding: 17px 10px; color: inherit; border: 0; border-bottom: 1px solid #e8ecf3; border-radius: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; box-shadow: none; transition: background .16s ease,color .16s ease; }
@media (hover: hover) and (pointer: fine) {
  .learning-music-instrument-card:hover { background: #f2f6ff; }
}
@media (hover: none), (pointer: coarse) {
  .learning-music-instrument-card { transition: color .16s ease; }
}
.learning-music-instrument-card:active { background: #f2f6ff; }
.learning-music-instrument-card:focus-visible { z-index: 1; outline: 3px solid rgba(49,93,246,.23); outline-offset: -3px; background: #f2f6ff; }
.learning-music-instrument-card .learning-music-piano-icon { width: 52px; height: 52px; border-radius: 15px; }
.learning-music-instrument-card .learning-music-instrument-icon { width: 52px; height: 52px; border-radius: 15px; }
.learning-music-instrument-card .learning-music-piano-icon .learning-music-piano-glyph { font-size: 33px; }
.learning-music-instrument-icon { display: grid; width: 64px; height: 64px; place-items: center; color: #315df6; border-radius: 19px; background: #e9efff; }
.learning-music-instrument-icon svg { width: 43px; height: 43px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.learning-music-violin-glyph { display: block; font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif; font-size: 33px; line-height: 1; transform: rotate(-4deg); filter: drop-shadow(0 4px 5px rgba(75,47,30,.13)); }
.learning-music-instrument-icon.is-clarinet { color: #168a7a; background: #e4f6f2; }
.learning-music-clarinet-glyph { width: 39px !important; height: 39px !important; stroke-width: 2.15 !important; filter: drop-shadow(0 4px 5px rgba(21,112,99,.14)); }
.learning-music-instrument-card-copy { display: grid; min-width: 0; gap: 5px; }
.learning-music-instrument-card-copy small { color: #8993a9; font-size: 9px; font-weight: 750; }
.learning-music-instrument-card-copy strong { color: #1d2a45; font-size: 19px; }
.learning-music-instrument-card-copy em { color: #78849b; font-size: 11px; font-style: normal; line-height: 1.5; }
.learning-music-instrument-card-arrow { justify-self: center; color: #9cabc2; font-size: 27px; line-height: 1; }
.learning-music-piano-icon { display: grid; width: 54px; height: 54px; place-items: center; color: #315df6; border-radius: 17px; background: #e9efff; }
.learning-music-piano-glyph { display: block; font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif; font-size: 35px; line-height: 1; transform: rotate(-2deg); filter: drop-shadow(0 4px 5px rgba(33,42,61,.13)); }
.learning-violin-prototype { display: grid; gap: 18px; margin-top: 17px; }
.learning-violin-detail-audio { grid-template-columns: minmax(230px,.72fr) minmax(430px,1.28fr); align-items: start; }
.learning-violin-audio-column { display: grid; min-width: 0; gap: 10px; }
.learning-violin-segmented { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 5px; border-radius: 16px; background: #f0f3f9; }
.learning-violin-segmented button { appearance: none; display: grid; min-width: 0; min-height: 40px; align-content: center; padding: 7px 12px; color: #66728b; border: 1px solid transparent; border-radius: 12px; background: transparent; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; }
.learning-violin-segmented button strong { color: inherit; font-size: 11px; }
.learning-violin-segmented button small { color: inherit; font-size: 8px; font-weight: 650; opacity: .72; }
.learning-violin-segmented button.is-active { color: #315df6; border-color: #d8e1ff; background: #fff; box-shadow: 0 7px 15px rgba(45,67,128,.09); }
.learning-drumkit-audio-selector { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.learning-drumkit-audio-selector button { padding-inline: 6px; text-align: center; }
.learning-drumkit-audio-compact-label { display: none; }
.learning-violin-score-selector { padding: 10px 20px; border-bottom: 1px solid #e7ebf3; background: #fbfcff; }
.learning-violin-score-selector .learning-violin-segmented { width: min(680px,100%); margin-left: auto; }
.learning-music-browser-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 3px 2px 20px; border-bottom: 1px solid #e6ebf4; }
.learning-music-browser-heading > div { min-width: 0; }
.learning-music-browser-heading small { color: #315df6; font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.learning-music-browser-heading h2 { margin: 7px 0 5px; color: #172238; font-size: 30px; line-height: 1.25; }
.learning-music-browser-heading p { max-width: 760px; margin: 0; color: #737d94; font-size: 12px; line-height: 1.65; }
.learning-music-switch-instrument { appearance: none; display: inline-flex; flex: 0 0 auto; min-height: 42px; align-items: center; gap: 8px; padding: 0 14px; color: #315df6; border: 1px solid #dbe4f7; border-radius: 13px; background: #fff; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; transition: border-color .16s ease,background .16s ease,box-shadow .16s ease; }
.learning-music-switch-instrument svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.learning-music-switch-instrument:hover { border-color: #bdcbf3; background: #f7f9ff; box-shadow: 0 8px 18px rgba(49,93,246,.09); }
.learning-music-switch-instrument:focus-visible { outline: 3px solid rgba(49,93,246,.22); outline-offset: 2px; }
.learning-music-controls { display: grid; gap: 12px; padding: 15px 0 2px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.learning-music-track-card:focus-visible { outline: 3px solid rgba(49,93,246,.24); outline-offset: 2px; }
.learning-music-search-shell { display: grid; width: 100%; grid-template-columns: minmax(0,1fr) 150px; align-items: stretch; gap: 0; overflow: hidden; border: 1px solid #dce4f4; border-radius: 16px; background: #fff; transition: border-color .16s ease,box-shadow .16s ease; }
.learning-music-search-shell:focus-within { border-color: #8ca7fb; box-shadow: 0 0 0 4px rgba(49,93,246,.09); }
.learning-music-text-search { display: grid; min-width: 0; min-height: 58px; grid-template-columns: 32px minmax(0,1fr) 34px; align-items: center; gap: 8px; padding: 5px 8px 5px 14px; border: 0; border-radius: 0; background: transparent; transition: background .16s ease; }
.learning-music-text-search:focus-within { border-color: transparent; background: #fff; box-shadow: none; }
.learning-music-search-trigger-icon { display: grid; width: 29px; height: 29px; place-items: center; color: #315df6; }
.learning-music-search-trigger-icon svg { width: 27px; height: 27px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; }
.learning-music-text-search input { width: 100%; min-width: 0; height: 42px; padding: 0; color: #25324d; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; }
.learning-music-text-search input::placeholder { color: #98a3b8; opacity: 1; }
.learning-music-text-search input::-webkit-search-cancel-button { display: none; }
.learning-music-text-search button { appearance: none; display: grid; width: 32px; height: 32px; place-items: center; padding: 0; color: #71809a; border: 0; border-radius: 10px; background: #e9eef8; font-size: 19px; cursor: pointer; }
.learning-music-text-search button[hidden] { visibility: hidden; pointer-events: none; }
.learning-music-open-picker { appearance: none; display: inline-flex; min-width: 150px; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; color: #315df6; border: 0; border-left: 1px solid #e1e7f3; border-radius: 0; background: #f8faff; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; touch-action: manipulation; box-shadow: none; transition: background .16s ease,color .16s ease; }
.learning-music-open-picker svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.learning-music-open-picker:hover,.learning-music-open-picker.is-active { color: #244de0; border-color: #e1e7f3; background: #eef3ff; box-shadow: none; }
.learning-music-picker { display: grid; gap: 14px; padding: 16px; border: 1px solid #cad6f6; border-radius: 18px; background: linear-gradient(145deg,#f8faff,#fff); box-shadow: 0 13px 28px rgba(42,64,126,.1); }
.learning-music-picker > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.learning-music-picker > header > span { display: grid; gap: 3px; }
.learning-music-picker > header strong { color: #25324d; font-size: 14px; }
.learning-music-picker > header small { color: #8a95aa; font-size: 8px; }
.learning-music-picker > header button { appearance: none; display: grid; width: 30px; height: 30px; place-items: center; padding: 0; color: #71809a; border: 0; border-radius: 9px; background: #edf1f8; font-size: 20px; cursor: pointer; }
.learning-music-picker-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.learning-music-picker-field { display: grid; min-width: 0; gap: 6px; }
.learning-music-picker-field > label { color: #69768e; font-size: 9px; font-weight: 750; }
.learning-music-picker-field-control { position: relative; min-width: 0; }
.learning-music-picker-fields select { appearance: none; width: 100%; min-width: 0; height: 45px; padding: 0 32px 0 12px; color: #25324d; border: 1px solid #dce4f2; border-radius: 12px; outline: 0; background: #fff linear-gradient(45deg,transparent 50%,#71809a 50%) calc(100% - 15px) 19px/5px 5px no-repeat; font: inherit; font-size: 12px; font-weight: 750; }
.learning-music-picker-field-control:has(button:not([hidden])) select { padding-right: 68px; background-position: calc(100% - 42px) 19px; }
.learning-music-picker-field-control > button { appearance: none; position: absolute; z-index: 1; top: 50%; right: 8px; display: grid; width: 25px; height: 32px; place-items: center; padding: 0; color: #8a95aa; border: 0; border-radius: 0; background: transparent; font: inherit; font-size: 18px; line-height: 1; cursor: pointer; transform: translateY(-50%); }
.learning-music-picker-field-control > button:hover { color: #315df6; background: transparent; }
.learning-music-picker-field-control > button:focus-visible { color: #315df6; outline: 2px solid rgba(49,93,246,.35); outline-offset: 1px; }
.learning-music-picker-field-control > button[hidden] { display: none; }
.learning-music-picker-fields select:focus { border-color: #7898f7; box-shadow: 0 0 0 3px rgba(49,93,246,.09); }
.learning-music-picker-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.learning-music-picker-actions button { appearance: none; min-height: 43px; padding: 8px 16px; border-radius: 13px; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.learning-music-picker-preview { color: #315df6; border: 1px solid #aebffa; background: #f4f7ff; }
.learning-music-picker-confirm { color: #fff; border: 1px solid #315df6; background: #315df6; box-shadow: 0 8px 18px rgba(49,93,246,.2); }
.learning-music-picker-actions button:disabled { color: #9aa5b8; border-color: #dce2ec; background: #eef1f6; cursor: not-allowed; box-shadow: none; opacity: .8; }
.learning-music-results-meta { display: flex; min-height: 34px; align-items: center; justify-content: space-between; gap: 14px; padding: 2px 2px 0; }
.learning-music-active-selection { display: flex; flex: 0 0 auto; min-width: 0; align-items: center; justify-content: flex-end; gap: 10px; color: #53617b; font-size: 9px; font-weight: 750; }
.learning-music-active-selection[hidden] { display: none; }
.learning-music-active-selection span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; }
.learning-music-active-selection button { appearance: none; flex: 0 0 auto; padding: 5px 2px; color: #315df6; border: 0; border-radius: 0; background: transparent; font: inherit; font-size: 9px; font-weight: 800; cursor: pointer; }
.learning-music-active-selection button:hover { color: #244de0; text-decoration: underline; text-underline-offset: 3px; }
.learning-music-search-status { min-width: 0; min-height: 14px; margin: 0; color: #7c879e; font-size: 10px; font-weight: 750; line-height: 14px; }
.learning-music-search-status[hidden],.learning-music-results[hidden] { display: none; }
.learning-music-results { display: grid; gap: 34px; }
.learning-music-group-section { display: grid; gap: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.learning-music-group-section > header { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 14px; padding: 0 2px 12px; border-bottom: 1px solid #e6ebf4; }
.learning-music-group-section > header > span { display: grid; gap: 3px; }
.learning-music-group-section > header strong { color: #25324d; font-size: 18px; }
.learning-music-group-section > header small { color: #8a95aa; font-size: 9px; }
.learning-music-group-section > header b { display: grid; min-width: 30px; height: 30px; place-items: center; padding: 0 8px; color: #315df6; border-radius: 9px; background: #edf2ff; font-size: 13px; }
.learning-music-track-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: clamp(34px,4vw,72px); }
.learning-music-track-card { appearance: none; display: grid; min-width: 0; min-height: 90px; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "heading arrow" "copy arrow"; align-items: center; gap: 7px 14px; padding: 16px 18px; color: inherit; border: 0; border-bottom: 1px solid #edf0f5; border-radius: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; transition: color .16s ease,background .16s ease; }
@media (hover: hover) and (pointer: fine) {
  .learning-music-track-card:hover { transform: none; border-color: #dde5f3; background: linear-gradient(90deg,rgba(247,249,255,.95),rgba(247,249,255,0)); box-shadow: none; }
}
@media (hover: none) and (pointer: coarse) {
  .learning-music-track-card:active { background: linear-gradient(90deg,rgba(247,249,255,.95),rgba(247,249,255,0)); }
}
.learning-music-track-heading { grid-area: heading; display: flex; min-width: 0; align-items: center; gap: 7px; }
.learning-music-track-code { display: grid; flex: 0 0 auto; min-width: 34px; height: 25px; place-items: center; padding: 0 7px; color: #315df6; border-radius: 8px; background: #edf2ff; font-size: 9px; font-weight: 850; box-shadow: none; }
.learning-music-track-copy { grid-area: copy; display: flex; min-width: 0; align-items: baseline; gap: 4px; }
.learning-music-track-copy small { flex: 0 0 auto; color: #34415b; font-size: 11px; font-weight: 800; }
.learning-music-track-copy small::after { content: ":"; }
.learning-music-track-copy strong { color: #34415b; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.learning-music-track-assets { display: flex; min-width: 0; gap: 5px; }
.learning-music-track-assets i { padding: 3px 6px; color: #8d98ac; border-radius: 999px; background: #f0f2f7; font-size: 7px; font-style: normal; font-weight: 750; }
.learning-music-track-assets i.is-ready { color: #5673d9; background: #f0f3ff; }
.learning-music-track-arrow { grid-area: arrow; color: #a1acc0; font-size: 21px; line-height: 1; }
.learning-music-empty { margin-top: 0; }
.learning-music-empty-icon { display: grid; width: 48px; height: 48px; margin: 0 auto 12px; place-items: center; color: #315df6; border-radius: 15px; background: #edf2ff; font-size: 23px; }
.learning-music-detail { display: grid; width: 100%; max-width: 1600px; min-width: 0; box-sizing: border-box; gap: 18px; margin: 17px auto 0; }
.learning-music-detail-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 3px 2px 20px; border-bottom: 1px solid #e6ebf4; }
.learning-music-detail-heading > div { min-width: 0; }
.learning-music-detail-heading small { color: #315df6; font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.learning-music-detail-heading h2 { margin: 7px 0 5px; color: #172238; font-size: 30px; line-height: 1.25; }
.learning-music-detail-heading p { margin: 0; color: #737d94; font-size: 11px; font-weight: 700; line-height: 1.55; }
.learning-music-detail-heading-meta { display: flex; min-width: 0; align-items: center; gap: 7px; flex-wrap: wrap; }
.learning-music-detail-heading-meta > span { color: #a0a9b9; font-size: 10px; }
.learning-music-detail-solo-badge { color: #315df6; font-size: 9px; font-weight: 850; letter-spacing: .04em; }
.learning-music-detail-heading .learning-music-detail-notice { color: #8a94a7; font-size: 9px; font-weight: 650; }
.learning-music-detail-heading.is-piece-focused { align-items: flex-end; padding-bottom: 16px; }
.learning-music-detail-piece-heading { display: grid; min-width: 0; gap: 0; }
.learning-music-detail-piece-heading > em { margin-top: 9px; color: #6f7d96; font-size: 10px; font-style: normal; font-weight: 750; }
.learning-music-detail-piece-heading > h2 { max-width: 820px; min-block-size: 2.56em; margin: 5px 0 8px; font-size: 25px; line-height: 1.28; }
.learning-music-detail-heading-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.learning-music-detail-heading-actions .learning-music-share-button,
.learning-music-detail-heading-actions .learning-music-detail-navigation button,
.learning-music-detail-heading-actions .learning-music-detail-return { min-height: 38px; }
.learning-music-detail-return { appearance: none; display: inline-flex; flex: 0 0 auto; min-height: 42px; align-items: center; gap: 7px; padding: 0 14px; color: #315df6; border: 1px solid #dbe4f7; border-radius: 13px; background: #fff; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; transition: border-color .16s ease,background .16s ease,box-shadow .16s ease; }
.learning-music-detail-return span { font-size: 19px; font-weight: 500; line-height: 1; }
.learning-music-detail-return:hover { border-color: #bdcbf3; background: #f7f9ff; box-shadow: 0 8px 18px rgba(49,93,246,.09); }
.learning-music-detail-return:focus-visible { outline: 3px solid rgba(49,93,246,.22); outline-offset: 2px; }
.learning-music-detail-audio,.learning-music-detail-score { border: 1px solid #e1e7f3; border-radius: 22px; background: #fff; box-shadow: var(--home-shadow); }
.learning-music-detail-audio { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,42%); align-items: center; gap: 18px; padding: 18px 20px; }
.learning-music-detail-audio > span,.learning-music-detail-score header > span { display: grid; min-width: 0; gap: 4px; }
.learning-music-detail-audio small,.learning-music-detail-score small { color: #8993a9; font-size: 8px; font-weight: 800; }
.learning-music-detail-audio strong,.learning-music-detail-score strong { color: #26334e; font-size: 12px; line-height: 1.4; }
.learning-music-detail .learning-music-detail-audio-copy > strong { max-width: 760px; font-size: 20px; line-height: 1.35; }
.learning-music-detail-audio-meta { display: flex; align-items: center; gap: 7px; }
.learning-music-detail-audio-code { display: inline-grid; min-width: 30px; height: 20px; padding: 0 7px; place-items: center; color: #315df6; border-radius: 7px; background: #e8efff; font-size: 8px; font-weight: 850; line-height: 1; letter-spacing: .02em; }
.learning-music-detail-audio-copy em { color: #6f7d96; font-size: 9px; font-style: normal; font-weight: 750; }
.learning-music-detail .learning-music-detail-audio-copy > em { margin-top: 4px; font-size: 10px; }
.learning-music-audio-element { display: none; }
.learning-music-audio-player { display: grid; min-width: 0; grid-template-columns: 40px auto minmax(100px,1fr) auto 34px; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 18px; background: #f1f3f6; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.learning-music-audio-toggle { appearance: none; display: grid; width: 38px; height: 38px; place-items: center; padding: 0; color: #fff; border: 0; border-radius: 50%; background: #315df6; font: inherit; cursor: pointer; touch-action: manipulation; box-shadow: 0 7px 15px rgba(49,93,246,.2); }
.learning-music-audio-toggle-icon { display: block; width: 20px; height: 20px; fill: currentColor; }
.learning-music-audio-icon-pause { display: none; }
.learning-music-audio-toggle.is-playing .learning-music-audio-icon-play { display: none; }
.learning-music-audio-toggle.is-playing .learning-music-audio-icon-pause { display: inline; }
.learning-music-audio-current,.learning-music-audio-duration { color: #334058; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.learning-music-audio-seek { --audio-progress:0%; appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; height: 22px; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.learning-music-audio-seek::-webkit-slider-runnable-track { height: 5px; border-radius: 999px; background: linear-gradient(to right,#315df6 0 var(--audio-progress),#c8cfdb var(--audio-progress) 100%); }
.learning-music-audio-seek::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5.5px; border: 3px solid #315df6; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(35,54,99,.2); }
.learning-music-audio-seek::-moz-range-track { height: 5px; border-radius: 999px; background: #c8cfdb; }
.learning-music-audio-seek::-moz-range-progress { height: 5px; border-radius: 999px; background: #315df6; }
.learning-music-audio-seek::-moz-range-thumb { width: 12px; height: 12px; border: 3px solid #315df6; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(35,54,99,.2); }
.learning-music-audio-seek:focus-visible { filter: drop-shadow(0 0 4px rgba(49,93,246,.45)); }
.learning-music-audio-seek:disabled { cursor: wait; opacity: .55; }
.learning-music-volume-control { position: relative; display: grid; width: 34px; height: 34px; place-items: center; }
.learning-music-volume-toggle { appearance: none; display: grid; width: 34px; height: 34px; place-items: center; padding: 0; color: #53617a; border: 1px solid #d8dee9; border-radius: 11px; background: #fff; cursor: pointer; touch-action: manipulation; transition: color .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease; }
.learning-music-volume-toggle:hover,.learning-music-volume-toggle[aria-expanded="true"] { color: #315df6; border-color: #bdcbf3; background: #f7f9ff; box-shadow: 0 6px 14px rgba(49,93,246,.1); }
.learning-music-volume-toggle:focus-visible { outline: 3px solid rgba(49,93,246,.22); outline-offset: 2px; }
.learning-music-volume-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.learning-music-volume-muted-mark { display: none; }
.learning-music-volume-control.is-muted .learning-music-volume-wave { display: none; }
.learning-music-volume-control.is-muted .learning-music-volume-muted-mark { display: inline; }
.learning-music-volume-panel { position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 20; display: grid; width: 174px; grid-template-columns: minmax(0,1fr) 34px; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid #dce3ef; border-radius: 13px; background: #fff; box-shadow: 0 14px 32px rgba(31,42,69,.18); }
.learning-music-volume-panel[hidden] { display: none; }
.learning-music-audio-volume { --audio-volume:100%; appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; height: 20px; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; cursor: pointer; }
.learning-music-audio-volume::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(to right,#315df6 0 var(--audio-volume),#c8cfdb var(--audio-volume) 100%); }
.learning-music-audio-volume::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border: 3px solid #315df6; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(35,54,99,.18); }
.learning-music-audio-volume::-moz-range-track { height: 4px; border-radius: 999px; background: #c8cfdb; }
.learning-music-audio-volume::-moz-range-progress { height: 4px; border-radius: 999px; background: #315df6; }
.learning-music-audio-volume::-moz-range-thumb { width: 10px; height: 10px; border: 3px solid #315df6; border-radius: 50%; background: #fff; }
.learning-music-audio-volume:focus-visible { filter: drop-shadow(0 0 4px rgba(49,93,246,.4)); }
.learning-music-volume-output { color: #53617a; font-size: 9px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.learning-music-detail-score { overflow: hidden; }
.learning-music-detail-score header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; border-bottom: 1px solid #e7ebf3; }
.learning-music-detail-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.learning-music-share-button { appearance: none; display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; color: #fff; border: 1px solid #315df6; border-radius: 12px; background: #315df6; font: inherit; font-size: 9px; font-weight: 850; cursor: pointer; touch-action: manipulation; box-shadow: 0 7px 15px rgba(49,93,246,.16); }
.learning-music-share-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.learning-music-share-button:hover { background: #244de0; }
.learning-music-share-button:focus-visible { outline: 3px solid rgba(49,93,246,.22); outline-offset: 2px; }
.learning-music-detail-navigation { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.learning-music-detail-navigation button { appearance: none; min-width: 76px; min-height: 36px; padding: 8px 12px; color: #315df6; border: 1px solid #dbe4ff; border-radius: 12px; background: #edf2ff; font: inherit; font-size: 9px; font-weight: 850; cursor: pointer; touch-action: manipulation; }
.learning-music-detail-navigation button:hover { border-color: #b8c8ff; background: #e5edff; }
.learning-music-detail-navigation button:focus-visible { outline: 3px solid rgba(49,93,246,.22); outline-offset: 2px; }
.learning-music-detail-navigation button[aria-busy="true"] { position: relative; color: transparent; cursor: progress; opacity: .9; }
.learning-music-detail-navigation button[aria-busy="true"]::after { position: absolute; inset: 50% auto auto 50%; width: 14px; height: 14px; box-sizing: border-box; border: 2px solid rgba(49,93,246,.22); border-top-color: #315df6; border-radius: 50%; content: ""; transform: translate(-50%,-50%); animation: learning-music-navigation-spin .65s linear infinite; }
@keyframes learning-music-navigation-spin { to { transform: translate(-50%,-50%) rotate(360deg); } }
.learning-music-score-pages { display: grid; background: #eef2f8; }
.learning-music-score-empty { display: grid; min-height: 210px; place-items: center; padding: 36px 20px; color: #77849d; background: linear-gradient(180deg,#fbfcff 0%,#f3f6fb 100%); text-align: center; }
.learning-music-score-empty strong { font-size: 16px; font-weight: 850; }
.learning-music-detail-score img { display: block; width: 100%; height: auto; background: #fff; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.learning-music-pdf-viewer { --music-pdf-sidebar-width: 148px; }
.learning-music-score-reader-stack,.learning-violin-score-reader-stack { display: grid; min-width: 0; }
.learning-violin-score-reader-stack > [hidden] { display: none; }
.learning-music-compact-reader { min-width: 0; overflow: hidden; border: 1px solid #e1e7f3; border-radius: 22px; background: #fff; box-shadow: var(--home-shadow); }
.learning-music-compact-reader .learning-music-pdf-viewer { border: 0; border-radius: 0; box-shadow: none; }
.learning-music-compact-reader.has-score-selector .learning-music-pdf-toolbar { grid-template-columns: minmax(360px,1fr) auto minmax(230px,260px); }
.learning-music-compact-reader.has-score-selector .learning-music-pdf-toolbar nav { grid-column: 2; }
.learning-music-compact-reader.has-score-selector .learning-music-pdf-zoom-controls { grid-column: 3; }
.learning-violin-score-selector.is-toolbar { min-width: 0; grid-column: 1; padding: 0; border: 0; background: transparent; }
.learning-violin-score-selector.is-toolbar .learning-violin-segmented { width: min(560px,100%); margin: 0; }
.learning-music-compact-audio { padding: 12px 16px; border-top: 1px solid #dfe4ed; background: #fff; }
.learning-violin-compact-audio .learning-violin-audio-column { grid-template-columns: minmax(300px,.75fr) minmax(420px,1.25fr); align-items: center; gap: 12px; }
.learning-music-pdf-toolbar { display: grid; min-height: 48px; grid-template-columns: var(--music-pdf-sidebar-width) minmax(0,1fr) minmax(230px,260px); align-items: center; gap: 14px; padding: 7px 14px; color: #64718a; border-bottom: 1px solid #dfe4ed; background: #f8f9fc; }
.learning-music-pdf-toolbar > strong { font-size: 9px; font-weight: 850; text-align: center; }
.learning-music-pdf-toolbar nav { display: flex; grid-column: 2; align-items: center; justify-content: center; gap: 9px; }
.learning-music-pdf-toolbar nav button { appearance: none; display: grid; width: 30px; height: 30px; place-items: center; padding: 0; color: #315df6; border: 1px solid #d8e1f5; border-radius: 9px; background: #fff; font: inherit; font-size: 18px; cursor: pointer; }
.learning-music-pdf-toolbar nav button:hover:not(:disabled) { border-color: #aebff2; background: #eef3ff; }
.learning-music-pdf-toolbar nav button:disabled { color: #b4bdcd; cursor: default; opacity: .62; }
.learning-music-pdf-toolbar nav output { min-width: 48px; color: #34415a; font-size: 10px; font-weight: 850; text-align: center; font-variant-numeric: tabular-nums; }
.learning-music-pdf-zoom-controls { display: flex; min-width: 0; grid-column: 3; align-items: center; justify-content: flex-end; gap: 6px; }
.learning-music-pdf-zoom-controls > button { appearance: none; display: grid; flex: 0 0 auto; width: 30px; height: 30px; place-items: center; padding: 0; color: #315df6; border: 1px solid #d8e1f5; border-radius: 9px; background: #fff; font: inherit; cursor: pointer; }
.learning-music-pdf-zoom-controls > button:hover:not(:disabled) { border-color: #aebff2; background: #eef3ff; }
.learning-music-pdf-zoom-controls > button:disabled { color: #b4bdcd; cursor: default; opacity: .62; }
.learning-music-pdf-zoom-controls svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.learning-music-pdf-zoom-controls output { min-width: 38px; color: #34415a; font-size: 9px; font-weight: 850; text-align: center; font-variant-numeric: tabular-nums; }
.learning-music-pdf-zoom-controls > .learning-music-pdf-fit-button { display: inline-flex; width: auto; min-width: 68px; padding: 0 9px; font-size: 8px; font-weight: 850; white-space: nowrap; }
.learning-music-pdf-zoom-controls > .learning-music-pdf-fit-button.is-active { border-color: transparent; background: #e9efff; }
.learning-music-pdf-zoom-controls > .learning-music-pdf-fullscreen-button { display: inline-flex; width: auto; min-width: 68px; align-items: center; justify-content: center; padding: 0 9px; font-size: 8px; font-weight: 850; text-align: center; white-space: nowrap; }
.learning-music-pdf-zoom-controls > .learning-music-pdf-fullscreen-button[aria-pressed="true"] { border-color: #315df6; background: #e9efff; }
.learning-music-pdf-body { display: grid; height: clamp(620px,calc(100vh - 150px),900px); min-height: 0; grid-template-columns: var(--music-pdf-sidebar-width) minmax(0,1fr); overflow: hidden; background: #e9ecf2; }
.learning-music-pdf-thumbnails { display: grid; min-height: 0; align-content: start; gap: 13px; padding: 14px 12px 18px; overflow-y: auto; border-right: 1px solid #d9dee8; background: #f7f8fb; scrollbar-color: #b4bfd1 transparent; scrollbar-width: thin; }
.learning-music-pdf-thumbnails button { appearance: none; display: grid; gap: 7px; padding: 7px; color: #6f7b91; border: 2px solid transparent; border-radius: 11px; background: transparent; font: inherit; cursor: pointer; transition: border-color .16s ease,background .16s ease,box-shadow .16s ease; }
.learning-music-pdf-thumbnails button:hover { border-color: #cbd6f5; background: #fff; }
.learning-music-pdf-thumbnails button.is-active { color: #315df6; border-color: #315df6; background: #fff; box-shadow: 0 7px 16px rgba(44,63,114,.13); }
.learning-music-pdf-thumbnails button:focus-visible { outline: 3px solid rgba(49,93,246,.2); outline-offset: 2px; }
.learning-music-pdf-thumbnails img { width: 100%; height: auto; border: 1px solid #e1e5ed; background: #fff; box-shadow: 0 3px 8px rgba(38,49,76,.08); }
.learning-music-pdf-thumbnails span { font-size: 8px; font-weight: 800; text-align: center; }
.learning-music-pdf-canvas.learning-music-score-pages { position: relative; display: block; min-width: 0; min-height: 0; padding: 22px 28px; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; background: #e9ecf2; scrollbar-color: #9eabc0 transparent; scrollbar-width: thin; }
.learning-music-pdf-document { position: relative; width: var(--music-pdf-zoom-size,100%); height: var(--music-pdf-zoom-size,100%); min-width: 0; min-height: 0; margin: 0 auto 24px; overflow: hidden; }
.learning-music-pdf-document:not([hidden]) { display: block; }
.learning-music-pdf-document[hidden] { display: none; }
.learning-music-pdf-document:last-child { margin-bottom: 0; }
.learning-music-pdf-viewer .learning-music-pdf-document img { position: absolute; top: 50%; left: 50%; width: auto; height: auto; max-width: 100%; max-height: 100%; border: 1px solid #d8dde7; background: #fff; box-shadow: 0 14px 34px rgba(31,42,69,.15); object-fit: contain; transform: translate(-50%,-50%); }
.learning-music-pdf-viewer[data-page-aspect-ratio] .learning-music-pdf-document { box-sizing: border-box; width: auto; height: var(--music-pdf-page-height,var(--music-pdf-zoom-size,100%)); aspect-ratio: var(--music-pdf-page-aspect); border: 1px solid #d8dde7; background: #fff; box-shadow: 0 14px 34px rgba(31,42,69,.15); }
.learning-music-pdf-viewer[data-page-aspect-ratio] .learning-music-pdf-document img { position: static; width: 100%; height: 100%; max-width: none; max-height: none; border: 0; box-shadow: none; object-fit: contain; transform: none; }
.learning-music-pdf-viewer[data-page-aspect-ratio] .learning-music-pdf-thumbnails img { box-sizing: border-box; aspect-ratio: var(--music-pdf-page-aspect); object-fit: contain; }
.learning-music-compact-reader.is-app-fullscreen,
.learning-music-compact-reader:fullscreen,
.learning-music-compact-reader:-webkit-full-screen { position: fixed; z-index: 2100; inset: 0; display: grid; width: 100vw; height: 100dvh; grid-template-rows: minmax(0,1fr) auto; overflow: hidden; border: 0; border-radius: 0; background: #e9ecf2; box-shadow: none; contain: layout paint; }
.learning-music-compact-reader.is-app-fullscreen::backdrop,
.learning-music-compact-reader:fullscreen::backdrop { background: #e9ecf2; }
.learning-music-compact-reader.is-app-fullscreen .learning-music-score-reader-stack,
.learning-music-compact-reader.is-app-fullscreen .learning-violin-score-reader-stack,
.learning-music-compact-reader:fullscreen .learning-music-score-reader-stack,
.learning-music-compact-reader:fullscreen .learning-violin-score-reader-stack,
.learning-music-compact-reader:-webkit-full-screen .learning-music-score-reader-stack,
.learning-music-compact-reader:-webkit-full-screen .learning-violin-score-reader-stack { min-height: 0; }
.learning-music-compact-reader.is-app-fullscreen .learning-music-pdf-viewer:not([hidden]),
.learning-music-compact-reader:fullscreen .learning-music-pdf-viewer:not([hidden]),
.learning-music-compact-reader:-webkit-full-screen .learning-music-pdf-viewer:not([hidden]) { display: grid; height: 100%; min-height: 0; grid-template-rows: auto minmax(0,1fr); }
.learning-music-compact-reader.is-app-fullscreen .learning-music-pdf-body,
.learning-music-compact-reader:fullscreen .learning-music-pdf-body,
.learning-music-compact-reader:-webkit-full-screen .learning-music-pdf-body { height: 100%; }
body.is-learning-music-app-fullscreen { overflow: hidden; }
html:has(body.is-learning-music-app-fullscreen) { overflow-y: hidden; scrollbar-gutter: auto; }
.learning-music-share-backdrop { position: fixed; z-index: 1500; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(20,31,58,.62); backdrop-filter: blur(5px); }

.learning-music-share-dialog { position: relative; display: grid; width: min(420px,100%); max-height: calc(100dvh - 48px); justify-items: center; gap: 9px; padding: 28px; overflow-y: auto; box-sizing: border-box; border: 1px solid rgba(255,255,255,.8); border-radius: 26px; background: #fff; box-shadow: 0 28px 70px rgba(19,34,76,.3); text-align: center; }
.learning-music-share-close { appearance: none; position: absolute; top: 14px; right: 14px; display: grid; width: 36px; height: 36px; place-items: center; padding: 0; color: #71809b; border: 0; border-radius: 12px; background: #f0f3f9; font: inherit; font-size: 23px; cursor: pointer; }
.learning-music-share-mascot { display: block; width: 76px; height: 76px; object-fit: contain; border: 0; border-radius: 0; background: transparent; filter: drop-shadow(0 9px 12px rgba(45,103,217,.18)); }
.learning-music-share-eyebrow { color: #315df6; font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.learning-music-share-dialog h2 { margin: 0; color: #1f2d49; font-size: 22px; }
.learning-music-share-dialog > p { max-width: 330px; margin: 0; color: #65738d; font-size: 11px; line-height: 1.55; }
.learning-music-share-qr-shell { display: grid; width: 210px; height: 210px; margin-top: 5px; place-items: center; padding: 12px; border: 1px solid #e1e7f3; border-radius: 20px; background: #f8faff; }
.learning-music-share-qr-shell img { display: block; width: 100%; height: 100%; image-rendering: pixelated; -webkit-touch-callout: default; user-select: auto; }
.learning-music-share-qr-shell span { color: #74819a; font-size: 10px; line-height: 1.5; }
.learning-music-share-message { min-height: 34px; color: #677690; font-size: 10px; line-height: 1.6; }
.learning-music-share-brand { display: grid; justify-items: center; gap: 2px; color: #1f2d49; }
.learning-music-share-brand strong { font-size: 10px; font-weight: 850; }
.learning-music-share-brand span { color: #315df6; font-size: 9px; font-weight: 750; letter-spacing: .04em; }
.learning-music-share-actions { display: flex; width: 100%; gap: 9px; }
.learning-music-share-actions button { appearance: none; flex: 1 1 0; min-height: 42px; padding: 9px 12px; color: #315df6; border: 1px solid #dbe4ff; border-radius: 13px; background: #edf2ff; font: inherit; font-size: 10px; font-weight: 850; cursor: pointer; }
.learning-music-share-actions button.is-primary { color: #fff; border-color: #315df6; background: #315df6; }
.learning-music-share-actions button:disabled { cursor: wait; opacity: .65; }
.learning-music-share-image-viewer { position: fixed; z-index: 1510; inset: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; justify-items: center; gap: 12px; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); box-sizing: border-box; color: #fff; background: rgba(17,26,49,.94); }
.learning-music-share-image-viewer[hidden] { display: none; }
.learning-music-share-image-viewer > strong { font-size: 17px; }
.learning-music-share-image-viewer > img { display: block; width: auto; max-width: min(420px,100%); height: 100%; min-height: 0; max-height: calc(100dvh - 118px); object-fit: contain; border-radius: 18px; box-shadow: 0 22px 60px rgba(0,0,0,.32); -webkit-touch-callout: default; user-select: auto; }
.learning-music-share-image-viewer > small { font-size: 11px; line-height: 1.5; text-align: center; }
.learning-music-share-image-close { appearance: none; position: absolute; z-index: 1; top: 16px; right: 16px; display: grid; width: 38px; height: 38px; place-items: center; padding: 0; color: #fff; border: 1px solid rgba(255,255,255,.24); border-radius: 13px; background: rgba(255,255,255,.12); font: inherit; font-size: 24px; cursor: pointer; }

body[data-active-screen="single-practice"] .single-practice-stage,
body[data-active-screen="exam-preview"] .exam-preview-stage { min-height: 100vh; padding: 34px 24px 60px; background: transparent; }
body[data-active-screen="single-practice"] .single-practice-stage { padding-top: 28px; }
body[data-active-screen="single-practice"] .single-practice-stage {
  background:
    radial-gradient(circle at 88% 3%, rgba(114, 181, 255, .18), transparent 25rem),
    radial-gradient(circle at 8% 34%, rgba(139, 117, 255, .09), transparent 22rem),
    #f5f7fc;
}
body[data-active-screen="exam-preview"] .exam-preview-stage {
  background:
    radial-gradient(circle at 88% 3%, rgba(114, 181, 255, .18), transparent 25rem),
    radial-gradient(circle at 8% 34%, rgba(139, 117, 255, .09), transparent 22rem),
    #f5f7fc;
}
body[data-active-screen="single-practice"] .single-practice-shell,
body[data-active-screen="exam-preview"] .exam-preview-shell { width: min(1280px,100%); gap: 16px; }
body[data-active-screen="single-practice"] .single-practice-titlebar { margin-bottom: 2px; }
body[data-active-screen="single-practice"] .single-practice-hero,
body[data-active-screen="exam-preview"] .exam-preview-hero { min-height: 145px; padding: 27px 31px; border: 1px solid rgba(255,255,255,.9); border-radius: 27px; background: radial-gradient(circle at 90% 18%,rgba(100,182,255,.2),transparent 12rem),rgba(255,255,255,.94); box-shadow: var(--home-shadow); }
body[data-active-screen="single-practice"] .single-practice-kicker,
body[data-active-screen="exam-preview"] .exam-preview-kicker { color: #315df6; font-size: 9px; letter-spacing: .13em; }
body[data-active-screen="single-practice"] .single-practice-hero h1,
body[data-active-screen="exam-preview"] .exam-preview-hero h1 { color: var(--home-ink); font-size: 27px; }
body[data-active-screen="single-practice"] .single-practice-hero p:not(.single-practice-kicker) { color: var(--home-muted); font-size: 11px; }
body[data-active-screen="single-practice"] .single-practice-home-button,
body[data-active-screen="exam-preview"] .exam-preview-home-button { min-height: 43px; padding: 0 14px; color: #315df6; border: 0; border-radius: 14px; background: #edf2ff; font-size: 11px; box-shadow: none; }
body[data-active-screen="single-practice"] .single-practice-summary {
  position: relative;
  height: 198px;
  min-height: 190px;
  padding: 30px 220px 28px 31px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 28px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.22), transparent 9rem),
    linear-gradient(135deg, #315df6 0%, #477ff6 64%, #64a8f4 100%);
  box-shadow: 0 18px 42px rgba(49,93,246,.2);
}
body[data-active-screen="single-practice"] .single-practice-summary::after {
  content: "";
  position: absolute;
  right: -84px;
  bottom: -126px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
}
body[data-active-screen="single-practice"] .single-practice-summary-copy { position: relative; z-index: 2; }
body[data-active-screen="single-practice"] .single-practice-summary-copy > small {
  color: rgba(255,255,255,.72);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .16em;
}
body[data-active-screen="single-practice"] .single-practice-summary h2 {
  margin: 8px 0 0;
  color: #fff;
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: -.035em;
}
body[data-active-screen="single-practice"] .single-practice-summary p {
  max-width: 430px;
  margin: 12px 0 0;
  color: rgba(255,255,255,.78);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.65;
}
body[data-active-screen="single-practice"] .single-practice-summary-tags { display: flex; gap: 8px; margin-top: 18px; }
body[data-active-screen="single-practice"] .single-practice-summary-tags span {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.12);
  font-size: 9px;
  font-weight: 800;
}
body[data-active-screen="single-practice"] .single-practice-summary-art {
  position: absolute;
  z-index: 1;
  right: 32px;
  bottom: -16px;
  width: 180px;
  height: 180px;
}
body[data-active-screen="single-practice"] .single-practice-summary-art img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 170px;
  height: 170px;
  object-fit: contain;
  filter: drop-shadow(0 15px 20px rgba(20,54,145,.24));
}
body[data-active-screen="single-practice"] .single-practice-summary-note,
body[data-active-screen="single-practice"] .single-practice-summary-spark {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #315df6;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 18px rgba(33,64,145,.16);
  font-weight: 850;
}
body[data-active-screen="single-practice"] .single-practice-summary-note.note-one { top: 13px; left: 0; width: 34px; height: 34px; color: #7b5ce2; font-size: 14px; }
body[data-active-screen="single-practice"] .single-practice-summary-note.note-two { top: -3px; right: 5px; width: 40px; height: 40px; font-size: 15px; }
body[data-active-screen="single-practice"] .single-practice-summary-spark { top: 48px; right: 1px; width: 27px; height: 27px; color: #19a987; font-size: 12px; }
body[data-active-screen="single-practice"] .single-practice-categories {
  padding: 25px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 28px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 34px rgba(45,67,128,.08);
}
body[data-active-screen="single-practice"] .single-practice-categories-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 0 2px 18px;
  border-bottom: 1px solid var(--home-line);
}
body[data-active-screen="single-practice"] .single-practice-categories-heading small { color: #98a2b8; font-size: 9px; font-weight: 850; letter-spacing: .16em; }
body[data-active-screen="single-practice"] .single-practice-categories-heading h2 { margin: 5px 0 0; color: var(--home-ink); font-size: 23px; }
body[data-active-screen="single-practice"] .single-practice-categories-heading > span { padding: 7px 10px; border-radius: 11px; color: #315df6; background: #edf2ff; font-size: 9px; font-weight: 800; }
body[data-active-screen="single-practice"] .single-practice-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px 14px;
}
body[data-active-screen="single-practice"] .single-practice-card {
  position: relative;
  min-height: 78px;
  grid-template-columns: 46px minmax(0,1fr) 16px;
  gap: 13px;
  padding: 11px 13px;
  border: 1px solid #edf0f6;
  border-radius: 18px;
  background: #fbfcff;
  box-shadow: none;
  touch-action: pan-y;
}
body[data-active-screen="single-practice"] .single-practice-card::before {
  content: "";
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  color: #315df6;
  background: #e9efff;
  font-size: 12px;
  font-weight: 850;
}
body[data-active-screen="single-practice"] .single-practice-card::after { content: "›"; color: #9fa8b9; font-size: 23px; font-weight: 450; }
body[data-active-screen="single-practice"] .single-practice-card:nth-child(4n + 2)::before { color: #785bd6; background: #f0eaff; }
body[data-active-screen="single-practice"] .single-practice-card:nth-child(4n + 3)::before { color: #168e70; background: #e4f8ef; }
body[data-active-screen="single-practice"] .single-practice-card:nth-child(4n + 4)::before { color: #238ab8; background: #e6f6fc; }
body[data-active-screen="single-practice"] .single-practice-card:focus-visible { border-color: rgba(49,93,246,.22); background: #fff; box-shadow: 0 10px 22px rgba(45,67,128,.08); }
@media (hover: hover) and (pointer: fine) {
  body[data-active-screen="single-practice"] .single-practice-card:hover { transform: translateY(-1px); border-color: rgba(49,93,246,.22); background: #fff; box-shadow: 0 10px 22px rgba(45,67,128,.08); }
}
body[data-active-screen="single-practice"] .single-practice-card-main { gap: 4px; }
body[data-active-screen="single-practice"] .single-practice-card-title { color: var(--home-ink); font-size: 14px; }
body[data-active-screen="single-practice"] .single-practice-card-copy { color: var(--home-muted); font-size: 9px; line-height: 1.5; }
body[data-locale="en-GB"][data-active-screen="single-practice"] .single-practice-categories-heading { padding-bottom: 22px; }
body[data-active-screen="exam-preview"] .exam-preview-paper-grid { gap: 12px; }
body[data-active-screen="exam-preview"] .exam-preview-paper-card { min-height: 105px; padding: 20px 23px; border: 1px solid rgba(255,255,255,.9); border-radius: 23px; background: rgba(255,255,255,.94); box-shadow: 0 9px 26px rgba(45,67,128,.07); }
body[data-active-screen="exam-preview"] .exam-preview-paper-title { color: var(--home-ink); font-size: 17px; }
body[data-active-screen="exam-preview"] .exam-preview-paper-eyebrow { color: #98a0b2; font-size: 9px; }
body[data-active-screen="exam-preview"] .exam-preview-paper-lock { margin-left: 0; align-self: center; justify-self: center; }
body[data-active-screen="exam-preview"] .exam-preview-paper-options { padding: 10px; border: 0; border-radius: 18px; background: white; box-shadow: 0 9px 26px rgba(45,67,128,.07); }

body[data-active-screen="login"] .login-panel,
body[data-active-screen="recharge"] .login-panel,
body[data-active-screen="feedback"] .login-panel {
  border-color: rgba(255,255,255,.9);
  border-radius: 28px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--home-shadow);
}

body[data-active-screen="login"] .login-stage,
body[data-active-screen="recharge"] .login-stage,
body[data-active-screen="feedback"] .login-stage {
  min-height: 100vh;
  align-items: flex-start;
  padding: 42px 24px 60px;
  background:
    radial-gradient(circle at 8% 0%, rgba(120,185,255,.13), transparent 27rem),
    radial-gradient(circle at 90% 22%, rgba(175,153,255,.09), transparent 24rem),
    #f7f8fc;
}

body[data-active-screen="login"] .login-header,
body[data-active-screen="recharge"] .login-header,
body[data-active-screen="feedback"] .login-header { display: none; }

body[data-active-screen="login"] .login-shell { width: min(500px,100%); gap: 0; }
.login-modal-backdrop,
.login-modal-close { display: none; }

@media (min-width: 0px) {
  body[data-auth-overlay-open="true"] {
    overflow: hidden;
  }

  body[data-auth-overlay-open="true"] .login-stage {
    position: fixed;
    z-index: 500;
    inset: 0;
    display: grid;
    min-height: 0;
    place-items: center;
    box-sizing: border-box;
    padding: 24px;
    border: 0;
    background: transparent;
  }

  body[data-auth-overlay-open="true"] .login-modal-backdrop {
    position: absolute;
    display: block;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(24,31,55,.56);
    backdrop-filter: blur(4px);
    cursor: default;
  }

  body[data-auth-overlay-open="true"] .login-shell {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(500px,calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    gap: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 30px 34px 32px;
    overflow: auto;
    border: 0;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15,24,50,.3);
  }

  body[data-auth-overlay-open="true"] .login-shell:has(.login-mode-tabs) {
    height: min(754px, calc(100vh - 48px));
  }

  body[data-auth-overlay-open="true"] .login-shell:has(.login-mode-tab[data-mode="login"].is-active) .login-panel {
    display: flex;
    flex: 1;
    flex-direction: column;
  }

  body[data-auth-overlay-open="true"] .login-shell:has(.login-mode-tab[data-mode="login"].is-active) .login-form {
    flex: 1;
  }

  body[data-auth-overlay-open="true"] .login-shell:has(.login-mode-tab[data-mode="login"].is-active) .login-actions {
    margin-top: auto;
  }

  body[data-auth-overlay-open="true"] .login-modal-close {
    position: absolute;
    z-index: 4;
    top: 16px;
    right: 18px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    color: #7e889d;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font: inherit;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
  }

  body[data-auth-overlay-open="true"] .login-modal-close:hover,
  body[data-auth-overlay-open="true"] .login-modal-close:focus-visible {
    color: var(--xiyue-ink);
    background: #f2f4f8;
  }

  body[data-auth-overlay-open="true"] .login-header {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 0 42px 18px;
    text-align: center;
  }

  body[data-auth-overlay-open="true"] .login-header img {
    width: 52px;
    height: 52px;
    object-fit: contain;
  }

  body[data-auth-overlay-open="true"] .login-header .brand-line {
    color: var(--xiyue-muted);
    font-size: 11px;
    font-weight: 700;
  }

  body[data-auth-overlay-open="true"] .login-panel {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-auth-overlay-open="true"] .account-auth-back,
  body[data-auth-overlay-open="true"] .login-kicker,
  body[data-auth-overlay-open="true"] .account-language-entry,
  body[data-auth-overlay-open="true"] .home-mobile-nav {
    display: none;
  }

  body[data-auth-overlay-open="true"] .login-copy {
    margin: 0 0 18px;
    text-align: center;
  }

  body[data-auth-overlay-open="true"] .login-copy h1 {
    margin: 0;
    color: var(--xiyue-ink);
    font-size: 27px;
    line-height: 1.2;
    letter-spacing: -.035em;
  }

  body[data-auth-overlay-open="true"] .login-copy > p:not(.login-hint):not(.login-message) {
    display: none;
  }

  body[data-auth-overlay-open="true"] .login-copy .login-hint {
    max-width: 370px;
    margin: 8px auto 0;
    color: var(--xiyue-muted);
    font-size: 11px;
    line-height: 1.6;
  }

  body[data-auth-overlay-open="true"] .login-copy .login-message {
    margin: 11px 0 0;
    padding: 9px 11px;
    color: #315df6;
    border-radius: 10px;
    background: #f0f4ff;
    font-size: 10px;
    line-height: 1.5;
  }

  body[data-auth-overlay-open="true"] .login-mode-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 0;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #e8ebf2;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-auth-overlay-open="true"] .login-mode-tab {
    position: relative;
    height: 40px;
    padding: 0;
    color: #8992a4;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
    font-weight: 750;
  }

  body[data-auth-overlay-open="true"] .login-mode-tab.is-active {
    color: var(--xiyue-blue-600);
    background: transparent;
    box-shadow: none;
  }

  body[data-auth-overlay-open="true"] .login-mode-tab.is-active::after {
    position: absolute;
    right: 26%;
    bottom: -1px;
    left: 26%;
    height: 2px;
    border-radius: 999px;
    background: var(--xiyue-blue-600);
    content: "";
  }

  body[data-auth-overlay-open="true"] .login-form {
    gap: 14px;
  }

  body[data-auth-overlay-open="true"] .login-field {
    gap: 6px;
    color: #4d586d;
    font-size: 11px;
  }

  body[data-auth-overlay-open="true"] .login-field input,
  body[data-auth-overlay-open="true"] .password-input-shell {
    height: 46px;
  }

  body[data-auth-overlay-open="true"] .login-field input {
    color: var(--xiyue-ink);
    border: 1px solid transparent;
    border-radius: 12px;
    background: #f4f6f9;
    font-size: 12px;
  }

  body[data-auth-overlay-open="true"] .login-field input:focus {
    border-color: #b7c7ff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(49,93,246,.08);
  }

  body[data-auth-overlay-open="true"] .password-input-shell > input {
    height: 46px;
  }

  body[data-auth-overlay-open="true"] .login-identity-picker legend {
    margin-bottom: 9px;
    color: #4d586d;
    font-size: 11px;
  }

  body[data-auth-overlay-open="true"] .login-identity-picker > div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
  }

  body[data-auth-overlay-open="true"] .login-identity-picker label,
  body[data-auth-overlay-open="true"] .login-identity-picker label:has(input:checked) {
    min-height: 24px;
    gap: 7px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-auth-overlay-open="true"] .login-identity-picker input {
    width: 15px;
    height: 15px;
  }

  body[data-auth-overlay-open="true"] .login-identity-picker strong {
    font-size: 11px;
  }

  body[data-auth-overlay-open="true"] .login-actions {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 7px;
  }

  body[data-auth-overlay-open="true"] .login-button {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
  }

  body[data-auth-overlay-open="true"] .login-button-primary {
    width: 100%;
    color: #fff;
    background: var(--xiyue-blue-600);
    box-shadow: 0 10px 24px rgba(49,93,246,.18);
  }

  body[data-auth-overlay-open="true"] .login-actions .login-button:not(.login-button-primary) {
    min-height: 34px;
    color: var(--xiyue-muted);
    background: transparent;
  }

  body[data-auth-overlay-open="true"] .login-code-row {
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
  }

  body[data-auth-overlay-open="true"] .login-code-button {
    min-width: 88px;
    padding: 0 10px;
    color: var(--xiyue-blue-600);
    background: #eef2ff;
    box-shadow: none;
  }

  body[data-auth-overlay-open="true"] .login-form-links {
    padding: 0 2px;
  }

  body[data-auth-overlay-open="true"] .login-form-links button {
    color: var(--xiyue-blue-600);
    font-size: 10px;
  }
}

body[data-active-screen="recharge"] .account-feature-shell,
body[data-active-screen="feedback"] .account-feature-shell { width: min(1280px,100%); gap: 18px; }
body[data-active-screen="recharge"] .recharge-stage,
body[data-active-screen="feedback"] .feedback-stage { padding: 28px 24px 60px; }
body[data-active-screen="recharge"] .account-feature-titlebar,
body[data-active-screen="feedback"] .account-feature-titlebar { height: 60px; min-height: 60px; }

.account-feature-titlebar { height: 53px; min-height: 53px; margin-bottom: 0; }
.account-feature-intro-heading { margin: 0 0 9px; color: var(--home-ink); font-size: 21px; letter-spacing: -.02em; }

body[data-active-screen="login"] .login-panel,
body[data-active-screen="recharge"] .login-panel,
body[data-active-screen="feedback"] .login-panel { padding: 31px; }

body[data-active-screen="login"] .login-copy h1,
body[data-active-screen="recharge"] .login-copy h1,
body[data-active-screen="feedback"] .login-copy h1 { color: var(--home-ink); font-size: 27px; letter-spacing: -.03em; }
body[data-active-screen="login"] .login-copy p,
body[data-active-screen="recharge"] .login-copy p,
body[data-active-screen="feedback"] .login-copy p { color: var(--home-muted); font-size: 12px; line-height: 1.7; }
body[data-active-screen="login"] .login-kicker,
body[data-active-screen="recharge"] .login-kicker,
body[data-active-screen="feedback"] .login-kicker { color: #315df6; font-size: 9px; letter-spacing: .13em; }

body[data-active-screen="login"] .login-mode-tabs { gap: 5px; padding: 5px; border: 0; border-radius: 16px; background: #f2f4f8; }
body[data-active-screen="login"] .login-mode-tab { height: 40px; border-radius: 12px; font-size: 12px; }
body[data-active-screen="login"] .login-mode-tab.is-active { color: #315df6; background: white; box-shadow: 0 5px 14px rgba(38,57,105,.08); }

body[data-active-screen="login"] .login-form-links { padding: 0 3px; }
body[data-active-screen="login"] .login-form-links button { color: #315df6; font-size: 11px; font-weight: 700; }
body[data-active-screen="login"] .login-form-links .login-forgot-password { color: var(--home-muted); }

body[data-active-screen="login"] .login-field,
body[data-active-screen="feedback"] .login-field { color: var(--home-ink); font-size: 11px; }
body[data-active-screen="login"] .login-field input,
body[data-active-screen="feedback"] .login-field textarea { border-color: #e4e8f0; background: #fafbfe; color: var(--home-ink); font-size: 12px; }

body[data-active-screen="login"] .login-button,
body[data-active-screen="recharge"] .login-button,
body[data-active-screen="feedback"] .login-button { min-height: 46px; height: auto; border-color: #e1e7f2; border-radius: 15px; color: #315df6; font-size: 12px; }
body[data-active-screen="login"] .login-button-primary,
body[data-active-screen="recharge"] .login-button-primary,
body[data-active-screen="feedback"] .login-button-primary { color: white; border: 0; background: linear-gradient(135deg,#4773ff,#315df6); box-shadow: 0 10px 22px rgba(49,93,246,.2); }

body[data-active-screen="recharge"] .recharge-panel { gap: 16px; }
body[data-active-screen="recharge"] .recharge-feature { padding: 6px 11px; border: 0; border-radius: 999px; color: #315df6 !important; background: #edf2ff; font-size: 10px !important; }
body[data-active-screen="recharge"] .recharge-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
body[data-active-screen="recharge"] .recharge-summary-item { min-height: 105px; align-content: center; padding: 17px; border: 0; border-radius: 18px; background: #f5f7fb; }
body[data-active-screen="recharge"] .recharge-summary-item span { color: #315df6; font-size: 10px; }
body[data-active-screen="recharge"] .recharge-summary-item strong { color: var(--home-ink); font-size: 12px; line-height: 1.65; }
body[data-active-screen="recharge"] .recharge-benefits h2 { color: var(--home-ink); font-size: 18px; }
body[data-active-screen="recharge"] .recharge-benefit-list { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
body[data-active-screen="recharge"] .recharge-benefit-item { min-height: 150px; align-content: start; padding: 17px; border: 0; border-radius: 19px; background: #f7f8fc; }
body[data-active-screen="recharge"] .recharge-benefit-item span { color: #315df6; background: #eaf0ff; font-size: 9px; }
body[data-active-screen="recharge"] .recharge-benefit-item strong { color: var(--home-ink); font-size: 13px; }
body[data-active-screen="recharge"] .recharge-benefit-item p { color: var(--home-muted); font-size: 10px; line-height: 1.6; }
body[data-active-screen="recharge"] .membership-benefit-summary { display: flex; align-items: center; gap: 22px; padding: 16px 19px; border-radius: 16px; background: #f7f8fc; }
body[data-active-screen="recharge"] .membership-benefit-summary > strong { flex: 0 0 auto; color: var(--home-ink); font-size: 13px; }
body[data-active-screen="recharge"] .membership-benefit-summary > div { display: flex; flex-wrap: wrap; gap: 10px 20px; }
body[data-active-screen="recharge"] .membership-benefit-summary span { color: var(--home-muted); font-size: 11px; font-weight: 700; }
body[data-active-screen="recharge"] .membership-benefit-summary span::before { content: "✓"; margin-right: 6px; color: #315df6; font-weight: 900; }
body[data-active-screen="recharge"] .recharge-note { padding: 14px 16px; border: 0; border-radius: 16px; background: #e9f8f2; }
body[data-active-screen="recharge"] .recharge-note strong { color: #168e70; font-size: 12px; }
body[data-active-screen="recharge"] .recharge-note p { color: #527267; font-size: 10px; }
body[data-active-screen="recharge"] .recharge-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
body[data-active-screen="recharge"] .membership-recharge-actions { grid-template-columns: minmax(180px,280px); justify-content: start; }

body[data-active-screen="feedback"] .feedback-upload-card,
body[data-active-screen="feedback"] .feedback-preview { border-color: #dfe5ef; border-radius: 16px; background: #f7f9fc; }
body[data-active-screen="feedback"] .feedback-field { grid-template-rows: 16px auto; min-width: 0; }
body[data-active-screen="feedback"] .feedback-field > span:first-child { line-height: 16px; }
body[data-active-screen="feedback"] .feedback-field textarea { height: 184px; min-height: 184px; box-sizing: border-box; }
body[data-active-screen="feedback"] .feedback-counter { position: absolute; right: 14px; bottom: 12px; max-width: calc(100% - 28px); height: auto; line-height: 1.4; color: #7c879b; font-size: 12px; font-weight: 500; pointer-events: none; }
body[data-active-screen="feedback"] .feedback-actions { display: grid; grid-template-columns: minmax(180px,280px); justify-content: start; }

@media (min-width: 641px) {
  body[data-active-screen="feedback"] .feedback-form {
    grid-template-columns: minmax(0,1fr);
    align-items: start;
  }
  body[data-active-screen="feedback"] .feedback-attachments { margin-top: 0; }
  body[data-active-screen="feedback"] .feedback-upload-card:not(.is-compact) { min-height: 184px; }
}

.password-input-shell { position: relative; display: block; width: 100%; }
.password-input-shell > input { padding-right: 50px !important; }
.password-input-shell > button { position: absolute; z-index: 2; top: 50%; right: 8px; display: grid; width: 38px; height: 38px; place-items: center; padding: 0; color: #7c879d; border: 0; border-radius: 12px; background: transparent; transform: translateY(-50%); }
.password-input-shell > button:hover,.password-input-shell > button:focus-visible { color: #315df6; background: #edf2ff; }
.password-input-shell svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; pointer-events: none; }
.password-eye-slash { opacity: 0; }
.password-input-shell > button.is-visible .password-eye-slash { opacity: 1; }

body[data-active-screen="login"] .login-button,
body[data-active-screen="recharge"] .login-button,
body[data-active-screen="feedback"] .login-button,
body[data-active-screen="login"] .login-field input,
body[data-active-screen="feedback"] .login-field textarea { border-radius: 14px; }

body[data-active-screen="login"] .login-shell:has(.account-ui-heading) { width: min(1280px, 100%); }
body[data-active-screen="login"] .login-panel:has(.account-ui-heading) { padding: 0; border: 0; background: transparent; box-shadow: none; }
body[data-active-screen="login"] .login-stage:has(.account-ui-heading) { padding: 28px 24px 60px; }

.account-ui-heading { display: flex; height: 60px; box-sizing: border-box; align-items: center; justify-content: flex-start; gap: 14px; margin-bottom: 18px; }
.account-ui-heading p { margin: 0 0 2px; color: #98a0b2; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.account-ui-heading h1 { margin: 0; color: var(--home-ink); font-size: 28px; }
.account-ui-heading > button,.account-auth-back { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; padding: 0; color: #315df6; border: 0; border-radius: 15px; background: white; box-shadow: 0 9px 26px rgba(45,67,128,.07); font-size: 27px; font-weight: 500; }
.account-auth-back { margin-bottom: 17px; }
.language-settings-heading { height: 60px; min-height: 60px; box-sizing: border-box; }
.account-ui-hero { position: relative; display: flex; min-height: 132px; align-items: center; gap: 20px; overflow: hidden; padding: 24px 27px; border-radius: 28px; background: radial-gradient(circle at 92% 5%,rgba(103,193,255,.17),transparent 13rem),linear-gradient(120deg,#fff,#f5f8ff); box-shadow: var(--home-shadow); }
.account-ui-mascot { display: grid; width: 84px; height: 84px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 27px; background: linear-gradient(145deg,#e9f4ff,#edf0ff); }
.account-ui-mascot img { width: 94px; height: 94px; object-fit: contain; transform: translateY(4px); }
.account-ui-identity { display: grid; gap: 4px; }
.account-ui-mobile-kicker { display: none; }
.account-ui-identity small,.account-ui-identity span { color: #98a0b2; font-size: 11px; }
.account-ui-identity strong { color: var(--home-ink); font-size: 22px; }
.account-ui-vip { display: grid; gap: 2px; margin-left: auto; padding: 10px 14px; color: #315df6; border-radius: 15px; background: #eaf0ff; text-align: center; }
.account-ui-vip strong { font-size: 11px; }.account-ui-vip small { color: #6f84cc; font-size: 8px; }
.account-ui-message { margin: 12px 0 0; padding: 10px 13px; color: #60708f; border-radius: 13px; background: rgba(255,255,255,.7); font-size: 10px; text-align: center; }
.account-ui-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 18px; }
.account-ui-card { overflow: hidden; padding: 23px; border-radius: 27px; background: rgba(255,255,255,.94); box-shadow: var(--home-shadow); }
.account-ui-card header { display: flex; height: 35px; box-sizing: border-box; align-items: baseline; justify-content: space-between; padding: 0 2px 15px; border-bottom: 1px solid var(--home-line); }
.account-ui-card header > strong { color: var(--home-ink); font-size: 16px; }.account-ui-card header small { color: #98a0b2; font-size: 8px; font-weight: 750; letter-spacing: .1em; }
.account-ui-card > div { display: grid; }
.account-ui-card button { display: flex; min-height: 68px; align-items: center; gap: 12px; padding: 12px 2px; text-align: left; border: 0; border-bottom: 1px solid var(--home-line); background: transparent; }
.account-ui-card button:last-child { border-bottom: 0; }
.account-ui-card button > span { display: grid; min-width: 0; gap: 4px; }.account-ui-card button strong { color: var(--home-ink); font-size: 13px; }.account-ui-card button small { color: #98a0b2; font-size: 10px; }.account-ui-card button b { margin-left: auto; color: #98a0b2; font-size: 22px; font-weight: 400; }
.account-ui-card .account-ui-logout strong { color: #e34f67; }
.account-ui-wrong-count { height: 14px; margin: 14px 0 0; color: #98a0b2; font-size: 10px; line-height: 14px; text-align: center; }
.login-panel:has(.account-ui-heading) .account-password-panel { margin: 14px 0 0; border: 0; border-radius: 20px; background: white; box-shadow: var(--home-shadow); }

.account-language-entry { display: flex; width: 100%; min-height: 62px; align-items: center; gap: 12px; margin-top: 15px; padding: 11px 15px; color: var(--home-ink); text-align: left; border: 1px solid #e5e9f2; border-radius: 17px; background: #f8faff; }
.account-language-entry > span { display: grid; min-width: 0; gap: 3px; }
.account-language-entry strong { font-size: 12px; }
.account-language-entry small { color: #8b94a7; font-size: 9px; }
.account-language-entry b { margin-left: auto; color: #98a0b2; font-size: 21px; font-weight: 400; }
.account-language-entry:hover,.account-language-entry:focus-visible { border-color: #bdcafa; background: #f0f4ff; }
.account-about-entry { margin-top: 9px; }

.about-us-hero { position: relative; display: flex; min-height: 192px; align-items: center; overflow: hidden; box-sizing: border-box; padding: 34px 38px; color: white; border-radius: 28px; background: radial-gradient(circle at 83% 20%,rgba(255,255,255,.24),transparent 12rem),linear-gradient(135deg,#315df6 0%,#477ff6 62%,#65a9f4 100%); box-shadow: 0 18px 42px rgba(49,93,246,.2); }
.about-us-hero::after { position: absolute; right: -92px; bottom: -142px; width: 350px; height: 350px; border: 1px solid rgba(255,255,255,.26); border-radius: 50%; content: ""; }
.about-us-hero > div { position: relative; z-index: 1; max-width: 560px; }
.about-us-hero small,.about-us-card > small { font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.about-us-hero small { color: rgba(255,255,255,.82); }
.about-us-hero h2 { margin: 8px 0 0; font-size: 30px; line-height: 1.22; }
.about-us-hero p { margin: 12px 0 0; color: rgba(255,255,255,.84); font-size: 12px; line-height: 1.7; }
.about-us-hero img { position: absolute; z-index: 1; right: 38px; bottom: -13px; width: 184px; height: 184px; object-fit: contain; filter: drop-shadow(0 16px 22px rgba(22,65,178,.25)); }
.about-us-grid { display: grid; grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); gap: 18px; margin-top: 18px; }
.about-us-card { box-sizing: border-box; padding: 27px; border-radius: 27px; background: rgba(255,255,255,.95); box-shadow: var(--home-shadow); }
.about-us-card > small { color: #98a0b2; }
.about-us-card h2 { margin: 7px 0 0; color: var(--home-ink); font-size: 21px; }
.about-us-intro-card p { margin: 18px 0 0; color: #6f7b93; font-size: 11px; line-height: 2; }
.about-us-details { display: grid; margin: 17px 0 0; }
.about-us-details > div { display: grid; grid-template-columns: 132px minmax(0,1fr); gap: 17px; padding: 12px 0; border-top: 1px solid var(--home-line); }
.about-us-details dt { color: #98a0b2; font-size: 10px; }
.about-us-details dd { min-width: 0; margin: 0; color: var(--home-ink); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.about-us-details a { color: #315df6; text-decoration: none; }
.about-us-details a:hover,.about-us-details a:focus-visible { text-decoration: underline; }
.about-us-phone { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; }
.about-us-phone button { padding: 4px 8px; color: #315df6; border: 1px solid #cfdaff; border-radius: 8px; background: #f2f5ff; font-size: 9px; font-weight: 700; }
.about-us-phone button:hover,.about-us-phone button:focus-visible { border-color: #315df6; background: #eaf0ff; }

.account-language-settings-card { display: grid; height: 232px; grid-template-columns: minmax(0,.72fr) minmax(0,1.28fr); align-items: center; gap: 30px; box-sizing: border-box; padding: 29px; border-radius: 27px; background: white; box-shadow: var(--home-shadow); }
.account-language-settings-card > * { min-width: 0; }
.account-language-intro { display: flex; height: 122px; flex-direction: column; justify-content: center; }
.account-language-intro > small { color: #98a0b2; font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.account-language-intro h2 { margin: 6px 0 0; color: var(--home-ink); font-size: 21px; line-height: 1.25; }
.account-language-intro p { max-width: 430px; margin: 10px 0 0; color: #7d879b; font-size: 10px; line-height: 1.75; }
.account-language-options { display: grid; width: 100%; height: 122px; min-width: 0; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.account-language-option { position: relative; display: grid; width: 100%; height: 122px; min-width: 0; min-height: 122px; align-content: center; justify-items: center; gap: 9px; box-sizing: border-box; padding: 14px 10px; color: var(--home-ink); text-align: center; border: 1.5px solid #e4e9f3; border-radius: 19px; background: #f9faff; }
.account-language-radio { display: block; width: 18px; height: 18px; border: 2px solid #9299a8; border-radius: 50%; }
.account-language-option-copy { display: grid; gap: 4px; }
.account-language-option-copy strong { font-size: 13px; }
.account-language-option-copy small { color: #9099ab; font-size: 8px; line-height: 1.45; }
.account-language-option > b { color: #315df6; font-size: 8px; font-weight: 750; }
.account-language-option.is-selected { border-color: #315df6; background: #edf2ff; box-shadow: 0 8px 20px rgba(49,93,246,.1); }
.account-language-option.is-selected .account-language-radio { border: 5px solid #315df6; }
.account-language-option.is-disabled { cursor: not-allowed; opacity: .58; }
.account-language-device-note { grid-column: 1 / -1; height: 29px; box-sizing: border-box; margin: -7px 0 0; padding-top: 14px; color: #98a0b2; border-top: 1px solid #edf0f5; font-size: 9px; line-height: 14px; text-align: center; }

.login-identity-picker { margin: 0; padding: 0; border: 0; }
.login-identity-picker legend { margin-bottom: 9px; color: #5d6880; font-size: 11px; font-weight: 700; }
.login-identity-picker > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.login-identity-picker label { position: relative; display: flex; min-height: 68px; align-items: center; gap: 11px; padding: 14px; cursor: pointer; border: 1.5px solid #e4e9f3; border-radius: 17px; background: #f9faff; transition: border-color .18s ease,background .18s ease,box-shadow .18s ease; }
.login-identity-picker label:has(input:checked) { border-color: #315df6; background: #edf2ff; box-shadow: 0 8px 20px rgba(49,93,246,.1); }
.login-identity-picker input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: #315df6; }
.login-identity-picker label > span { display: grid; gap: 4px; }
.login-identity-picker strong { color: var(--home-ink); font-size: 13px; }
.login-identity-picker small { color: #8a94a9; font-size: 9px; line-height: 1.45; }

body[data-active-screen="login"] .login-shell:has(.teacher-student-heading) { width: min(1280px,100%); }
body[data-active-screen="login"] .login-panel:has(.teacher-student-heading) { padding: 0; border: 0; background: transparent; box-shadow: none; }
.teacher-student-heading { margin-bottom: 18px; }
.teacher-student-action-card small,.teacher-student-list-card header small,.teacher-student-day-card > small { color: #98a0b2; font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.account-identity-management-card { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(520px,1.2fr); align-items: center; gap: 32px; padding: 28px; border-radius: 25px; background: white; box-shadow: var(--home-shadow); }
.account-identity-management-card > div:first-child small { color: #98a0b2; font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.account-identity-management-card h2 { margin: 5px 0 0; color: var(--home-ink); font-size: 20px; }
.account-identity-management-card p { max-width: 480px; margin: 9px 0 0; color: #7d879b; font-size: 10px; line-height: 1.7; }
.account-identity-management-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.account-identity-management-options button { display: grid; min-height: 92px; place-content: center; justify-items: center; gap: 7px; padding: 14px; color: var(--home-ink); border: 1.5px solid #e4e9f3; border-radius: 18px; background: #f9faff; }
.account-identity-management-options button > span { display: block; width: 17px; height: 17px; border: 2px solid #9299a8; border-radius: 50%; }
.account-identity-management-options button strong { font-size: 13px; }
.account-identity-management-options button small { color: #315df6; font-size: 8px; font-weight: 750; }
.account-identity-management-options button.is-selected { border-color: #315df6; background: #edf2ff; box-shadow: 0 8px 20px rgba(49,93,246,.1); }
.account-identity-management-options button.is-selected > span { border: 5px solid #315df6; }
.teacher-student-action-card,.teacher-student-list-card { margin-top: 16px; padding: 23px; border-radius: 25px; background: white; box-shadow: var(--home-shadow); }
.teacher-student-action-card { display: grid; min-height: 120.5px; box-sizing: border-box; grid-template-columns: minmax(260px,1fr) minmax(330px,.9fr); align-items: center; gap: 26px; }
.teacher-student-action-card h2,.teacher-student-list-card h2,.teacher-student-calendar-card h2,.teacher-student-day-card h2 { margin: 4px 0 0; color: var(--home-ink); font-size: 20px; }
.teacher-student-action-card p { max-width: 560px; margin: 8px 0 0; color: #7d879b; font-size: 10px; line-height: 1.65; }
.teacher-student-code-entry { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.teacher-student-code-entry input { min-width: 0; height: 48px; padding: 0 15px; color: var(--home-ink); border: 1.5px solid #e2e7f1; border-radius: 14px; outline: 0; font-size: 17px; font-weight: 750; letter-spacing: .12em; }
.teacher-student-code-entry input:focus { border-color: #315df6; box-shadow: 0 0 0 3px rgba(49,93,246,.1); }
.teacher-student-code-entry button,.teacher-student-primary-button { min-height: 48px; padding: 0 20px; color: white; border: 0; border-radius: 14px; background: #315df6; font-size: 11px; font-weight: 750; box-shadow: 0 8px 18px rgba(49,93,246,.2); }
.student-binding-code-box { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; justify-items: start; gap: 4px 12px; padding: 15px 18px; border: 1px dashed #9badef; border-radius: 16px; background: #f1f4ff; }
.student-binding-code-box strong { grid-column: 1; grid-row: 1; margin: 0; color: #315df6; font-size: 24px; line-height: 1; letter-spacing: .16em; user-select: all; }
.student-binding-code-copy { grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px; color: #315df6; border: 1px solid #c6d3ff; border-radius: 11px; background: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.teacher-student-action-card:has(.student-binding-code-box) { grid-template-columns: minmax(280px,1fr) auto auto; }
.teacher-student-action-card.teacher-student-identity-required { grid-template-columns: minmax(280px,1fr) auto; }
.teacher-student-list-card > header { display: flex; height: 63px; box-sizing: border-box; align-items: center; justify-content: space-between; padding-bottom: 17px; border-bottom: 1px solid #edf0f5; }
.teacher-student-list-card > header > div { display: grid; gap: 3px; }
.teacher-student-list-card > header > span { display: grid; min-width: 36px; height: 28px; box-sizing: border-box; place-items: center; padding: 0 11px; color: #315df6; border-radius: 999px; background: #edf2ff; font-size: 9px; font-weight: 750; }
.teacher-student-list-card > header.teacher-student-selected-group-header { position: relative; display: grid; grid-template-columns: 38px minmax(0,1fr) auto 38px; justify-content: initial; gap: 11px; }
.teacher-student-selected-group-header > button { display: grid; width: 36px; height: 36px; place-items: center; padding: 0 0 3px; color: #315df6; border: 1px solid #dfe6f5; border-radius: 12px; background: #f5f7ff; font-size: 25px; line-height: 1; }
.teacher-student-group-actions { position: relative; z-index: 8; }
.teacher-student-group-actions > summary { position: relative; display: block; width: 36px; height: 28px; box-sizing: border-box; padding: 0; color: #315df6; border: 1px solid #dfe6f5; border-radius: 999px; background: #f5f7ff; cursor: pointer; font-size: 0; list-style: none; }
.teacher-student-group-actions > summary::before { position: absolute; top: 50%; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: currentColor; box-shadow: -7px 0 currentColor,7px 0 currentColor; content: ""; transform: translate(-50%,-50%); }
.teacher-student-group-actions > summary::-webkit-details-marker { display: none; }
.teacher-student-group-actions-popover { position: absolute; top: calc(100% + 8px); right: 0; display: grid; width: 236px; box-sizing: border-box; gap: 7px; padding: 10px; border: 1px solid #dfe6f5; border-radius: 14px; background: #fff; box-shadow: 0 18px 38px rgba(28,45,88,.18); }
.teacher-student-group-actions-popover > button,.teacher-student-group-header-edit button { min-height: 38px; padding: 0 13px; color: #315df6; border: 0; border-radius: 10px; background: #edf2ff; font-size: 9px; font-weight: 750; text-align: left; }
.teacher-student-group-actions-popover > button.is-danger { color: #d64b62; background: #fff0f3; }
.teacher-student-group-header-edit { display: grid; gap: 8px; }
.teacher-student-group-header-edit input { min-width: 0; height: 40px; box-sizing: border-box; padding: 0 11px; color: var(--home-ink); border: 1px solid #dfe5f0; border-radius: 10px; background: #fff; outline: 0; font-size: 12px; }
.teacher-student-group-header-edit input:focus { border-color: #315df6; box-shadow: 0 0 0 3px rgba(49,93,246,.09); }
.teacher-student-group-header-edit > span { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.teacher-student-group-header-edit button { text-align: center; }
.teacher-student-group-header-edit button.is-muted { color: #758099; background: #eceff5; }
.teacher-student-person-list { display: grid; }
.teacher-student-group-directory { display: grid; }
.teacher-student-group-directory > button { display: grid; min-height: 76px; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 12px 2px; color: inherit; border: 0; border-bottom: 1px solid #edf0f5; background: transparent; text-align: left; }
.teacher-student-group-directory > button:hover { background: #fafbff; }
.teacher-student-group-directory-icon { display: grid; width: 48px; height: 48px; place-items: center; color: #315df6; border-radius: 16px; background: #edf2ff; font-size: 14px; font-weight: 800; }
.teacher-student-group-directory > button > span:nth-child(2) { display: grid; gap: 5px; }
.teacher-student-group-directory strong { color: var(--home-ink); font-size: 13px; }
.teacher-student-group-directory small { color: #98a0b2; font-size: 9px; }
.teacher-student-group-directory b { color: #a0a9ba; font-size: 21px; font-weight: 500; }
.teacher-student-ungrouped-heading { display: flex; min-height: 48px; align-items: center; justify-content: space-between; padding: 9px 2px 5px; border-bottom: 1px solid #edf0f5; }
.teacher-student-ungrouped-heading strong { color: #7d879b; font-size: 10px; }
.teacher-student-ungrouped-heading span { color: #98a0b2; font-size: 9px; }
.teacher-student-person-card { display: grid; grid-template-columns: 48px minmax(130px,1fr) minmax(220px,330px) auto; align-items: center; gap: 13px; min-height: 78px; padding: 12px 2px; border-bottom: 1px solid #edf0f5; }
.teacher-student-person-card:last-child { border-bottom: 0; }
.teacher-student-avatar { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; color: #315df6; border-radius: 16px; background: #edf2ff; font-size: 18px; font-weight: 800; }
.teacher-student-mobile-avatar-group-select { display: none; }
.teacher-student-person-card > span:nth-child(2) { display: grid; gap: 4px; }
.teacher-student-person-card strong { color: var(--home-ink); font-size: 13px; }
.teacher-student-person-actions { display: flex; gap: 8px; }
.teacher-student-person-actions button { min-height: 36px; padding: 0 13px; color: #315df6; border: 0; border-radius: 11px; background: #edf2ff; font-size: 9px; font-weight: 750; }
.teacher-student-person-actions button.is-danger { color: #d64b62; background: #fff0f3; }
.teacher-student-mobile-remove-group { display: none; }
.teacher-student-group-manager { display: grid; gap: 13px; padding: 17px 0; border-bottom: 1px solid #edf0f5; }
.teacher-student-group-create { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.teacher-student-group-create > div { display: grid; gap: 4px; }
.teacher-student-group-create strong { color: var(--home-ink); font-size: 12px; }
.teacher-student-group-create small { color: #98a0b2; font-size: 9px; }
.teacher-student-group-create > span { display: grid; grid-template-columns: minmax(150px,220px) auto; gap: 8px; }
.teacher-student-group-create input,.teacher-student-group-edit input,.teacher-student-search input,.teacher-student-group-picker select,.teacher-student-inline-group-create input { min-width: 0; height: 38px; box-sizing: border-box; padding: 0 11px; color: var(--home-ink); border: 1px solid #dfe5f0; border-radius: 11px; background: #fff; outline: 0; font-size: 10px; }
.teacher-student-group-create input:focus,.teacher-student-group-edit input:focus,.teacher-student-search input:focus,.teacher-student-group-picker select:focus,.teacher-student-inline-group-create input:focus { border-color: #315df6; box-shadow: 0 0 0 3px rgba(49,93,246,.09); }
.teacher-student-group-create button,.teacher-student-group-edit button,.teacher-student-group-selected-tools button,.teacher-student-inline-group-create button { min-height: 38px; padding: 0 13px; color: #315df6; border: 0; border-radius: 11px; background: #edf2ff; font-size: 9px; font-weight: 750; }
.teacher-student-group-filters { display: flex; gap: 8px; overflow-x: auto; padding: 1px 0 4px; scrollbar-width: thin; }
.teacher-student-group-filters button { display: flex; min-height: 36px; flex: 0 0 auto; align-items: center; gap: 7px; padding: 0 11px; color: #71809a; border: 1px solid #e3e8f2; border-radius: 999px; background: #fafbfe; font-size: 9px; font-weight: 750; }
.teacher-student-group-filters button b { display: grid; min-width: 18px; height: 18px; place-items: center; padding: 0 3px; border-radius: 999px; background: #edf0f6; font-size: 8px; }
.teacher-student-group-filters button.is-active { color: #fff; border-color: #315df6; background: #315df6; }
.teacher-student-group-filters button.is-active b { color: #315df6; background: #fff; }
.teacher-student-group-selected-tools,.teacher-student-group-edit { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 13px; background: #f7f9fd; }
.teacher-student-group-selected-tools > span { flex: 1; color: #758099; font-size: 9px; font-weight: 700; }
.teacher-student-group-selected-tools button.is-danger { color: #d64b62; background: #fff0f3; }
.teacher-student-group-edit input { flex: 1; }
.teacher-student-group-edit button.is-muted { color: #758099; background: #eceff5; }
.teacher-student-search { display: grid; grid-template-columns: auto minmax(160px,280px); align-items: center; justify-content: end; gap: 9px; color: #7d879b; font-size: 9px; font-weight: 700; }
.teacher-student-group-control { display: grid; gap: 7px; }
.teacher-student-group-picker { display: grid; grid-template-columns: minmax(0,1fr); align-items: center; }
.teacher-student-group-picker select { width: 100%; height: 36px; padding-right: 28px; }
.teacher-student-inline-group-create { display: grid; grid-template-columns: minmax(90px,1fr) auto auto; gap: 6px; }
.teacher-student-inline-group-create button { min-height: 36px; padding: 0 9px; }
.teacher-student-inline-group-create button.is-muted { color: #758099; background: #eceff5; }
.teacher-student-empty { display: grid; min-height: 138px; place-content: center; justify-items: center; gap: 7px; padding: 24px; text-align: center; }
.teacher-student-empty strong { color: var(--home-ink); font-size: 14px; }
.teacher-student-empty p { max-width: 440px; margin: 0; color: #98a0b2; font-size: 10px; line-height: 1.6; }

.teacher-student-detail-hero { display: grid; grid-template-columns: 58px minmax(220px,1fr) repeat(3,110px); align-items: center; gap: 16px; padding: 21px 24px; border-radius: 24px; background: white; box-shadow: var(--home-shadow); }
.teacher-student-detail-hero > .teacher-student-avatar { width: 58px; height: 58px; border-radius: 18px; font-size: 21px; }
.teacher-student-detail-hero > div { display: grid; gap: 3px; }
.teacher-student-detail-hero > div small,.teacher-student-detail-hero > div p { color: #98a0b2; font-size: 9px; }
.teacher-student-detail-hero > div strong { color: var(--home-ink); font-size: 18px; }
.teacher-student-detail-hero > div p { margin: 3px 0 0; }
.teacher-student-detail-hero > span:not(.teacher-student-avatar) { display: grid; justify-items: center; gap: 3px; padding: 10px; border-left: 1px solid #edf0f5; }
.teacher-student-detail-hero > span:not(.teacher-student-avatar) strong { color: var(--home-ink); font-size: 18px; }
.teacher-student-detail-hero > span:not(.teacher-student-avatar) small { color: #98a0b2; font-size: 8px; }
.teacher-student-detail-tabs { display: flex; gap: 8px; margin: 16px 0; padding: 6px; border-radius: 16px; background: rgba(255,255,255,.8); box-shadow: var(--home-shadow); }
.teacher-student-detail-tabs button { min-height: 42px; flex: 1; color: #748099; border: 0; border-radius: 12px; background: transparent; font-size: 11px; font-weight: 750; }
.teacher-student-detail-tabs button.is-active { color: white; background: #315df6; box-shadow: 0 7px 16px rgba(49,93,246,.2); }
.teacher-student-detail-tabs button span { margin-left: 4px; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.2); font-size: 8px; }
.teacher-student-calendar-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.75fr); gap: 16px; align-items: start; }
.teacher-student-calendar-card,.teacher-student-day-card { padding: 23px; border-radius: 25px; background: white; box-shadow: var(--home-shadow); }
.teacher-student-calendar-card > header { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 10px; }
.teacher-student-calendar-card > header h2 { text-align: center; }
.teacher-student-calendar-card > header button { width: 38px; height: 38px; color: #315df6; border: 0; border-radius: 12px; background: #edf2ff; font-size: 22px; }
.teacher-student-calendar-weekdays,.teacher-student-calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 7px; }
.teacher-student-calendar-weekdays { margin: 22px 0 8px; }
.teacher-student-calendar-weekdays span { color: #98a0b2; font-size: 9px; text-align: center; }
.teacher-student-calendar-grid > button,.teacher-student-calendar-spacer { aspect-ratio: 1.12; }
.teacher-student-calendar-grid > button { position: relative; display: grid; place-items: center; color: #768198; border: 0; border-radius: 13px; background: #f7f8fb; font-size: 10px; font-weight: 750; }
.teacher-student-calendar-grid > button.has-activity { color: #148c6e; background: #e5f8ef; }
.teacher-student-calendar-grid > button.is-selected { color: white; background: #315df6; box-shadow: 0 7px 15px rgba(49,93,246,.2); }
.teacher-student-calendar-grid > button i { position: absolute; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.teacher-student-day-card > h2 { margin-bottom: 15px; }
.teacher-student-selected-summary { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin-bottom: 11px; }
.teacher-student-selected-summary span { display: grid; min-height: 68px; place-content: center; justify-items: center; gap: 3px; border-radius: 15px; background: #f5f7ff; }
.teacher-student-selected-summary strong { color: var(--home-ink); font-size: 16px; }
.teacher-student-selected-summary small { color: #98a0b2; font-size: 8px; }
.teacher-student-day-activities { display: grid; gap: 8px; }
.teacher-student-day-activities article { padding: 13px; border-radius: 15px; background: #f5f7ff; }
.teacher-student-day-activities header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.teacher-student-day-activities header strong { color: var(--home-ink); font-size: 10px; }
.teacher-student-day-activities header span { color: #315df6; font-size: 8px; }
.teacher-student-day-activities p { margin: 7px 0 0; color: #6f7b93; font-size: 9px; line-height: 1.55; }
.teacher-student-wrong-list { display: grid; gap: 11px; }
.teacher-student-wrong-card { padding: 19px 21px; border-radius: 21px; background: white; box-shadow: var(--home-shadow); }
.teacher-student-wrong-card > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 13px; border-bottom: 1px solid #edf0f5; }
.teacher-student-wrong-card > header > span { display: grid; gap: 4px; }
.teacher-student-wrong-card > header small { color: #98a0b2; font-size: 8px; }
.teacher-student-wrong-card > header strong { color: var(--home-ink); font-size: 13px; }
.teacher-student-wrong-card > header b { padding: 7px 10px; color: #d64b62; border-radius: 999px; background: #fff0f3; font-size: 9px; }
.teacher-student-wrong-prompt { margin: 13px 0 0; padding: 12px 14px; color: #46536d; border-radius: 13px; background: #f7f9fd; font-size: 10px; line-height: 1.65; }
.teacher-student-wrong-card > div { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; padding-top: 13px; }
.teacher-student-wrong-card > div span { display: grid; gap: 5px; }
.teacher-student-wrong-card > div small { color: #98a0b2; font-size: 8px; }
.teacher-student-wrong-card > div strong { overflow-wrap: anywhere; color: #5e6a82; font-size: 10px; font-weight: 650; }

.wrong-review-hub-stage {
  min-height: 100vh;
  padding: 28px 24px 60px;
  background:
    radial-gradient(circle at 88% 3%, rgba(114, 181, 255, .18), transparent 25rem),
    radial-gradient(circle at 8% 34%, rgba(139, 117, 255, .09), transparent 22rem),
    #f5f7fc;
}

.wrong-review-hub-shell {
  display: grid;
  width: min(1280px, 100%);
  margin: 0 auto;
  gap: 16px;
}

.wrong-review-hub-titlebar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 2px;
}

.wrong-review-hub-titlebar > button {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  padding: 1px 6px;
  color: var(--home-blue);
  border: 0;
  border-radius: 15px;
  background: white;
  box-shadow: 0 9px 26px rgba(45,67,128,.07);
  font-size: 27px;
}

.wrong-review-hub-summary small,
.wrong-review-hub-categories header small {
  display: block;
  margin-bottom: 5px;
  color: #98a2b7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.wrong-review-hub-titlebar small {
  display: inline;
  margin-bottom: 0;
  color: #98a0b2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.wrong-review-hub-titlebar h1 {
  margin: 2px 0 0;
  color: var(--home-ink);
  font-size: 28px;
  line-height: normal;
  letter-spacing: normal;
}

.wrong-review-hub-summary {
  position: relative;
  display: block;
  height: 198px;
  min-height: 190px;
  overflow: hidden;
  padding: 30px 220px 28px 31px;
  color: white;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.22), transparent 9rem),
    linear-gradient(135deg, #315df6 0%, #477ff6 64%, #64a8f4 100%);
  box-shadow: 0 18px 42px rgba(49,93,246,.2);
}

.wrong-review-hub-summary::after {
  content: "";
  position: absolute;
  right: -84px;
  bottom: -126px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
}

.wrong-review-hub-summary-copy { position: relative; z-index: 2; max-width: 430px; }

.wrong-review-hub-summary-art {
  position: absolute;
  z-index: 1;
  right: 32px;
  bottom: -16px;
  width: 180px;
  height: 180px;
  pointer-events: none;
}

.wrong-review-hub-summary-art img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 170px;
  height: 170px;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(18, 48, 139, 0.25));
}

.wrong-review-hub-note,
.wrong-review-hub-spark {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #315df6;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 18px rgba(33,64,145,.16);
  font-weight: 850;
}

.wrong-review-hub-note.note-one { top: 13px; left: 0; width: 34px; height: 34px; color: #7b5ce2; font-size: 14px; }
.wrong-review-hub-note.note-two { top: -3px; right: 5px; width: 40px; height: 40px; font-size: 15px; }
.wrong-review-hub-spark { top: 48px; right: 1px; width: 27px; height: 27px; color: #19a987; font-size: 12px; }

.wrong-review-hub-summary small,
.wrong-review-hub-summary p {
  color: rgba(255, 255, 255, 0.72);
}

.wrong-review-hub-summary h2 {
  margin: 8px 0 0;
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.wrong-review-hub-summary p {
  max-width: 430px;
  margin: 12px 0 0;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.65;
}

.wrong-review-hub-summary > button {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 33px;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 0 12px;
  color: var(--home-blue);
  border: 0;
  border-radius: 999px;
  background: white;
  box-shadow: 0 9px 22px rgba(24, 50, 143, 0.12);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.wrong-review-hub-summary > button:disabled {
  color: rgba(75, 91, 129, 0.55);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
  cursor: default;
}

.wrong-review-hub-summary > button span {
  font-size: 18px;
}

.wrong-review-hub-categories {
  padding: 27px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 29px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--home-shadow);
}

.wrong-review-hub-categories > header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--home-line);
}

.wrong-review-hub-categories > header h2 {
  margin: 0;
  color: var(--home-ink);
  font-size: 22px;
  letter-spacing: -0.03em;
}

body[data-locale="en-GB"] .wrong-review-hub-categories > header { padding-bottom: 23px; }

.wrong-review-hub-category-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}

.wrong-review-hub-category-list > button {
  display: flex;
  min-width: 0;
  min-height: 78px;
  align-items: center;
  gap: 14px;
  padding: 13px 2px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--home-line);
  background: transparent;
}

.wrong-review-hub-category-count {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 800;
}

.wrong-review-hub-tone-blue { color: #315df6; background: #eaf0ff; }
.wrong-review-hub-tone-purple { color: #8063c9; background: #eee6ff; }
.wrong-review-hub-tone-mint { color: #159978; background: #e2f8ed; }
.wrong-review-hub-tone-sky { color: #2588bd; background: #e7f6ff; }

.wrong-review-hub-category-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.wrong-review-hub-category-copy strong {
  overflow: hidden;
  color: var(--home-ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wrong-review-hub-category-copy small {
  overflow: hidden;
  color: #99a2b4;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wrong-review-hub-category-description {
  display: none;
}

.wrong-review-hub-category-list > button > b {
  margin-left: auto;
  color: #9ca5b7;
  font-size: 25px;
  font-weight: 400;
}

.wrong-review-hub-category-list > button:disabled {
  cursor: default;
}

.wrong-review-hub-category-list > button:disabled .wrong-review-hub-category-copy strong,
.wrong-review-hub-category-list > button:disabled > b {
  color: #aeb5c3;
}

.wrong-review-hub-category-list > button:disabled .wrong-review-hub-category-count {
  opacity: 0.58;
}

@media (min-width: 961px) {
  body[data-active-screen="start"] .site-desktop-header-shell,
  body[data-active-screen="learning-calendar"] .site-desktop-header-shell,
  body[data-active-screen="learning-materials"] .site-desktop-header-shell {
    position: sticky;
    z-index: 50;
    top: 0;
    display: block;
    padding: 0 clamp(24px, 3vw, 64px);
    background: #fff;
  }

  .site-desktop-header-shell .home-desktop-header {
    width: min(1600px, 100%);
    margin-inline: auto;
  }

  body[data-active-screen="start"] .mock-app {
    background: var(--xiyue-canvas);
  }

  .start-stage {
    padding: 0 24px 64px;
  }

  .start-shell.home-shell {
    gap: 28px;
  }

  .home-desktop-header {
    display: grid;
    min-height: 76px;
    grid-template-columns: minmax(220px, 1fr) auto minmax(110px, 1fr);
    align-items: center;
    gap: 24px;
    border-bottom: 0;
  }

  .home-desktop-brand {
    display: inline-flex;
    width: max-content;
    min-width: 0;
    align-items: center;
    gap: 11px;
    padding: 0;
    color: var(--xiyue-ink);
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
  }

  .home-desktop-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
  }

  .home-desktop-brand > span {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .home-desktop-brand strong {
    font-size: 16px;
    line-height: 1.1;
  }

  .home-desktop-brand small {
    overflow: hidden;
    max-width: 230px;
    color: var(--xiyue-muted);
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--xiyue-line);
    border-radius: var(--xiyue-radius-lg);
    background: var(--xiyue-surface);
  }

  .home-desktop-nav button {
    min-width: 72px;
    height: 36px;
    padding: 0 14px;
    color: var(--xiyue-muted);
    border: 0;
    border-radius: var(--xiyue-radius-md);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: color .16s ease, background .16s ease;
  }

  .home-desktop-nav button:hover,
  .home-desktop-nav button:focus-visible,
  .home-desktop-nav button.is-active {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-100);
  }

  .home-desktop-account {
    display: inline-flex;
    width: max-content;
    height: 44px;
    align-items: center;
    justify-self: end;
    gap: 8px;
    padding: 0 17px;
    color: var(--xiyue-blue-600);
    border: 1px solid #cfdbff;
    border-radius: var(--xiyue-radius-lg);
    background: var(--xiyue-surface);
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
  }

  .home-desktop-account:hover,
  .home-desktop-account:focus-visible {
    border-color: #aebfff;
    background: var(--xiyue-blue-050);
  }

  .home-desktop-account svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .home-layout {
    grid-template-columns: minmax(0, 1.76fr) minmax(320px, .84fr);
    gap: 24px;
  }

  .home-main,
  .home-side {
    gap: 20px;
  }

  .home-welcome-card {
    height: 254px;
    min-height: 254px;
    padding: 42px 300px 40px 44px;
    border: 1px solid var(--xiyue-line);
    border-radius: var(--xiyue-radius-xl);
    background: var(--xiyue-surface);
    box-shadow: none;
  }

  .home-welcome-card::before {
    right: -32px;
    bottom: -138px;
    width: 410px;
    height: 410px;
    background: linear-gradient(145deg, rgba(49, 93, 246, .12), rgba(71, 127, 246, .04));
  }

  .home-eyebrow {
    margin-bottom: 10px;
    color: var(--xiyue-blue-600);
    font-size: 10px;
    letter-spacing: .16em;
  }

  .home-welcome-copy h1 {
    max-width: 560px;
    font-size: clamp(34px, 3.1vw, 46px);
    line-height: 1.12;
    letter-spacing: -.045em;
  }

  .home-welcome-copy p {
    margin-top: 14px;
    font-size: 15px;
  }

  .home-desktop-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
  }

  .home-desktop-hero-actions button {
    height: 44px;
    padding: 0 20px;
    color: var(--xiyue-blue-600);
    border: 1px solid #cfdbff;
    border-radius: var(--xiyue-radius-lg);
    background: var(--xiyue-surface);
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
  }

  .home-desktop-hero-actions button:hover,
  .home-desktop-hero-actions button:focus-visible {
    border-color: #aebfff;
    background: var(--xiyue-blue-050);
    transform: translateY(-1px);
  }

  .home-desktop-hero-actions button.is-primary {
    min-width: 116px;
    color: white;
    border-color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-600);
    box-shadow: 0 8px 20px rgba(49, 93, 246, .18);
  }

  .home-desktop-hero-actions button.is-primary:hover,
  .home-desktop-hero-actions button.is-primary:focus-visible {
    border-color: var(--xiyue-blue-700);
    background: var(--xiyue-blue-700);
  }

  .home-welcome-art {
    right: 42px;
    bottom: 2px;
    width: 226px;
    height: 226px;
  }

  .home-welcome-art img {
    width: 214px;
    height: 214px;
    filter: drop-shadow(0 14px 18px rgba(48, 83, 205, .16));
  }

  .home-note {
    border-width: 3px;
    box-shadow: 0 7px 18px rgba(37, 68, 147, .09);
  }

  .start-dashboard.home-stats {
    gap: 12px;
  }

  .home-stat {
    min-height: 94px;
    border: 0;
    border-radius: var(--xiyue-radius-lg);
    background: #f7f9fc;
    box-shadow: none;
  }

  .home-stat-purple,
  .home-stat-mint,
  .home-stat-sky {
    background: #f7f9fc;
  }

  .home-stat strong {
    color: var(--xiyue-ink);
    font-size: 27px;
  }

  .home-stat-action:hover {
    background: #f0f4ff;
    box-shadow: none;
  }

  .home-section-heading {
    margin: 8px 2px 13px;
    font-size: 19px;
  }

  .home-learning-grid {
    gap: 14px;
  }

  .home-learning-grid .start-card-group {
    gap: 8px;
  }

  .home-learning-grid .start-card.home-feature-card {
    min-height: 132px;
    gap: 17px;
    padding: 22px;
    border: 1px solid var(--xiyue-line);
    border-radius: var(--xiyue-radius-lg);
    background: var(--xiyue-surface);
    box-shadow: none;
  }

  .home-learning-grid .start-card.home-feature-card:hover,
  .home-learning-grid .start-card.home-feature-card:focus-visible {
    border-color: #cbd7ff;
    box-shadow: var(--xiyue-shadow-card);
    transform: translateY(-1px);
  }

  .home-learning-grid .start-card.home-feature-primary {
    min-height: 164px;
    border: 0;
    border-radius: var(--xiyue-radius-xl);
    background: linear-gradient(135deg, var(--xiyue-blue-600), var(--xiyue-blue-700));
    box-shadow: 0 12px 28px rgba(49, 93, 246, .16);
  }

  .home-learning-grid .start-card.home-feature-preview {
    background: var(--xiyue-surface);
  }

  .home-feature-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--xiyue-radius-md);
  }

  .home-feature-icon-preview,
  .home-feature-icon-materials,
  .home-feature-icon-practice {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-100);
  }

  .home-feature-icon-wrong {
    color: var(--xiyue-success);
    background: #e4f8ef;
  }

  .home-feature-copy {
    gap: 5px;
  }

  .home-feature-copy strong {
    font-size: 20px;
  }

  .home-feature-copy > span {
    font-size: 12px;
    line-height: 1.55;
  }

  .home-feature-lock {
    width: 40px;
    height: 40px;
    color: var(--xiyue-danger);
    border-radius: var(--xiyue-radius-md);
  }

  .home-learning-grid .start-exam-options {
    border: 1px solid var(--xiyue-line);
    border-radius: var(--xiyue-radius-lg);
  }

  .home-learning-grid .start-option-button {
    border-color: var(--xiyue-line);
    border-radius: var(--xiyue-radius-md);
  }

  .home-side-card {
    padding: 24px;
    border: 1px solid var(--xiyue-line);
    border-radius: var(--xiyue-radius-xl);
    background: var(--xiyue-surface);
    box-shadow: none;
  }

  .home-week-card header button {
    height: 36px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: var(--xiyue-radius-md);
  }

  .home-week-row b {
    border-radius: var(--xiyue-radius-sm);
  }

  .home-side-menu button {
    min-height: 64px;
  }

  .home-public-company {
    border-color: var(--xiyue-line);
    border-radius: 0;
    box-shadow: none;
  }

  body[data-active-screen="start"],
  body[data-active-screen="start"] .mock-app {
    background: #fff;
  }

  .start-stage {
    padding-top: 40px;
    padding-right: clamp(24px, 3vw, 64px);
    padding-bottom: 80px;
    padding-left: clamp(24px, 3vw, 64px);
  }

  .start-shell.home-shell {
    width: min(1600px, 100%);
    max-width: 1600px;
    margin-inline: auto;
    align-items: stretch;
    gap: 40px;
  }

  .home-desktop-header {
    position: relative;
    z-index: 30;
    min-height: 74px;
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 22px;
  }

  .home-desktop-brand {
    gap: 10px;
  }

  .home-desktop-brand img {
    width: 46px;
    height: 46px;
    object-fit: contain;
  }

  .home-desktop-brand strong {
    overflow: hidden;
    max-width: 255px;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-desktop-nav {
    justify-self: start;
    gap: 2px;
    margin-left: 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .home-desktop-nav > button,
  .home-desktop-nav > a,
  .home-desktop-nav-menu > .home-desktop-exam-trigger {
    display: inline-flex;
    min-width: 64px;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    color: var(--xiyue-muted);
    border: 0;
    border-radius: var(--xiyue-radius-md);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: color .16s ease, background .16s ease;
  }

  .home-desktop-nav > button:hover,
  .home-desktop-nav > button:focus-visible,
  .home-desktop-nav > button.is-active,
  .home-desktop-nav > a:hover,
  .home-desktop-nav > a:focus-visible,
  .home-desktop-nav-menu > .home-desktop-exam-trigger:hover,
  .home-desktop-nav-menu > .home-desktop-exam-trigger:focus-visible,
  .home-desktop-nav-menu > .home-desktop-exam-trigger[aria-expanded="true"] {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  .home-desktop-nav-menu {
    position: relative;
    display: flex;
    height: 40px;
    align-items: center;
  }

  .home-desktop-exam-trigger {
    gap: 4px;
  }

  .home-desktop-exam-trigger svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
    transition: transform .16s ease;
  }

  .home-desktop-exam-trigger[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  .home-desktop-exam-popover {
    position: absolute;
    z-index: 40;
    top: calc(100% + 12px);
    left: 0;
    display: flex;
    width: max-content;
    max-width: min(680px, calc(100vw - 48px));
    overflow: hidden;
    padding: 8px;
    border: 1px solid #dce5f7;
    border-radius: var(--xiyue-radius-lg);
    background: #fbfcff;
    box-shadow: 0 18px 44px rgba(30, 45, 90, .14);
  }

  .home-desktop-exam-popover.has-preview-paper-actions {
    width: min(876px, calc(100vw - 144px));
    max-width: none;
  }

  .home-desktop-exam-popover[hidden],
  .home-desktop-exam-submenu[hidden] {
    display: none;
  }

  .home-desktop-exam-primary {
    display: grid;
    width: 230px;
    align-content: start;
    gap: 4px;
    padding-right: 10px;
  }

  .home-desktop-exam-primary > button,
  .home-desktop-exam-submenu > button {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    color: var(--xiyue-ink);
    border: 0;
    border-radius: var(--xiyue-radius-md);
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }

  .home-desktop-exam-primary > button:hover,
  .home-desktop-exam-primary > button:focus-visible,
  .home-desktop-exam-primary > button.is-active,
  .home-desktop-exam-submenu > button:hover,
  .home-desktop-exam-submenu > button:focus-visible {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  .home-desktop-exam-primary > button:focus-visible,
  .home-desktop-exam-submenu > button:focus-visible {
    outline: 2px solid rgba(49, 93, 246, .22);
    outline-offset: -2px;
  }

  .home-desktop-exam-primary > button > span,
  .home-desktop-exam-submenu > button > span {
    display: grid;
    gap: 4px;
  }

  .home-desktop-exam-primary strong,
  .home-desktop-exam-submenu strong {
    font-size: 13px;
    line-height: 1.35;
  }

  .home-desktop-exam-primary small,
  .home-desktop-exam-submenu small {
    color: var(--xiyue-muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.45;
  }

  .home-desktop-exam-primary b {
    color: var(--xiyue-subtle);
    font-size: 20px;
    font-weight: 500;
  }

  .home-desktop-exam-submenu {
    display: grid;
    width: 350px;
    max-height: 390px;
    align-content: start;
    gap: 2px;
    overflow-y: auto;
    padding-left: 10px;
    border-left: 1px solid var(--xiyue-line);
  }

  .home-desktop-exam-submenu > header {
    display: grid;
    gap: 3px;
    padding: 8px 12px 7px;
  }

  .home-desktop-exam-submenu > header strong {
    color: var(--xiyue-ink);
  }

  .home-desktop-exam-submenu > header small {
    color: var(--xiyue-muted);
    font-size: 10px;
  }

  .home-desktop-exam-submenu > button {
    min-height: 54px;
  }

  .home-desktop-preview-paper-trigger.is-active {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  .home-desktop-preview-paper-trigger b {
    transition: transform .16s ease;
  }

  .home-desktop-preview-paper-actions {
    width: 280px;
    max-height: none;
    overflow: visible;
  }

  .home-desktop-preview-paper-actions > button {
    min-height: 58px;
  }

  .home-desktop-simple-popover {
    padding: 6px;
  }

  .home-desktop-nav-single-column {
    width: 390px;
    max-height: min(430px, calc(100vh - 150px));
    padding-left: 0;
    border-left: 0;
  }

  .home-desktop-nav-single-column > header {
    padding: 10px 12px 8px;
  }

  .home-desktop-nav-single-column > button {
    min-height: 56px;
  }

  .home-desktop-nav-single-column > button b {
    flex: none;
    color: var(--xiyue-blue-600);
    font-size: 11px;
    font-weight: 750;
  }

  #home-desktop-practice-popover .home-desktop-nav-single-column {
    width: 620px;
    max-height: min(430px, calc(100vh - 150px));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 6px;
  }

  #home-desktop-practice-popover .home-desktop-nav-single-column > button {
    min-width: 0;
  }

  #home-desktop-practice-popover .home-desktop-nav-single-column > button > span {
    min-width: 0;
  }

  #home-desktop-practice-popover .home-desktop-nav-single-column small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #home-desktop-wrong-popover .home-desktop-nav-single-column {
    width: 620px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 6px;
  }

  #home-desktop-wrong-menu > [data-action="go-wrong-review"],
  #home-desktop-wrong-menu > .home-desktop-exam-empty {
    grid-column: 1 / -1;
  }

  #home-desktop-wrong-menu > button,
  #home-desktop-wrong-menu > button > span {
    min-width: 0;
  }

  #home-desktop-wrong-nav .home-desktop-exam-popover {
    right: auto;
    left: 0;
  }

  #home-desktop-materials-nav .home-desktop-exam-popover {
    right: auto;
    left: 0;
  }

  #home-desktop-materials-popover .home-desktop-exam-primary {
    width: 260px;
  }

  #home-desktop-materials-submenu {
    width: 240px;
  }

  .home-desktop-exam-submenu > button b {
    flex: 0 0 auto;
    color: var(--xiyue-blue-600);
    font-size: 11px;
    font-weight: 800;
  }

  .home-desktop-exam-empty {
    margin: 0;
    padding: 18px 12px;
    color: var(--xiyue-muted);
    font-size: 11px;
    line-height: 1.6;
  }

  .home-desktop-header-actions {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 8px;
  }

  .home-desktop-auth-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .home-desktop-language-menu {
    position: relative;
    display: flex;
    align-items: center;
  }

  .home-desktop-language-trigger {
    display: inline-flex;
    height: 44px;
    align-items: center;
    gap: 8px;
    padding: 0 9px 0 6px;
    color: var(--xiyue-ink);
    border: 0;
    border-radius: 14px;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 720;
    cursor: pointer;
    transition: color .16s ease, background .16s ease;
  }

  .home-desktop-language-trigger:hover,
  .home-desktop-language-trigger:focus-visible,
  .home-desktop-language-trigger[aria-expanded="true"] {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  .home-desktop-language-globe {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--xiyue-blue-600);
    border-radius: 50%;
    background: #edf2ff;
  }

  .home-desktop-language-globe svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.65;
  }

  .home-desktop-language-current {
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-desktop-language-trigger .home-desktop-language-chevron {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: transform .16s ease;
  }

  .home-desktop-language-trigger[aria-expanded="true"] .home-desktop-language-globe svg {
    transform: none;
  }

  .home-desktop-language-popover {
    right: 0;
    left: auto;
    display: grid;
    width: 184px;
    gap: 2px;
    padding: 7px;
  }

  .home-desktop-language-popover > button {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    color: var(--xiyue-ink);
    border: 0;
    border-radius: 11px;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 680;
    text-align: left;
    cursor: pointer;
  }

  .home-desktop-language-popover > button:hover,
  .home-desktop-language-popover > button:focus-visible,
  .home-desktop-language-popover > button.is-selected {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  .home-desktop-language-popover > button b {
    visibility: hidden;
    color: var(--xiyue-blue-600);
    font-size: 13px;
  }

  .home-desktop-language-popover > button.is-selected b {
    visibility: visible;
  }

  .home-desktop-auth-actions[hidden],
  .home-desktop-account[hidden] {
    display: none;
  }

  .home-desktop-login,
  .home-desktop-register {
    height: 44px;
    padding: 0 18px;
    border-radius: var(--xiyue-radius-md);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
  }

  .home-desktop-login {
    min-width: 76px;
    color: #fff;
    border: 1px solid var(--xiyue-blue-600);
    background: var(--xiyue-blue-600);
    box-shadow: 0 7px 18px rgba(49, 93, 246, .16);
  }

  .home-desktop-login:hover,
  .home-desktop-login:focus-visible {
    border-color: var(--xiyue-blue-700);
    background: var(--xiyue-blue-700);
  }

  .home-desktop-register {
    color: var(--xiyue-blue-600);
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
  }

  .home-desktop-register:hover,
  .home-desktop-register:focus-visible {
    border-color: transparent;
    background: var(--xiyue-blue-050);
  }

  .home-desktop-account {
    display: flex;
    width: auto;
    height: auto;
    min-width: 0;
    align-items: center;
    justify-self: end;
    gap: 0;
    padding: 3px;
    color: inherit;
    border: 1px solid #dce5f7;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(42, 67, 125, .06);
    font: inherit;
    cursor: default;
  }

  .home-desktop-account:hover,
  .home-desktop-account:focus-visible {
    border-color: #cbd7ef;
    background: #fff;
  }

  .home-desktop-membership-state,
  .home-desktop-user-entry {
    display: inline-flex;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--xiyue-radius-md);
    font: inherit;
    cursor: pointer;
    transition: color .16s ease, background .16s ease, box-shadow .16s ease;
  }

  .home-desktop-membership-state {
    gap: 6px;
    padding: 0 10px;
    color: var(--xiyue-blue-700);
    background: var(--xiyue-blue-050);
    font-size: 11px;
    font-weight: 800;
  }

  .home-desktop-membership-state.is-upgrade {
    color: #fff;
    background: var(--xiyue-blue-600);
    box-shadow: 0 7px 18px rgba(49, 93, 246, .16);
  }

  .home-desktop-membership-state:hover,
  .home-desktop-membership-state:focus-visible {
    color: var(--xiyue-blue-700);
    background: var(--xiyue-blue-100);
  }

  .home-desktop-membership-state.is-upgrade:hover,
  .home-desktop-membership-state.is-upgrade:focus-visible {
    color: #fff;
    background: var(--xiyue-blue-700);
  }

  .home-desktop-membership-dot {
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--xiyue-success);
  }

  .home-desktop-membership-state.is-upgrade .home-desktop-membership-dot {
    display: none;
  }

  .home-desktop-user-entry {
    min-width: 0;
    padding: 0 11px;
    color: var(--xiyue-ink);
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-size: 13px;
    font-weight: 750;
  }

  .home-desktop-user-entry:hover,
  .home-desktop-user-entry:focus-visible {
    color: var(--xiyue-blue-700);
    background: var(--xiyue-blue-050);
  }

  .home-desktop-user-name {
    overflow: hidden;
    max-width: 110px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-desktop-public-hero {
    display: grid;
    min-height: 516px;
    grid-template-columns: minmax(420px, .92fr) minmax(500px, 1.08fr);
    align-items: center;
    gap: clamp(42px, 4vw, 78px);
    padding: 42px 0 54px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  .home-desktop-public-copy {
    display: grid;
    align-content: center;
    justify-items: start;
  }

  .home-desktop-public-copy > small,
  .home-desktop-progress-heading small,
  .home-desktop-feature-heading > small {
    color: var(--xiyue-blue-600);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .16em;
  }

  .home-desktop-public-copy .home-desktop-public-headline {
    display: grid;
    max-width: 690px;
    margin: 15px 0 0;
    color: var(--xiyue-ink);
    font-size: clamp(50px, 4.35vw, 72px);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -.065em;
  }

  .home-desktop-public-headline > span {
    display: block;
  }

  .home-desktop-public-headline strong {
    display: inline-block;
    margin-right: .12em;
    color: var(--xiyue-blue-600);
    background: linear-gradient(transparent 69%, rgba(49, 93, 246, .16) 69%);
    font-weight: 950;
  }

  .home-desktop-public-copy > h2 {
    max-width: 620px;
    margin: 20px 0 0;
    color: var(--xiyue-ink);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: -.025em;
  }

  .home-desktop-public-copy > p {
    max-width: 560px;
    margin: 15px 0 0;
    color: var(--xiyue-muted);
    font-size: 16px;
    line-height: 1.75;
  }

  .home-desktop-public-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
  }

  .home-desktop-public-actions button {
    height: 52px;
    padding: 0 24px;
    color: var(--xiyue-blue-600);
    border: 1px solid #cfdbff;
    border-radius: var(--xiyue-radius-lg);
    background: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 780;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
  }

  .home-desktop-public-actions button:hover,
  .home-desktop-public-actions button:focus-visible {
    border-color: #aebfff;
    background: var(--xiyue-blue-050);
    transform: translateY(-1px);
  }

  .home-desktop-public-actions button.is-primary {
    min-width: 150px;
    color: #fff;
    border-color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-600);
    box-shadow: 0 10px 24px rgba(49, 93, 246, .2);
  }

  .home-desktop-public-actions button.is-primary:hover,
  .home-desktop-public-actions button.is-primary:focus-visible {
    border-color: var(--xiyue-blue-700);
    background: var(--xiyue-blue-700);
  }

  .home-desktop-public-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 25px;
    color: #667189;
    font-size: 12px;
    font-weight: 650;
  }

  .home-desktop-public-points span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }

  .home-desktop-public-points span::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--xiyue-blue-600);
    content: "";
  }

  .home-desktop-public-gallery {
    position: relative;
    width: 100%;
    max-width: 820px;
    min-width: 0;
    height: 430px;
    justify-self: end;
  }

  .home-desktop-public-gallery::before {
    position: absolute;
    inset: 34px 42px 30px 20px;
    border-radius: 48% 52% 44% 56%;
    background: radial-gradient(circle at 45% 42%, rgba(218, 229, 255, .9), rgba(246, 248, 255, .3) 68%, transparent 70%);
    content: "";
  }

  .home-desktop-photo {
    position: absolute;
    z-index: 1;
    overflow: hidden;
    margin: 0;
    border: 5px solid #fff;
    border-radius: var(--xiyue-radius-xl);
    background: #eef2f7;
    box-shadow: 0 18px 44px rgba(36, 59, 115, .14);
  }

  .home-desktop-photo > span {
    display: block;
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
  }

  .home-desktop-photo-piano {
    top: 73px;
    left: 0;
    width: 72%;
    height: 292px;
  }

  .home-desktop-photo-piano > span {
    background-image: url("./assets/home/piano-child.jpg");
    background-position: center 47%;
  }

  .home-desktop-photo-violin {
    top: 18px;
    right: 1%;
    width: 35%;
    height: 162px;
  }

  .home-desktop-photo-violin > span {
    background-image: url("./assets/home/violin-child.jpg");
    background-position: center 30%;
  }

  .home-desktop-photo-flute {
    right: 0;
    bottom: 32px;
    width: 36%;
    height: 176px;
  }

  .home-desktop-photo-flute > span {
    background-image: url("./assets/home/flute-lesson.jpg");
    background-position: center 34%;
  }

  .home-desktop-photo-trumpet {
    bottom: 0;
    left: 17%;
    width: 31%;
    height: 112px;
  }

  .home-desktop-photo-trumpet > span {
    background-image: url("./assets/home/trumpet-closeup.jpg");
  }

  .home-layout {
    display: block;
  }

  .home-main {
    display: grid;
    gap: 22px;
  }

  .home-welcome-card,
  .home-side {
    display: none;
  }

  .home-desktop-progress-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding-top: 4px;
  }

  .home-desktop-progress-heading h2,
  .home-desktop-feature-heading h2 {
    margin: 7px 0 0;
    color: var(--xiyue-ink);
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -.03em;
  }

  .home-desktop-progress-heading p,
  .home-desktop-feature-heading p {
    margin: 8px 0 0;
    color: var(--xiyue-muted);
    font-size: 14px;
    line-height: 1.65;
  }

  .home-desktop-progress-heading button {
    height: 44px;
    padding: 0 20px;
    color: var(--xiyue-blue-600);
    border: 1px solid #cfdbff;
    border-radius: var(--xiyue-radius-md);
    background: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
  }

  .home-desktop-progress-heading button:hover,
  .home-desktop-progress-heading button:focus-visible {
    border-color: #aebfff;
    background: var(--xiyue-blue-050);
  }

  .home-desktop-week-calendar {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(470px, 650px);
    align-items: center;
    gap: 32px;
    min-height: 94px;
    padding: 17px 22px;
    border: 0;
    border-radius: var(--xiyue-radius-xl);
    background: #f7f9fc;
  }

  .home-desktop-week-copy {
    display: grid;
    gap: 6px;
  }

  .home-desktop-week-copy small {
    color: var(--xiyue-blue-600);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .13em;
  }

  .home-desktop-week-copy strong {
    color: var(--xiyue-ink);
    font-size: 17px;
    line-height: 1.3;
  }

  .home-desktop-week-calendar .home-week-row {
    gap: 10px;
    margin: 0;
  }

  .home-desktop-week-calendar .home-week-row span {
    gap: 6px;
  }

  .home-desktop-week-calendar .home-week-row small {
    font-size: 10px;
  }

  .home-desktop-week-calendar .home-week-row b {
    width: 36px;
    height: 36px;
    border-radius: var(--xiyue-radius-sm);
    font-size: 11px;
  }

  .home-learning {
    display: none;
  }

  .home-desktop-feature-heading {
    display: block;
    max-width: 720px;
    margin-bottom: 24px;
  }

  .home-section-heading {
    display: none;
  }

  .home-learning-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .home-learning-grid .home-mock-group {
    grid-column: 1 / -1;
  }

  .home-learning-grid .start-card.home-feature-primary {
    min-height: 154px;
  }

  .home-learning-grid .start-card.home-feature-card {
    min-height: 142px;
  }

  .home-public-company {
    margin-top: 40px;
    padding: 48px 0 18px;
    border: 0;
    border-top: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: #ffffff;
  }

  .home-public-company-layout {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(480px, 1.55fr);
    gap: clamp(42px, 6vw, 96px);
    align-items: start;
  }

  .home-public-footer-brand {
    display: grid;
    gap: 13px;
    max-width: 390px;
  }

  .home-public-footer-brand > div {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .home-public-footer-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
  }

  .home-public-footer-brand strong {
    color: var(--xiyue-ink);
    font-size: 16px;
    line-height: 1.3;
  }

  .home-public-footer-brand p {
    margin: 0;
    color: var(--xiyue-muted);
    font-size: 12px;
    line-height: 1.7;
  }

  .home-public-company-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
  }

  .home-public-company-links > div {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 11px;
  }

  .home-public-company-links strong {
    margin-bottom: 3px;
    color: var(--xiyue-ink);
    font-size: 13px;
  }

  .home-public-company-links button,
  .home-public-company-links a {
    min-height: 0;
    padding: 0;
    color: var(--xiyue-muted);
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }

  .home-public-company-links button:hover,
  .home-public-company-links button:focus-visible,
  .home-public-company-links a:hover,
  .home-public-company-links a:focus-visible {
    color: var(--xiyue-blue-600);
  }

  .home-public-company-bottom {
    justify-content: center;
    margin-top: 28px;
    padding-top: 0;
    border-top: 0;
  }

  body[data-active-screen="learning-materials"],
  body[data-active-screen="learning-materials"] .mock-app {
    background: #fff;
  }

  .learning-materials-stage {
    min-height: 100vh;
    padding: 24px clamp(24px, 3vw, 64px) 80px;
    scroll-margin-top: 74px;
    background: #fff;
  }

  body[data-active-screen="learning-materials"] .home-desktop-nav > [data-action="home-ui-home"].is-active {
    color: var(--xiyue-muted);
    background: transparent;
  }

  body[data-active-screen="learning-materials"] #home-desktop-materials-trigger {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  .learning-materials-shell,
  .learning-materials-stage.is-sign-template-preview .learning-materials-shell,
  .learning-materials-stage.is-music-library .learning-materials-shell {
    width: min(1600px, 100%);
  }

  .learning-materials-titlebar {
    min-height: 52px;
    gap: 12px;
    margin-bottom: 18px;
  }

  .learning-materials-stage.is-term-detail .learning-materials-titlebar,
  .learning-materials-stage.is-sign-detail .learning-materials-titlebar {
    display: none;
  }

  .learning-materials-titlebar > button {
    width: 40px;
    height: 40px;
    color: var(--xiyue-blue-600);
    border: 1px solid #dce5f7;
    border-radius: var(--xiyue-radius-md);
    background: #fff;
    box-shadow: none;
  }

  .learning-materials-titlebar small {
    color: var(--xiyue-blue-600);
    font-size: 9px;
    letter-spacing: .13em;
  }

  .learning-materials-titlebar h1 {
    margin-top: 3px;
    color: var(--xiyue-ink);
    font-size: 21px;
    line-height: 1.25;
  }

  .learning-materials-hero {
    height: 152px;
    min-height: 152px;
    padding: 19px 210px 19px 34px;
    color: var(--xiyue-ink);
    border: 1px solid #e0e7f5;
    border-radius: var(--xiyue-radius-xl);
    background:
      radial-gradient(circle at 88% 18%, rgba(118, 165, 255, .18), transparent 13rem),
      linear-gradient(135deg, #f8faff, #eef3ff);
    box-shadow: none;
  }

  .learning-materials-hero::after {
    right: -58px;
    bottom: -148px;
    border-color: rgba(49, 93, 246, .12);
  }

  .learning-materials-hero small {
    color: var(--xiyue-blue-600);
  }

  .learning-materials-hero h2 {
    margin: 8px 0 6px;
    color: var(--xiyue-ink);
    font-size: 28px;
    line-height: 1.25;
  }

  .learning-materials-hero p {
    max-width: 620px;
    color: var(--xiyue-muted);
    font-size: 13px;
    line-height: 1.7;
  }

  .learning-materials-hero .learning-materials-hero-art {
    right: 34px;
    bottom: -12px;
    width: 154px;
    height: 154px;
  }

  .learning-materials-hero-art img {
    width: 148px;
    height: 148px;
    filter: drop-shadow(0 12px 18px rgba(49, 93, 246, .16));
  }

  .learning-materials-grid,
  .learning-materials-grade-grid,
  .learning-materials-term-grid,
  .learning-materials-symbol-grid {
    gap: 14px;
    margin-top: 16px;
  }

  .learning-materials-category-card,
  .learning-materials-grade-card,
  .learning-materials-search-card,
  .learning-materials-term-card,
  .learning-materials-search-panel,
  .learning-materials-symbol-card,
  .learning-music-controls,
  .learning-music-group-section {
    border-color: var(--xiyue-line);
    background: #fff;
    box-shadow: none;
  }

  .learning-materials-category-card,
  .learning-materials-grade-card,
  .learning-materials-search-card,
  .learning-materials-term-card {
    border-radius: var(--xiyue-radius-lg);
  }

  .learning-materials-term-card {
    min-height: 94px;
    gap: 6px 18px;
    padding: 15px 18px;
    border-radius: 0;
  }

  .learning-materials-term-card p {
    font-size: 12px;
  }

  .learning-materials-category-card:hover,
  .learning-materials-grade-card:hover,
  .learning-materials-search-card:hover,
  .learning-materials-term-card:hover {
    border-color: #e8ecf3;
    background: var(--xiyue-blue-050);
    box-shadow: none;
    transform: none;
  }

  .learning-materials-term-tools {
    position: sticky;
    z-index: 16;
    top: 74px;
  }

  .learning-materials-term-browser-back {
    display: none;
  }

  .learning-materials-term-browser .learning-materials-term-grid {
    gap: 0;
  }
}

/* Desktop calendar: reuse the public site navigation and homepage content width. */
@media (min-width: 961px) {
  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar {
    display: none;
  }

  body[data-active-screen="learning-calendar"] .mock-app .learning-calendar-stage {
    min-height: calc(100vh - 76px);
    padding: 34px clamp(24px, 3vw, 64px) 64px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-stage .learning-calendar-shell {
    width: min(1600px, 100%);
    max-width: 1600px;
    padding: 0;
  }
}

@media (min-width: 1280px) {
  .learning-materials-stage.is-term-detail .learning-materials-term-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 641px) and (max-width: 960px) {
  .learning-materials-term-actions {
    display: grid;
    gap: 5px;
  }
}

@media (min-width: 961px) and (max-width: 1120px) {
  .home-desktop-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
  }

  .home-desktop-brand strong {
    display: none;
  }

  .home-desktop-nav {
    margin-left: 4px;
  }

  .home-desktop-nav > button,
  .home-desktop-nav > a,
  .home-desktop-nav-menu > .home-desktop-exam-trigger {
    min-width: 46px;
    padding: 0 7px;
    font-size: 11px;
  }

  .home-desktop-account {
    gap: 0;
  }

  .home-desktop-membership-state {
    height: 34px;
    padding: 0 9px;
    font-size: 10px;
  }

  .home-desktop-user-entry {
    height: 34px;
    padding: 0 7px;
    font-size: 11px;
  }

  #home-desktop-wrong-popover .home-desktop-nav-single-column {
    width: 520px;
  }

  .home-desktop-user-name {
    max-width: 64px;
  }

  .home-public-company {
    padding: 28px 26px 16px;
  }

  .home-public-company-layout {
    grid-template-columns: minmax(205px, .75fr) minmax(440px, 1.5fr);
    gap: 30px;
  }

  .home-public-company-links {
    gap: 18px;
  }

  .home-desktop-public-hero {
    grid-template-columns: minmax(360px, .88fr) minmax(470px, 1.12fr);
    gap: 28px;
  }

  .home-desktop-public-copy .home-desktop-public-headline {
    font-size: 48px;
  }

  body[data-locale="en-GB"] .home-desktop-public-copy .home-desktop-public-headline {
    font-size: 40px;
    letter-spacing: -.045em;
  }

  .home-desktop-public-copy > h2 {
    margin-top: 16px;
    font-size: 16px;
  }

  .home-desktop-public-copy > p {
    font-size: 14px;
  }
}

@media (max-width: 960px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-side { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .account-language-settings-card { height: auto; grid-template-columns: 1fr; }
  .account-language-intro { height: auto; min-height: 122px; }
  .account-language-device-note { height: 43px; min-height: 43px; }
  .account-identity-management-card { height: 245px; box-sizing: border-box; grid-template-columns: minmax(0,1fr); grid-template-rows: 77px 92px; gap: 20px; }
  .account-identity-management-card p { max-width: none; }
  .learning-calendar-layout { grid-template-columns: 1fr; }
  body[data-active-screen="single-practice"] .single-practice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  body[data-active-screen="start"], body[data-active-screen="single-practice"], body[data-active-screen="wrong-review-hub"] { padding-bottom: 92px; }
  .start-stage { padding: 17px 15px 28px; }
  .start-shell.home-shell { gap: 13px; }
  .home-main,.home-side { gap: 14px; }
  .home-welcome-card { height: auto; min-height: 178px; padding: 25px 21px; border-radius: 26px; }
  .home-welcome-copy { max-width: 64%; }
  .home-welcome-copy h1 { font-size: 26px; line-height: 1.18; }
  .home-welcome-copy h1 span { display: block; }
  .home-welcome-copy h1 span + span { margin-left: 0; }
  .home-welcome-copy p { margin-top: 9px; font-size: 12px; line-height: 1.5; }
  .home-welcome-art { position: absolute; right: -5px; bottom: 0; width: 142px; height: 127px; }
  .home-welcome-art img { right: -3px; bottom: -23px; width: 132px; height: 132px; }
  .home-note-one { top: 2px; right: 5px; left: auto; width: 35px; height: 35px; color: var(--home-blue); }
  .home-note-two { top: 20px; right: auto; left: 0; width: 29px; height: 29px; color: #8668d5; }
  .home-note-three { top: -14px; right: auto; left: 54px; width: 26px; height: 26px; font-size: 10px; }
  .start-dashboard.home-stats { gap: 7px; }
  .home-stat { min-height: 70px; border-radius: 18px; }
  .home-stat strong { font-size: 21px; }
  .home-stat span { font-size: 9px; }
  .home-shell .home-learning { display: none; }
  .home-section-heading { margin: 4px 2px 11px; font-size: 19px; }
  .home-learning-grid { grid-template-columns: 1fr; gap: 12px; }
  .home-learning-grid .start-card-group { grid-column: auto; }
  .home-learning-grid .start-card.home-feature-card { min-height: 132px; gap: 14px; padding: 19px 17px; border-radius: 23px; }
  .home-learning-grid .home-feature-primary { min-height: 165px; }
  .home-feature-icon { width: 49px; height: 49px; border-radius: 16px; }
  .home-feature-icon svg { width: 23px; }
  .home-feature-copy strong { font-size: 19px; }
  .home-feature-copy > span { font-size: 11px; line-height: 1.55; }
  .home-feature-lock { transform: scale(.9); }
  .home-mobile-materials { display: none !important; }
  .home-mobile-redundant-practice { display: none !important; }
  .home-desktop-wrong { display: none !important; }

  .wrong-review-hub-stage { padding: 17px 15px 108px; }
  .wrong-review-hub-shell { gap: 10px; }
  .wrong-review-hub-titlebar { gap: 14px; margin-bottom: 2px; padding: 0; }
  .wrong-review-hub-titlebar > button { width: 46px; height: 46px; padding: 1px 6px; border-radius: 15px; font-size: 27px; }
  .wrong-review-hub-titlebar h1 { margin-top: 2px; font-size: 23px; }
  .wrong-review-hub-titlebar small { font-size: 9px; }
  .wrong-review-hub-summary { height: 185px; min-height: 182px; padding: 24px 145px 22px 21px; border-radius: 25px; }
  .wrong-review-hub-summary::after { right: -84px; bottom: -126px; }
  .wrong-review-hub-summary-copy { max-width: 205px; }
  .wrong-review-hub-summary h2 { margin-top: 8px; font-size: 25px; }
  .wrong-review-hub-summary p { max-width: 205px; margin-top: 10px; font-size: 10px; }
  .wrong-review-hub-summary-art { top: auto; right: 6px; bottom: -15px; width: 148px; height: 155px; }
  .wrong-review-hub-summary-art img { width: 142px; height: 142px; }
  .wrong-review-hub-note.note-one { top: 18px; left: 1px; width: 29px; height: 29px; }
  .wrong-review-hub-note.note-two { top: 3px; right: 7px; width: 33px; height: 33px; }
  .wrong-review-hub-spark { top: 43px; right: 2px; width: 24px; height: 24px; }
  .wrong-review-hub-summary > button { min-height: 29px; margin-top: 13px; padding: 0 10px; border-radius: 999px; font-size: 8px; }
  .wrong-review-hub-categories { padding: 20px; border-radius: 24px; }
  .wrong-review-hub-categories > header { padding-bottom: 16px; }
  body[data-locale="en-GB"] .wrong-review-hub-categories > header { padding-bottom: 21px; }
  .wrong-review-hub-categories > header h2 { font-size: 21px; }
  .wrong-review-hub-category-list { grid-template-columns: 1fr; }
  .wrong-review-hub-category-list > button { min-height: 76px; }
  .wrong-review-hub-category-count { width: 45px; height: 45px; }
  .wrong-review-hub-category-copy strong { font-size: 13px; }
  .home-learning-grid .start-exam-options { grid-template-columns: 1fr; }
  .home-side { grid-template-columns: 1fr; }
  .home-side-menu { display: none; }
  .home-side-card { padding: 21px; border-radius: 24px; }
  .home-shell .start-footer {
    flex-direction: column;
    gap: 2px;
    padding: 3px 0 78px;
  }
  .home-public-company {
    padding: 18px 0 92px;
    border-radius: 0;
  }
  .home-public-company-bottom { align-items: center; justify-items: center; gap: 5px; font-size: 9px; text-align: center; }
  .home-mobile-nav { position: fixed; z-index: 40; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); left: 12px; display: grid; grid-template-columns: repeat(5,1fr); min-height: 68px; padding: 7px 5px; border: 1px solid #fff; border-radius: 23px; background: #fff; box-shadow: 0 32px 0 24px #f7f8fc, 0 14px 42px rgba(28,44,90,.17); }
  .home-mobile-nav button { display: grid; place-content: center; justify-items: center; gap: 3px; color: #98a0b2; border: 0; background: transparent; }
  .home-mobile-nav button > span { font-size: 20px; line-height: 1; }
  .home-mobile-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
  .home-mobile-nav small { font-size: 9px; }
  .home-mobile-nav button.is-active { color: #315df6; }
  .home-mobile-nav-main > span { display: grid; width: 49px; height: 49px; margin-top: -31px; place-items: center; color: white; border: 6px solid #f7f8fc; border-radius: 50%; background: #315df6; box-shadow: 0 9px 20px rgba(49,93,246,.28); font-size: 29px !important; }
  .home-mobile-nav-main > span svg { width: 22px; height: 22px; }
  .learning-calendar-stage,.learning-materials-stage { padding: 17px 15px 96px; }
  .learning-calendar-titlebar { min-height: 52px; }
  .learning-calendar-stage .learning-calendar-titlebar { margin-bottom: 12px; }
  .learning-materials-titlebar { margin-bottom: 12px; }
  .home-exam-menu-stage { padding: 17px 15px 108px; }
  .home-exam-menu-shell { gap: 10px; }
  .home-exam-menu-stage .entry-hub-titlebar { height: 52px; margin-bottom: 2px; }
  .home-exam-menu-grid .start-card.home-feature-primary { height: 165px; overflow: hidden; }
  .home-exam-menu-grid > .start-card.home-feature-preview { height: 132px; overflow: hidden; }
  body[data-locale="en-GB"] .home-exam-menu-grid .home-feature-copy > span {
    font-size: 10px;
    line-height: 1.45;
  }
  body[data-locale="en-GB"] .home-exam-guide {
    padding-top: 19px;
    padding-bottom: 12px;
  }
  body[data-locale="en-GB"] .home-exam-guide-copy > small {
    font-size: 8px;
    line-height: 1.15;
  }
  body[data-locale="en-GB"] .home-exam-guide h2 {
    margin-top: 5px;
    font-size: 23px;
    line-height: 1.08;
  }
  body[data-locale="en-GB"] .home-exam-guide p {
    margin-top: 7px;
    font-size: 9px;
    line-height: 1.4;
  }
  body[data-locale="en-GB"] .home-exam-guide-tags {
    margin-top: 7px;
  }
  body[data-locale="en-GB"] .home-exam-guide-tags span {
    padding: 4px 7px;
    font-size: 7px;
  }
  .home-exam-guide { height: 185px; min-height: 182px; margin-bottom: 0; padding: 24px 145px 22px 21px; border-radius: 25px; }
  .home-exam-guide h2 { font-size: 25px; }
  .home-exam-guide p { max-width: 205px; margin-top: 10px; font-size: 10px; }
  .home-exam-guide-tags { flex-wrap: wrap; gap: 6px; margin-top: 13px; }
  .home-exam-guide-tags span { padding: 6px 8px; font-size: 8px; }
  .home-exam-guide-art { right: 6px; bottom: -15px; width: 148px; height: 155px; }
  .home-exam-guide-art img { width: 142px; height: 142px; }
  .home-exam-guide-note.note-one { top: 18px; left: 1px; width: 29px; height: 29px; }
  .home-exam-guide-note.note-two { top: 3px; right: 7px; width: 33px; height: 33px; }
  .home-exam-guide-spark { top: 43px; right: 2px; width: 24px; height: 24px; }
  body[data-locale="en-GB"] .home-exam-guide {
    padding-top: 19px;
    padding-bottom: 12px;
  }
  body[data-locale="en-GB"] .home-exam-guide-copy > small {
    font-size: 8px;
    line-height: 1.15;
  }
  body[data-locale="en-GB"] .home-exam-guide h2 {
    margin-top: 5px;
    font-size: 23px;
    line-height: 1.08;
  }
  body[data-locale="en-GB"] .home-exam-guide p {
    margin-top: 7px;
    font-size: 9px;
    line-height: 1.4;
  }
  body[data-locale="en-GB"] .home-exam-guide-tags {
    margin-top: 7px;
  }
  body[data-locale="en-GB"] .home-exam-guide-tags span {
    padding: 4px 7px;
    font-size: 7px;
  }
  body[data-active-screen="exam-preview"] .exam-preview-summary h2 {
    font-size: 24px;
    white-space: nowrap;
  }
  .home-exam-menu-grid > .home-feature-preview { grid-column: auto; }
  .single-practice-intro { margin: -3px 2px 0 57px; }
  .learning-calendar-titlebar h1 { font-size: 23px; }
  .learning-calendar-summary { gap: 8px; }
  .learning-calendar-summary article { min-height: 86px; padding: 8px 3px; border-radius: 19px; }
  .learning-calendar-summary strong { font-size: 18px; }
  .learning-calendar-summary small { font-size: 8px; text-align: center; }
  .learning-calendar-card,.learning-day-detail { padding: 20px 17px; border-radius: 23px; }
  .learning-calendar-weekdays,.learning-calendar-grid { gap: 5px; }
  .learning-calendar-day { border-radius: 11px; font-size: 10px; }
  .learning-materials-hero {
    height: 185px;
    min-height: 182px;
    padding: 24px 145px 22px 21px;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 25px;
    background:
      radial-gradient(circle at 82% 18%, rgba(255,255,255,.22), transparent 9rem),
      linear-gradient(135deg, #315df6 0%, #477ff6 64%, #64a8f4 100%);
    box-shadow: 0 18px 42px rgba(49,93,246,.2);
  }
  .learning-materials-hero::after { right: -84px; bottom: -126px; }
  .learning-materials-hero h2 { margin: 8px 0 0; font-size: 25px; line-height: 1.2; letter-spacing: -.035em; }
  .learning-materials-all-grades-range { display: block; font-size: .82em; line-height: 1.15; }
  .learning-materials-hero p { max-width: 205px; margin-top: 8px; font-size: 10px; font-weight: 650; line-height: 1.65; }
  body[data-locale="en-GB"] .learning-materials-hero p { margin-top: 5px; }
  .learning-materials-hero .learning-materials-hero-art { right: 6px; bottom: -15px; width: 148px; height: 155px; }
  .learning-materials-hero-art img { width: 142px; height: 142px; }
  .learning-materials-hero-art .home-exam-guide-note.note-one { top: 18px; left: 1px; width: 29px; height: 29px; }
  .learning-materials-hero-art .home-exam-guide-note.note-two { top: 3px; right: 7px; width: 33px; height: 33px; }
  .learning-materials-hero-art .home-exam-guide-spark { top: 43px; right: 2px; width: 24px; height: 24px; }
  .learning-materials-grid,.learning-materials-term-grid,.learning-materials-symbol-grid,.learning-materials-symbol-grid.is-comparison-grid { grid-template-columns: 1fr; }
  .learning-materials-grid { gap: 10px; }
  .learning-materials-grade-grid,.learning-materials-grade-grid.is-with-search { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .learning-materials-category-card { height: 172px; min-height: 172px; padding: 18px; border-radius: 21px; }
  body[data-locale="en-GB"] .learning-materials-category-card { min-height: 172px; }
  .learning-materials-category-card strong { font-size: 16px; }
  .learning-materials-grade-card,.learning-materials-search-card { height: 118px; min-height: 118px; padding: 16px; }
  .learning-materials-term-browser { margin-top: 12px; }
  .learning-materials-term-browser-heading { align-items: flex-start; flex-direction: column-reverse; gap: 12px; padding: 0 1px 15px; }
  .learning-materials-term-browser-heading h2 { margin-top: 5px; font-size: 23px; }
  .learning-materials-term-browser-heading p { min-height: 33px; font-size: 10px; }
  .learning-materials-term-browser-back { min-height: 36px; padding: 0 11px; border-radius: 11px; font-size: 10px; }
  .learning-materials-term-tools { grid-template-columns: minmax(0,1fr); gap: 10px; padding: 12px 0; }
  .learning-materials-term-tools.is-search-only { grid-template-columns: minmax(0,1fr); }
  .learning-materials-grade-switcher { width: 100%; }
  .learning-materials-grade-switcher button { min-width: 54px; height: 36px; padding-inline: 10px; font-size: 10px; }
  .learning-materials-search-panel { gap: 5px; padding: 0; border-radius: 0; }
  .learning-materials-search-field { height: 52px; grid-template-columns: 29px minmax(0,1fr) 40px; gap: 7px; padding-left: 12px; border-radius: 15px; }
  .learning-materials-search-field input { font-size: 16px; }
  .learning-materials-search-status { font-size: 9px; }
  .learning-materials-term-card { min-height: 94px; gap: 6px 12px; padding: 14px; border-right: 0; border-radius: 0; }
  .learning-materials-term-card:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid #e8ecf3; }
  .learning-materials-term-actions { display: grid; gap: 5px; }
  .learning-materials-term-browser.is-open-list .learning-materials-term-grid { grid-template-columns: 1fr; column-gap: 0; }
  .learning-materials-term-browser.is-open-list .learning-materials-term-card { min-height: 88px; padding: 15px 1px; }
  .learning-materials-term-browser.is-open-list .learning-materials-term-actions { display: grid; gap: 5px; }
  .learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card,
  .learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card.is-single-sign,
  .learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card.is-comparison {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: auto auto;
    gap: 10px;
    padding: 18px 1px;
  }
  .learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card.is-comparison.is-inline-comparison {
    min-height: 0;
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: auto auto;
    gap: 10px;
    padding: 18px 1px;
  }
  .learning-materials-term-browser.is-sign-browser .is-inline-comparison .learning-materials-symbol-examples {
    height: auto;
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: repeat(2,160px);
    gap: 12px;
  }
  .learning-materials-term-browser.is-sign-browser .is-inline-comparison.is-three-examples .learning-materials-symbol-examples {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: repeat(3,160px);
  }
  .learning-materials-term-browser.is-sign-browser .is-inline-comparison.is-four-examples .learning-materials-symbol-examples {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: repeat(4,160px);
  }
  .learning-materials-symbol-card { min-height: 148px; grid-template-columns: minmax(104px,36%) 1fr; gap: 12px; padding: 14px; }
  .learning-materials-symbol-card.is-comparison { grid-template-columns: minmax(0,1fr); grid-template-rows: auto 388px; gap: 12px; padding: 14px; }
  .learning-materials-symbol-card.is-comparison.is-three-examples { grid-template-rows: auto auto; }
  .learning-materials-symbol-card.is-comparison.is-four-examples { grid-template-rows: auto auto; }
  .learning-materials-symbol-card.is-single-sign { min-height: 250px; grid-template-columns: minmax(0,1fr); grid-template-rows: auto 194px; gap: 10px; padding: 14px; }
  .learning-materials-symbol-examples { grid-template-columns: minmax(0,1fr); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 12px; }
  .learning-materials-symbol-examples.is-three { grid-template-columns: minmax(0,1fr); grid-template-rows: repeat(3,184px); }
  .learning-materials-symbol-examples.is-four { grid-template-columns: minmax(0,1fr); grid-template-rows: repeat(4,184px); }
  .learning-materials-symbol-example { gap: 6px; }
  .learning-materials-symbol-example > small { padding: 4px 8px; font-size: 8px; }
  .learning-materials-symbol-mark { min-height: 118px; }
  .learning-materials-symbol-mark svg { max-height: 118px; }
  .learning-materials-symbol-example .learning-materials-symbol-mark { min-height: 160px; }
  .learning-materials-symbol-example .learning-materials-symbol-mark svg { max-height: 154px; }
  .learning-materials-symbol-examples.is-single .learning-materials-symbol-mark { min-height: 160px; }
  .learning-materials-symbol-examples.is-single .learning-materials-symbol-mark svg { width: min(100%,320px) !important; max-height: 150px; }
  .learning-materials-symbol-example.is-standalone .learning-materials-symbol-mark svg { width: 168px !important; height: 140px !important; max-height: 140px; }
  .learning-materials-symbol-example.is-wide-symbol .learning-materials-symbol-mark svg { width: min(90%,300px) !important; height: auto !important; max-height: 100px; }
  .learning-materials-symbol-copy { gap: 7px; }
  .learning-materials-symbol-card.is-comparison .learning-materials-symbol-copy { grid-template-columns: minmax(0,1fr); align-content: center; gap: 7px; }
  .learning-materials-symbol-copy strong { font-size: 14px; }
  .learning-materials-symbol-heading span { font-size: 9px; }
  .learning-materials-symbol-copy p { font-size: 9px; line-height: 1.58; }
  .login-shell:has(.account-ui-heading) .login-header { display: none; }
  .account-ui-heading { height: 52px; margin: 0 0 12px; }
  .account-ui-heading h1 { font-size: 23px; }
  .account-ui-hero { min-height: 112px; gap: 13px; padding: 17px; border-radius: 24px; }
  .account-ui-mascot { width: 66px; height: 66px; border-radius: 21px; }.account-ui-mascot img { width: 74px; height: 74px; }
  .account-ui-identity strong { font-size: 18px; }.account-ui-identity small,.account-ui-identity span { font-size: 9px; }
  .account-ui-vip { padding: 8px 9px; border-radius: 13px; }.account-ui-vip strong { font-size: 9px; }
  .account-ui-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .account-ui-card { padding: 19px; border-radius: 23px; }
  .about-us-hero { min-height: 178px; padding: 24px 22px; border-radius: 23px; }
  .about-us-hero > div { max-width: 66%; }
  .about-us-hero h2 { margin-top: 6px; font-size: 23px; }
  .about-us-hero p { margin-top: 9px; font-size: 10px; line-height: 1.6; }
  .about-us-hero img { right: -3px; bottom: -5px; width: 142px; height: 142px; }
  .about-us-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .about-us-card { padding: 20px 18px; border-radius: 23px; }
  .about-us-intro-card p { margin-top: 13px; font-size: 10px; line-height: 1.9; }
  .about-us-details { margin-top: 13px; }
  .about-us-details > div { grid-template-columns: 1fr; gap: 5px; padding: 11px 0; }
  .about-us-details dt { font-size: 9px; }
  .about-us-details dd { font-size: 10px; }
  .language-settings-heading { height: 52px; min-height: 52px; }
  .account-language-settings-card { grid-template-columns: 1fr; gap: 20px; padding: 21px 18px; border-radius: 23px; }
  .account-language-intro { min-height: 128px; }
  .account-language-options { height: auto; grid-template-columns: 1fr; gap: 8px; }
  .account-language-option { height: 72px; min-height: 72px; grid-template-columns: auto minmax(0,1fr) auto; align-content: center; justify-items: start; gap: 12px; padding: 12px 14px; text-align: left; border-radius: 16px; }
  .account-language-option-copy { min-width: 0; }
  .account-language-option > b { justify-self: end; }
  .account-language-device-note { margin-top: -4px; line-height: 1.55; }
  .account-identity-management-card {
    height: 238px;
    box-sizing: border-box;
    grid-template-columns: 1fr;
    grid-template-rows: 94px 82px;
    gap: 20px;
    padding: 21px 18px;
    border-radius: 23px;
  }
  .account-identity-management-options { gap: 7px; }
  .account-identity-management-options button { min-height: 82px; gap: 6px; padding: 10px 5px; border-radius: 16px; }
  .account-identity-management-options button strong { font-size: 11px; }
  .teacher-student-heading { margin-bottom: 12px; }
  .teacher-student-action-card,
  .teacher-student-action-card:has(.student-binding-code-box),
  .teacher-student-action-card.teacher-student-identity-required {
    height: 179.5px;
    box-sizing: border-box;
    grid-template-columns: minmax(0,1fr);
    gap: 17px;
    margin-top: 12px;
    padding: 20px 18px;
    border-radius: 23px;
  }
  .teacher-student-action-card .teacher-student-primary-button { width: 100%; }
  .teacher-student-code-entry { grid-template-columns: minmax(0,1fr); }
  .teacher-student-action-card:has(.teacher-student-code-entry) {
    height: auto;
    min-height: 0;
  }
  .teacher-student-list-card { height: auto; min-height: 241px; box-sizing: border-box; margin-top: 12px; padding: 20px 18px; border-radius: 23px; }
  .teacher-student-list-card > header.teacher-student-selected-group-header { grid-template-columns: 38px minmax(0,1fr) auto 38px; gap: 8px; }
  .teacher-student-group-actions-popover { width: min(270px,calc(100vw - 92px)); }
  body:not([data-locale="en-GB"]) .teacher-student-heading .account-ui-subpage-kicker,
  body:not([data-locale="en-GB"]) .teacher-student-action-card > div > small,
  body:not([data-locale="en-GB"]) .teacher-student-list-card > header small,
  body:not([data-locale="en-GB"]) .account-identity-management-card > div:first-child > small { display: none; }
  .teacher-student-group-header-edit input,
  .teacher-student-inline-group-create input { font-size: 16px; }
  .teacher-student-person-card { grid-template-columns: 44px minmax(0,1fr); gap: 11px; padding: 14px 0; }
  .teacher-student-avatar { width: 44px; height: 44px; border-radius: 14px; font-size: 16px; }
  .teacher-student-group-create { display: grid; gap: 11px; }
  .teacher-student-group-create > span { grid-template-columns: minmax(0,1fr) auto; }
  .teacher-student-group-selected-tools,.teacher-student-group-edit { align-items: stretch; flex-wrap: wrap; }
  .teacher-student-group-selected-tools > span { width: 100%; flex-basis: 100%; }
  .teacher-student-group-edit input { min-width: 100%; flex-basis: 100%; }
  .teacher-student-search { grid-template-columns: minmax(0,1fr); justify-content: stretch; }
  .teacher-student-search input { width: 100%; }
  .teacher-student-group-control { display: none; grid-column: 1 / -1; }
  .teacher-student-group-control.is-mobile-new-group-open { display: grid; }
  .teacher-student-group-control.is-mobile-new-group-open .teacher-student-group-picker { display: none; }
  .teacher-student-group-picker { grid-template-columns: minmax(0,1fr); }
  .teacher-student-group-directory > button { grid-template-columns: 44px minmax(0,1fr) auto; gap: 11px; }
  .teacher-student-group-directory-icon { width: 44px; height: 44px; border-radius: 14px; }
  .teacher-student-inline-group-create { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .teacher-student-inline-group-create input { grid-column: 1 / -1; }
  .teacher-student-person-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .teacher-student-person-actions button { min-height: 40px; }
  .teacher-student-person-card.is-linked-teacher .teacher-student-person-actions { grid-template-columns: minmax(0,1fr); }
  .teacher-student-avatar.has-mobile-group-picker { position: relative; cursor: pointer; }
  .teacher-student-avatar.has-mobile-group-picker::after { position: absolute; right: -4px; bottom: -4px; z-index: 3; display: grid; width: 17px; height: 17px; place-items: center; color: #fff; border: 2px solid #fff; border-radius: 50%; background: #315df6; content: "+"; font-size: 11px; line-height: 1; pointer-events: none; }
  .teacher-student-mobile-avatar-group-select { position: absolute; inset: 0; z-index: 2; display: block; width: 100%; height: 100%; opacity: .001; cursor: pointer; }
  .teacher-student-person-card.is-in-selected-group .teacher-student-unlink-button { display: none; }
  .teacher-student-person-card.is-in-selected-group .teacher-student-mobile-remove-group { display: block; }
  .teacher-student-detail-hero {
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 12px 8px;
    padding: 18px;
    border-radius: 22px;
  }
  .teacher-student-detail-hero > .teacher-student-avatar { grid-column: 1; width: 52px; height: 52px; justify-self: start; }
  .teacher-student-detail-hero > div { grid-column: 2 / -1; }
  .teacher-student-detail-hero > span:not(.teacher-student-avatar) { padding: 10px 3px 2px; border-top: 1px solid #edf0f5; border-left: 0; }
  .teacher-student-detail-hero > span:not(.teacher-student-avatar) strong { font-size: 16px; }
  .teacher-student-calendar-layout { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .teacher-student-calendar-card,.teacher-student-day-card { padding: 18px 15px; border-radius: 22px; }
  .teacher-student-calendar-weekdays,.teacher-student-calendar-grid { gap: 4px; }
  .teacher-student-calendar-weekdays { margin-top: 18px; }
  .teacher-student-calendar-grid > button { border-radius: 10px; font-size: 9px; }
  .teacher-student-calendar-grid > button i { bottom: 5px; }
  .teacher-student-wrong-card { padding: 17px; border-radius: 20px; }
  .teacher-student-wrong-card > header { align-items: flex-start; }
  .teacher-student-wrong-card > div { grid-template-columns: 1fr; gap: 11px; }
  body[data-active-screen="login"] .login-stage,
  body[data-active-screen="recharge"] .login-stage,
  body[data-active-screen="feedback"] .login-stage { padding: 20px 15px 40px; }
  body[data-active-screen="recharge"] .login-stage,
  body[data-active-screen="feedback"] .login-stage { padding-top: 17px; }
  body[data-active-screen="login"] .login-stage { padding-bottom: 108px; }
  body[data-active-screen="login"] .login-stage:has(.account-ui-heading) { padding: 17px 15px 108px; }
  body[data-active-screen="login"] .login-panel,
  body[data-active-screen="recharge"] .login-panel,
  body[data-active-screen="feedback"] .login-panel { padding: 25px 20px; border-radius: 27px; }
  body[data-active-screen="recharge"] .recharge-summary,
  body[data-active-screen="recharge"] .recharge-benefit-list,
  body[data-active-screen="recharge"] .recharge-actions { grid-template-columns: 1fr; }
  body[data-active-screen="recharge"] .recharge-benefit-item { min-height: 0; }
  body[data-active-screen="recharge"] .membership-benefit-summary { align-items: flex-start; gap: 10px; padding: 15px 16px; }
  body[data-active-screen="recharge"] .membership-benefit-summary > div { gap: 8px 14px; }
  body[data-active-screen="login"] .login-field input,
  body[data-active-screen="feedback"] .login-field textarea,
  .account-password-panel .login-field input { font-size: 16px !important; }
  .account-feature-titlebar { height: 46px; min-height: 46px; }
  body[data-active-screen="recharge"] .account-feature-shell,
  body[data-active-screen="feedback"] .account-feature-shell { gap: 12px; }
  body[data-active-screen="recharge"] .account-feature-titlebar,
  body[data-active-screen="feedback"] .account-feature-titlebar { height: 52px; min-height: 52px; }
  body[data-active-screen="feedback"] .feedback-field { grid-template-rows: 16px auto; }
  body[data-active-screen="feedback"] .feedback-field textarea { height: 150px; min-height: 150px; }
  body[data-active-screen="feedback"] .feedback-attachments { margin-top: 0; }
  body[data-active-screen="feedback"] .feedback-upload-card:not(.is-compact) { min-height: 150px; }
  body[data-active-screen="feedback"] .feedback-preview { height: auto; min-height: 0; margin-top: 0; }
  body[data-active-screen="single-practice"] .single-practice-stage,
  body[data-active-screen="exam-preview"] .exam-preview-stage { padding: 17px 15px 40px; }
  body[data-active-screen="single-practice"] .single-practice-stage { padding-bottom: 108px; }
  body[data-active-screen="single-practice"] .single-practice-shell { gap: 10px; }
  body[data-active-screen="single-practice"] .single-practice-titlebar,
  body[data-active-screen="exam-preview"] .exam-preview-titlebar { margin-bottom: 2px; }
  body[data-active-screen="single-practice"] .single-practice-hero,
  body[data-active-screen="exam-preview"] .exam-preview-hero { min-height: 0; padding: 21px; border-radius: 23px; }
  body[data-active-screen="single-practice"] .single-practice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  body[data-active-screen="single-practice"] .single-practice-card { min-height: 112px; padding: 16px; border-radius: 19px; }
  body[data-active-screen="single-practice"] .single-practice-summary { height: 185px; min-height: 182px; padding: 24px 145px 22px 21px; border-radius: 25px; }
  body[data-active-screen="single-practice"] .single-practice-summary h2 { font-size: 25px; }
  body[data-active-screen="single-practice"] .single-practice-summary p { max-width: 205px; margin-top: 10px; font-size: 10px; }
  body[data-active-screen="single-practice"] .single-practice-summary-tags { flex-wrap: wrap; gap: 6px; margin-top: 13px; }
  body[data-active-screen="single-practice"] .single-practice-summary-tags span { padding: 6px 8px; font-size: 8px; }
  body[data-active-screen="single-practice"] .single-practice-summary-art { right: 6px; bottom: -15px; width: 148px; height: 155px; }
  body[data-active-screen="single-practice"] .single-practice-summary-art img { width: 142px; height: 142px; }
  body[data-active-screen="single-practice"] .single-practice-summary-note.note-one { top: 18px; left: 1px; width: 29px; height: 29px; }
  body[data-active-screen="single-practice"] .single-practice-summary-note.note-two { top: 3px; right: 7px; width: 33px; height: 33px; }
  body[data-active-screen="single-practice"] .single-practice-summary-spark { top: 43px; right: 2px; width: 24px; height: 24px; }
  body[data-active-screen="single-practice"] .single-practice-categories { padding: 20px 17px; border-radius: 24px; }
  body[data-active-screen="single-practice"] .single-practice-categories-heading { margin-bottom: 9px; padding-bottom: 15px; }
  body[data-locale="en-GB"][data-active-screen="single-practice"] .single-practice-categories-heading { padding-bottom: 18px; }
  body[data-active-screen="single-practice"] .single-practice-categories-heading h2 { font-size: 21px; }
  body[data-active-screen="single-practice"] .single-practice-grid { grid-template-columns: 1fr; gap: 0; }
  body[data-active-screen="single-practice"] .single-practice-card { min-height: 76px; padding: 10px 3px; border: 0; border-bottom: 1px solid var(--home-line); border-radius: 0; background: transparent; }
  body[data-active-screen="single-practice"] .single-practice-card:hover,
  body[data-active-screen="single-practice"] .single-practice-card:active { transform: none; background: transparent; box-shadow: none; }
  body[data-active-screen="single-practice"] .single-practice-card:last-child { border-bottom: 0; }
  body[data-active-screen="single-practice"] .single-practice-card::before { width: 45px; height: 45px; border-radius: 15px; }
  body[data-active-screen="single-practice"] .single-practice-card-title { font-size: 13px; }
  body[data-active-screen="single-practice"] .single-practice-card-copy { font-size: 9px; }
  @supports (-webkit-touch-callout: none) {
    .learning-materials-stage { padding-top: 15px; }
    .learning-materials-titlebar { margin-bottom: 10px; }
    body[data-active-screen="single-practice"] .single-practice-stage { padding-top: 15px; }
    body[data-active-screen="single-practice"] .single-practice-titlebar { margin-bottom: 0; }
  }
body[data-active-screen="exam-preview"] .exam-preview-paper-card { border-radius: 21px; }
}

/* Wrong-review answer screen pilot: visual changes only, scoped away from exams and practice. */
body[data-active-screen="exam"][data-activity-mode="wrong-review"] {
  --selection-blue: #315df6;
  color: var(--home-ink);
  background: #fff;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .mock-app,
body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wide-stage {
  background: #fff;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-main {
  background: #fff;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wide-stage {
  height: 100vh;
  padding: 20px 24px;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wide-shell {
  width: min(1280px, 100%);
  max-width: 100%;
  min-width: 0;
  height: calc(100vh - 40px);
  margin: 0 auto;
  background: transparent;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar {
  display: flex;
  padding: 14px 18px;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(45, 67, 128, 0.07);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar .toolbar-right {
  display: none !important;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .toolbar-left {
  flex-wrap: wrap;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .toolbar-brand {
  color: #16213d;
  font-weight: 750;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] :is(#exam-prev-button, #exam-next-button) {
  min-width: 88px;
  height: 42px;
  border: 1px solid rgba(49, 93, 246, 0.14);
  border-radius: 13px;
  color: #315df6;
  background: #f1f5ff;
  box-shadow: none;
  font-weight: 750;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] #exam-next-button:not(:disabled) {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #4773ff, #315df6);
  box-shadow: 0 8px 18px rgba(49, 93, 246, 0.2);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-main {
  gap: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0 4px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(49, 93, 246, 0.22) transparent;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 16px;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-main > * {
  max-width: 100%;
  min-width: 0;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-overview-card {
  display: grid;
  gap: 9px;
  padding: 22px 24px;
  border: 1px solid rgba(43, 60, 100, 0.08);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(45, 67, 128, 0.07);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-overview-card h1 {
  margin: 0;
  color: var(--home-ink);
  font-size: 26px;
  letter-spacing: -0.03em;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-overview-card p {
  margin: 0;
  color: var(--home-muted);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-progress {
  margin-top: 8px;
  color: #315df6 !important;
  font-size: 11px !important;
  font-weight: 800;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-helper {
  font-size: 14px !important;
  line-height: 1.6;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-home-button {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  border: 1px solid rgba(49, 93, 246, 0.14);
  border-radius: 14px;
  color: #315df6;
  background: #f1f5ff;
  font-size: 15px;
  font-weight: 750;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-main :is(
  .exam-card,
  .info-main-card-frame,
  .info-action-card-frame,
  .q1-question-card,
  .q1-reference-card,
  .q1-answer-card,
  .select-page-shell,
  .capture-page-wrap
) {
  border-color: rgba(43, 60, 100, 0.08);
  border-radius: 22px;
  background-color: #fff;
  box-shadow: 0 12px 34px rgba(45, 67, 128, 0.07);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] :is(
  .answer-submit,
  .q1-answer-button,
  [data-action="submit-current-page"]
) {
  z-index: 0;
  color: #ffffff;
  border-color: transparent !important;
  border-radius: 14px;
  background: linear-gradient(135deg, #4773ff, #315df6);
  box-shadow: 0 10px 22px rgba(49, 93, 246, 0.2);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-feedback-card {
  padding: 16px 18px;
  border-width: 0;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(45, 67, 128, 0.1);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-bottom-row {
  display: none !important;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .paper-nav {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 52px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px rgba(45, 67, 128, 0.09);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-nav-button {
  flex-basis: 54px;
  width: 54px;
  min-width: 54px;
  color: #315df6;
  border-color: rgba(43, 60, 100, 0.08);
  background: #ffffff;
  font-size: 20px;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-nav-status {
  color: var(--home-ink);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-nav-status span:last-child {
  color: #98a0b2;
  font-size: 9px;
  font-weight: 500;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  max-width: none !important;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  overflow: hidden;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: wrong-review-overlay-in 220ms ease-out both;
  overscroll-behavior: contain;
  cursor: pointer;
  touch-action: manipulation;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-dialog {
  width: min(370px, calc(100vw - 36px));
  padding: 22px 22px 20px;
  border: 0;
  border-radius: 30px;
  background: #ffffff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 22px 58px rgba(22, 40, 92, 0.2);
  text-align: center;
  animation: wrong-review-dialog-in 520ms cubic-bezier(0.2, 0.9, 0.2, 1.14) both;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-orbit {
  position: relative;
  width: 166px;
  height: 150px;
  margin: -6px auto 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 174, 255, 0.2), rgba(91, 174, 255, 0.04) 58%, transparent 72%);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-mascot {
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 146px;
  height: 146px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 16px 18px rgba(44, 103, 219, 0.2));
  animation: wrong-review-mascot-jump 780ms cubic-bezier(0.2, 0.85, 0.25, 1.12) both,
    wrong-review-mascot-float 2.4s ease-in-out 820ms infinite;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-spark {
  position: absolute;
  z-index: 2;
  color: #315df6;
  font-weight: 800;
  opacity: 0;
  animation: wrong-review-spark-in 480ms ease-out 420ms both;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .spark-one { left: 8px; top: 45px; color: #7c5ce0; font-size: 22px; transform: rotate(-10deg); }
body[data-active-screen="exam"][data-activity-mode="wrong-review"] .spark-two { right: 10px; top: 24px; color: #21b997; font-size: 20px; }
body[data-active-screen="exam"][data-activity-mode="wrong-review"] .spark-three { right: 1px; bottom: 24px; color: #315df6; font-size: 18px; transform: rotate(12deg); }

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-kicker {
  margin: 2px 0 5px;
  color: #98a2b8;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-dialog h2 {
  margin: 0;
  color: #16213d;
  font-size: 31px;
  letter-spacing: -0.04em;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-overlay.is-correct .wrong-review-result-dialog h2 {
  color: #168a55;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-overlay:is(.is-incorrect, .is-unanswered) .wrong-review-result-dialog h2 {
  color: #d43b45;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-message {
  margin: 9px 0 0;
  color: #73809b;
  font-size: 14px;
  line-height: 1.55;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-score {
  display: inline-flex;
  margin: 10px 0 0;
  padding: 5px 10px;
  border-radius: 999px;
  color: #946b0a;
  background: #fff5d6;
  font-size: 13px;
  font-weight: 800;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-dismiss-hint {
  margin: 18px 0 0;
  color: #9aa4b8;
  font-size: 12px;
  font-weight: 650;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-continue,
body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-continue {
  display: none;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-button {
  display: inline-flex;
  min-width: 98px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 1px solid rgba(49, 93, 246, 0.16);
  border-radius: 15px;
  color: #315df6;
  background: #f5f8ff;
  font-size: 15px;
  font-weight: 800;
  touch-action: manipulation;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-button span {
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-button.is-primary {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #4773ff, #315df6);
  box-shadow: 0 10px 22px rgba(49, 93, 246, 0.22);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-button.is-retry {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #ff7b7b, #f04f62);
  box-shadow: 0 10px 22px rgba(221, 68, 82, 0.2);
}

@keyframes wrong-review-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes wrong-review-dialog-in {
  from { opacity: 0; transform: translateY(34px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wrong-review-mascot-jump {
  0% { opacity: 0; transform: translate(-50%, 55px) scale(0.64) rotate(-8deg); }
  55% { opacity: 1; transform: translate(-50%, -13px) scale(1.08) rotate(4deg); }
  76% { transform: translate(-50%, 5px) scale(0.97) rotate(-2deg); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(0); }
}

@keyframes wrong-review-mascot-float {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -7px); }
}

@keyframes wrong-review-spark-in {
  from { opacity: 0; scale: 0.4; }
  to { opacity: 1; scale: 1; }
}

@media (max-width: 760px) {
  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-overlay {
    place-items: center;
    padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wide-stage {
    height: 100svh;
    padding: 0 12px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wide-stage[data-screen="exam"] .wide-shell {
    height: 100svh;
    padding: 0 !important;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-main {
    padding: 0 0 10px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar {
    margin: 10px 0 12px;
    padding: 14px;
    border-radius: 19px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .toolbar-left {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .toolbar-brand {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 15px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] :is(#exam-prev-button, #exam-next-button) {
    width: 100%;
    min-width: 0;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-main {
    gap: 12px;
    padding-bottom: 4px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-overview-card {
    padding: 19px 17px;
    border-radius: 19px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-overview-card h1 {
    font-size: 22px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-main :is(
    .exam-card,
    .info-main-card-frame,
    .info-action-card-frame,
    .q1-question-card,
    .q1-reference-card,
    .q1-answer-card,
    .select-page-shell,
    .capture-page-wrap
  ) {
    border-radius: 19px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-feedback-card {
    padding: 13px 14px;
    border-radius: 17px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .paper-nav {
    min-height: 50px;
    border-radius: 17px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-nav-button {
    flex-basis: 48px;
    width: 48px;
    min-width: 48px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-dialog {
    width: min(326px, calc(100vw - 44px));
    padding: 14px 16px 15px;
    border: 0;
    border-radius: 24px;
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 16px 44px rgba(22, 40, 92, 0.18);
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-orbit {
    width: 116px;
    height: 102px;
    margin-top: -3px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-mascot {
    width: 104px;
    height: 104px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-dialog h2 {
    font-size: 25px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-kicker {
    margin-top: 0;
    font-size: 10px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-message {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.45;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-dismiss-hint {
    display: none;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-continue {
    display: flex;
    min-height: 42px;
    margin-top: 13px;
    padding: 0 13px 0 16px;
    align-items: center;
    justify-content: space-between;
    color: #315df6;
    border: 1px solid rgba(49, 93, 246, 0.16);
    border-radius: 14px;
    background: #f2f6ff;
    font-size: 13px;
    font-weight: 800;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-continue b {
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-button {
    min-width: 92px;
    min-height: 46px;
    padding-inline: 13px;
    font-size: 14px;
  }
}

@media (min-width: 961px) {
  #home-desktop-account-nav .home-desktop-account-popover {
    right: auto;
    left: 0;
    display: block;
    width: 350px;
    max-height: min(560px, calc(100vh - 104px));
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    border-radius: 16px;
    background: #fff;
    scrollbar-width: thin;
    scrollbar-color: #cbd4e5 transparent;
  }

  #home-desktop-account-nav .home-desktop-account-popover[hidden] {
    display: none;
  }

  .home-desktop-account-menu {
    display: grid;
    width: 100%;
  }

  .home-desktop-account-menu-profile {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 17px 18px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  .home-desktop-account-menu-avatar {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    overflow: hidden;
    border-radius: 11px;
    background: var(--xiyue-blue-050);
  }

  .home-desktop-account-menu-avatar img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transform: translateY(2px);
  }

  .home-desktop-account-menu-profile-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
  }

  .home-desktop-account-menu-profile-copy strong,
  .home-desktop-account-menu-profile-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-desktop-account-menu-profile-copy strong {
    color: var(--xiyue-ink);
    font-size: 14px;
    font-weight: 820;
  }

  .home-desktop-account-menu-profile-copy small {
    color: var(--xiyue-muted);
    font-size: 9px;
    font-weight: 620;
  }

  .home-desktop-account-menu-vip {
    padding: 5px 7px;
    color: var(--xiyue-blue-600);
    border-radius: 7px;
    background: var(--xiyue-blue-050);
    font-size: 9px;
    font-weight: 800;
  }

  .home-desktop-account-menu-actions {
    display: grid;
    padding: 7px;
  }

  .home-desktop-account-menu-actions > button {
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    gap: 12px;
    padding: 8px 11px;
    color: var(--xiyue-ink);
    border: 0;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }

  .home-desktop-account-menu-actions > button:hover,
  .home-desktop-account-menu-actions > button:focus-visible {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  .home-desktop-account-menu-actions > button:focus-visible {
    outline: 2px solid rgba(49, 93, 246, .22);
    outline-offset: -2px;
  }

  .home-desktop-account-menu-actions > button > span {
    display: grid;
    min-width: 0;
    gap: 3px;
  }

  .home-desktop-account-menu-actions strong {
    font-size: 12px;
    font-weight: 790;
  }

  .home-desktop-account-menu-actions small {
    color: var(--xiyue-muted);
    font-size: 9px;
    font-weight: 580;
  }

  .home-desktop-account-menu-actions b {
    margin-left: auto;
    color: var(--xiyue-subtle);
    font-size: 18px;
    font-weight: 450;
  }

  .home-desktop-account-menu-actions .home-desktop-account-menu-logout {
    margin-top: 5px;
    border-top: 1px solid var(--xiyue-line);
    border-radius: 0 0 10px 10px;
  }

  .home-desktop-account-menu-actions .home-desktop-account-menu-logout strong {
    color: #d84252;
  }

  .home-desktop-account-menu > footer {
    padding: 11px 18px 13px;
    color: var(--xiyue-muted);
    border-top: 1px solid var(--xiyue-line);
    font-size: 9px;
    font-weight: 620;
    text-align: right;
  }

  .home-desktop-account-menu-intro {
    display: grid;
    gap: 5px;
    padding: 20px 19px 16px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  .home-desktop-account-menu-intro strong {
    color: var(--xiyue-ink);
    font-size: 16px;
    font-weight: 840;
  }

  .home-desktop-account-menu-intro small {
    color: var(--xiyue-muted);
    font-size: 10px;
    line-height: 1.5;
  }

}

@media (prefers-reduced-motion: reduce) {
  body[data-active-screen="exam"][data-activity-mode="wrong-review"] :is(
    .wrong-review-result-overlay,
    .wrong-review-result-dialog,
    .wrong-review-result-mascot,
    .wrong-review-result-spark
  ) {
    animation: none !important;
  }
}

/* Single practice reuses the proven review-card language without exam-only controls. */
.single-practice-return-button {
  display: none !important;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] {
  --selection-blue: #315df6;
  color: var(--home-ink);
  background: #fff;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] :is(.mock-app, .wide-stage) {
  background: #fff;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .wide-stage {
  height: 100vh;
  padding: 20px 24px;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .wide-shell {
  width: min(1280px, 100%);
  max-width: 100%;
  min-width: 0;
  height: calc(100vh - 40px);
  margin: 0 auto;
  background: transparent;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar {
  display: flex;
  padding: 14px 18px;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(45, 67, 128, 0.07);
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar .toolbar-right {
  display: none !important;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .toolbar-left {
  flex-wrap: wrap;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .toolbar-brand {
  color: #16213d;
  font-weight: 750;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] :is(#exam-prev-button, #exam-next-button) {
  min-width: 88px;
  height: 42px;
  border: 1px solid rgba(49, 93, 246, 0.14);
  border-radius: 13px;
  color: #315df6;
  background: #f1f5ff;
  box-shadow: none;
  font-weight: 750;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] #exam-next-button:not(:disabled) {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #4773ff, #315df6);
  box-shadow: 0 8px 18px rgba(49, 93, 246, 0.2);
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-return-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  height: 42px;
  border: 1px solid rgba(49, 93, 246, 0.14);
  border-radius: 13px;
  color: #315df6;
  background: #ffffff;
  box-shadow: none;
  font-weight: 750;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-main {
  gap: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0 4px 16px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: rgba(49, 93, 246, 0.22) transparent;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .info-card-stack {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 16px;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] :is(
  .exam-card,
  .info-main-card-frame,
  .info-action-card-frame,
  .q1-question-card,
  .q1-reference-card,
  .q1-answer-card,
  .select-page-shell,
  .capture-page-wrap
) {
  border-color: rgba(43, 60, 100, 0.08);
  border-radius: 22px;
  background-color: #fff;
  box-shadow: 0 12px 34px rgba(45, 67, 128, 0.07);
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] :is(
  .answer-submit,
  .q1-answer-button,
  [data-action="submit-current-page"]
) {
  z-index: 0;
  color: #ffffff;
  border-color: transparent !important;
  border-radius: 14px;
  background: linear-gradient(135deg, #4773ff, #315df6);
  box-shadow: 0 10px 22px rgba(49, 93, 246, 0.2);
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] :is(.exam-bottom-row, .bottom-actions-group) {
  display: none !important;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  max-width: none !important;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  overflow: hidden;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: wrong-review-overlay-in 220ms ease-out both;
  overscroll-behavior: contain;
  cursor: pointer;
  touch-action: manipulation;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-dialog {
  width: min(370px, calc(100vw - 36px));
  padding: 22px 22px 20px;
  border: 0;
  border-radius: 30px;
  background: #ffffff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 22px 58px rgba(22, 40, 92, 0.2);
  text-align: center;
  animation: wrong-review-dialog-in 520ms cubic-bezier(0.2, 0.9, 0.2, 1.14) both;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-orbit {
  position: relative;
  width: 166px;
  height: 150px;
  margin: -6px auto 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 174, 255, 0.2), rgba(91, 174, 255, 0.04) 58%, transparent 72%);
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-mascot {
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 146px;
  height: 146px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 16px 18px rgba(44, 103, 219, 0.2));
  animation: wrong-review-mascot-jump 780ms cubic-bezier(0.2, 0.85, 0.25, 1.12) both,
    wrong-review-mascot-float 2.4s ease-in-out 820ms infinite;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-spark {
  position: absolute;
  z-index: 2;
  color: #315df6;
  font-weight: 800;
  opacity: 0;
  animation: wrong-review-spark-in 480ms ease-out 420ms both;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-orbit .spark-one { left: 8px; top: 45px; color: #7c5ce0; font-size: 22px; transform: rotate(-10deg); }
body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-orbit .spark-two { right: 10px; top: 24px; color: #21b997; font-size: 20px; }
body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-orbit .spark-three { right: 1px; bottom: 24px; color: #315df6; font-size: 18px; transform: rotate(12deg); }

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-kicker {
  margin: 2px 0 5px;
  color: #98a2b8;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-dialog h2 {
  margin: 0;
  color: #16213d;
  font-size: 31px;
  letter-spacing: -0.04em;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-overlay.is-correct .single-practice-result-dialog h2 {
  color: #168a55;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-overlay:is(.is-incorrect, .is-unanswered) .single-practice-result-dialog h2 {
  color: #d43b45;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-message {
  margin: 9px 0 0;
  color: #73809b;
  font-size: 14px;
  line-height: 1.55;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-score {
  display: inline-flex;
  margin: 10px 0 0;
  padding: 5px 10px;
  border-radius: 999px;
  color: #946b0a;
  background: #fff5d6;
  font-size: 13px;
  font-weight: 800;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-dismiss-hint {
  margin: 18px 0 0;
  color: #9aa4b8;
  font-size: 12px;
  font-weight: 650;
}

@media (max-width: 760px) {
  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-overlay {
    place-items: center;
    padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .wide-stage {
    height: 100svh;
    padding: 0 12px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .wide-stage[data-screen="exam"] .wide-shell {
    height: 100svh;
    padding: 0 !important;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-main {
    padding: 0 0 10px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar {
    margin: 10px 0 12px;
    padding: 14px;
    border-radius: 19px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .toolbar-left {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .toolbar-brand {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 15px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] :is(#exam-prev-button, #exam-next-button) {
    width: 100%;
    min-width: 0;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-return-button {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    height: 40px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .info-card-stack {
    gap: 12px;
    padding-bottom: 4px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] :is(
    .exam-card,
    .info-main-card-frame,
    .info-action-card-frame,
    .q1-question-card,
    .q1-reference-card,
    .q1-answer-card,
    .select-page-shell,
    .capture-page-wrap
  ) {
    border-radius: 19px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-dialog {
    width: min(326px, calc(100vw - 44px));
    padding: 14px 16px 15px;
    border: 0;
    border-radius: 24px;
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 16px 44px rgba(22, 40, 92, 0.18);
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-orbit {
    width: 116px;
    height: 102px;
    margin-top: -3px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-mascot {
    width: 104px;
    height: 104px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-dialog h2 {
    font-size: 25px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-kicker {
    margin-top: 0;
    font-size: 10px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-message {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.45;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-dismiss-hint {
    display: none;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-continue {
    display: flex;
    min-height: 42px;
    margin-top: 13px;
    padding: 0 13px 0 16px;
    align-items: center;
    justify-content: space-between;
    color: #315df6;
    border: 1px solid rgba(49, 93, 246, 0.16);
    border-radius: 14px;
    background: #f2f6ff;
    font-size: 13px;
    font-weight: 800;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-continue b {
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-active-screen="exam"][data-activity-mode="single-practice"] :is(
    .single-practice-result-overlay,
    .single-practice-result-dialog,
    .single-practice-result-mascot,
    .single-practice-result-spark
  ) {
    animation: none !important;
  }
}

/* Formal Grade 5 mock exam UI pilot. Question structure and scoring stay untouched. */
body[data-active-screen="theme"] {
  background: #f5f7fd;
}

body[data-active-screen="theme"] .narrow-stage[data-screen="theme"] {
  min-height: 100vh;
  padding: 32px 24px;
  background:
    radial-gradient(circle at 88% 4%, rgba(128, 200, 255, 0.24), transparent 31%),
    linear-gradient(145deg, #f5f8ff 0%, #eef3ff 100%);
}

body[data-active-screen="theme"] .theme-shell {
  width: min(1280px, 100%);
  min-width: 0;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(43, 60, 100, 0.07);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 58px rgba(45, 67, 128, 0.1);
}

body[data-active-screen="theme"] .entry-header {
  height: auto;
  min-height: 0;
  padding: 30px 34px 8px;
  border: 0;
}

body[data-active-screen="theme"] .entry-brand {
  color: #315df6;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

body[data-active-screen="theme"] .entry-title-band {
  padding: 0 34px;
  border: 0;
}

body[data-active-screen="theme"] .entry-page-title {
  color: #16213d;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 850;
  letter-spacing: -0.04em;
}

body[data-active-screen="theme"] .theme-panel {
  padding: 15px 34px 34px;
}

body[data-active-screen="theme"] .theme-copy {
  max-width: 680px;
  color: #76839e;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.65;
}

body[data-active-screen="theme"] .theme-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

body[data-active-screen="theme"] .theme-option {
  width: auto;
  min-width: 0;
  min-height: 210px;
  padding: 12px;
  align-items: stretch;
  border: 2px solid transparent;
  border-radius: 20px;
  background: #f7f9fe;
  box-shadow: inset 0 0 0 1px rgba(43, 60, 100, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body[data-active-screen="theme"] .theme-option:hover {
  transform: translateY(-2px);
}

body[data-active-screen="theme"] .theme-option.selected {
  border-color: #315df6;
  background: #f7f9fe;
  box-shadow: 0 12px 28px rgba(49, 93, 246, 0.13);
}

body[data-active-screen="theme"] .theme-preview {
  width: 100%;
  height: 118px;
  padding: 13px;
  border: 1px solid rgba(43, 60, 100, 0.09);
  border-radius: 15px;
  background: var(--preview-surface);
  overflow: hidden;
}

body[data-active-screen="theme"] .theme-preview-sheet {
  width: 100%;
  height: 100%;
  padding: 16px 14px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid rgba(43, 60, 100, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.42);
}

body[data-active-screen="theme"] .theme-preview-sheet i {
  height: 2px;
  display: block;
  border-radius: 999px;
  background: rgba(35, 48, 78, 0.3);
}

body[data-active-screen="theme"] .theme-option-copy {
  margin-top: 12px;
  padding-right: 32px;
  display: grid;
  gap: 3px;
}

body[data-active-screen="theme"] .theme-option-copy strong {
  color: #16213d;
  font-size: 17px;
}

body[data-active-screen="theme"] .theme-option-copy small {
  color: #8d99b0;
  font-size: 12px;
  font-weight: 650;
}

body[data-active-screen="theme"] .theme-radio-mark {
  position: absolute;
  right: 15px;
  bottom: 17px;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 2px solid #cbd4e5;
  display: grid;
  place-items: center;
}

body[data-active-screen="theme"] .theme-option.selected .theme-radio-mark {
  border-color: #315df6;
  background: #315df6;
}

body[data-active-screen="theme"] .theme-option.selected .theme-radio-mark::after {
  inset: auto;
  width: 8px;
  height: 5px;
  border: 0;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  border-radius: 0;
  background: transparent;
  transform: translateY(-1px) rotate(-45deg);
}

body[data-active-screen="theme"] .theme-actions {
  margin-top: 24px;
  justify-content: flex-end;
}

body[data-active-screen="theme"] .theme-continue-button {
  min-width: 180px;
  min-height: 50px;
  border: 0;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #4773ff, #315df6);
  box-shadow: 0 12px 25px rgba(49, 93, 246, 0.23);
  font-size: 16px;
  font-weight: 800;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] {
  --stage-bg: #f4f7ff;
  background: #f4f7ff;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .mock-app {
  background:
    radial-gradient(circle at 88% 2%, rgba(121, 197, 255, 0.2), transparent 30%),
    linear-gradient(155deg, #f6f9ff 0%, #f1f4fc 100%);
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .wide-stage {
  height: 100vh;
  padding: 20px 24px;
  background: transparent !important;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .wide-shell {
  width: min(1280px, 100%);
  max-width: 100%;
  min-width: 0;
  height: calc(100vh - 40px);
  margin: 0 auto;
  padding: 0;
  background: transparent !important;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .exam-toolbar {
  flex: 0 0 auto;
  padding: 14px 18px;
  border: 1px solid rgba(43, 60, 100, 0.07);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 34px rgba(45, 67, 128, 0.08);
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] :is(.toolbar-left, .toolbar-right) {
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .toolbar-brand {
  margin-right: 10px;
  color: #16213d;
  font-size: 15px;
  font-weight: 800;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .toolbar-button {
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(49, 93, 246, 0.12);
  border-radius: 12px;
  color: #315df6;
  background: #f1f5ff;
  box-shadow: none;
  font-size: 13px;
  font-weight: 750;
}

body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-shell="unified-question"] :is(
  [data-action="open-nav"],
  [data-action="restart-flow"]
) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] #exam-next-button:not(:disabled),
body[data-active-screen="instructions"][data-activity-mode="exam"] [data-action="go-exam-start"] {
  border-color: transparent;
  color: #ffffff;
  background: linear-gradient(135deg, #4773ff, #315df6);
  box-shadow: 0 8px 18px rgba(49, 93, 246, 0.2);
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .end-button {
  color: #e14d5a;
  border-color: rgba(225, 77, 90, 0.12);
  background: #fff3f4;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .timer-pill {
  min-width: 82px;
  height: 40px;
  border-radius: 12px;
  background: #16213d;
  font-size: 13px;
  letter-spacing: 0.04em;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .exam-main {
  gap: 16px;
  padding: 16px 4px 14px;
  background: transparent !important;
  scrollbar-color: rgba(49, 93, 246, 0.22) transparent;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .exam-main::-webkit-scrollbar-thumb {
  border-color: transparent;
  background: rgba(49, 93, 246, 0.2);
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .exam-main :is(
  .exam-card,
  .info-frame,
  .info-main-card-frame,
  .info-action-card-frame,
  .q1-question-card,
  .q1-reference-card,
  .q1-answer-card,
  .select-page-shell,
  .capture-page-wrap
) {
  border-color: rgba(43, 60, 100, 0.09);
  border-radius: 22px;
  background-color: var(--test-surface) !important;
  box-shadow: 0 12px 34px rgba(45, 67, 128, 0.08);
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .exam-main :is(
  .card-content,
  .info-main-card-content,
  .info-main-card-body,
  .info-action-card-body,
  .q1-question-card-body,
  .q1-reference-card-body,
  .q1-answer-card-body,
  .q1-generated-notation-wrap,
  .q1-card-stack
) {
  background-color: var(--test-surface) !important;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] :is(
  .answer-submit,
  .q1-answer-button,
  [data-action="submit-current-page"],
  .info-main-continue
) {
  color: #ffffff;
  border-color: transparent !important;
  border-radius: 14px;
  background: linear-gradient(135deg, #4773ff, #315df6);
  box-shadow: 0 10px 22px rgba(49, 93, 246, 0.2);
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .exam-bottom-row {
  gap: 12px;
  padding: 12px 0 0;
  background: transparent;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .paper-nav {
  min-height: 48px;
  border: 1px solid rgba(43, 60, 100, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 28px rgba(45, 67, 128, 0.07);
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] :is(.paper-item, .paper-nav-arrow) {
  color: #6f7d98;
  border-color: rgba(43, 60, 100, 0.07);
  background: transparent;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .paper-item.active {
  color: #ffffff;
  background: #315df6;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .bottom-actions-group {
  gap: 8px;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .bottom-action {
  min-width: 92px;
  height: 48px;
  border: 1px solid rgba(49, 93, 246, 0.12);
  border-radius: 14px;
  color: #315df6;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 28px rgba(45, 67, 128, 0.07);
  font-weight: 750;
}

@media (max-width: 900px) {
  body[data-active-screen="theme"] .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .exam-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] :is(.toolbar-left, .toolbar-right) {
    width: 100%;
  }
}

/* Phone theme selection shares the landing page canvas and action sizes. */
body[data-active-screen="theme"][data-theme-layout="mobile"] {
  color: var(--xiyue-ink);
  background: #fff;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .narrow-stage[data-screen="theme"] {
  min-height: 100svh;
  padding: 40px max(20px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: linear-gradient(180deg, #f5f8ff 0, #fff 360px);
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-shell {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 1280px;
  min-height: calc(100svh - 40px - max(32px, env(safe-area-inset-bottom)));
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  margin-inline: auto;
  gap: 20px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] :is(.entry-header, .theme-actions) {
  display: none;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .entry-title-band {
  position: static;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .entry-page-title {
  margin: 0;
  color: var(--xiyue-ink);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -.03em;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-panel {
  display: grid;
  min-height: 0;
  height: auto;
  padding: 0;
  gap: 20px;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-copy {
  margin: 0;
  color: var(--xiyue-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-grid {
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-option {
  width: auto;
  min-width: 0;
  min-height: 158px;
  height: auto;
  align-items: stretch;
  padding: 12px;
  border: 2px solid #e3e9f3;
  border-radius: 18px;
  background: var(--preview-surface);
  box-shadow: none;
  transform: none;
  transition: border-color .16s ease;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-option.selected {
  border-color: #315df6;
  background: var(--preview-surface);
  box-shadow: none;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-preview {
  width: 100%;
  height: 84px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-preview-sheet {
  padding: 14px 10px;
  gap: 7px;
  border: 1px solid rgba(43, 60, 100, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .42);
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-option-copy {
  margin-top: 10px;
  padding-right: 24px;
  gap: 3px;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-option-copy strong {
  color: #46516a;
  font-size: 15px;
  line-height: 1.35;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-option-copy small {
  color: #68758c;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-radio-mark {
  right: 12px;
  bottom: 14px;
  width: 21px;
  height: 21px;
}
body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-mobile-actions {
  display: grid;
  align-content: end;
  padding-top: 28px;
  gap: 12px;
}
@media (max-width: 760px) and (max-height: 700px) and (hover: none) and (pointer: coarse) {
  body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-shell { gap: 12px; }
  body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-panel { gap: 16px; }
  body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-option { min-height: 142px; padding: 10px; }
  body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-preview { height: 70px; }
  body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-option-copy { margin-top: 8px; }
  body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-mobile-actions { padding-top: 18px; }
}
html[data-phone-landscape-desktop="true"] body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-shell {
  grid-template-rows: auto 1fr auto;
  gap: 24px;
}
html[data-phone-landscape-desktop="true"] body[data-active-screen="theme"][data-theme-layout="mobile"] .entry-page-title { font-size: 34px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-panel { align-content: start; gap: 16px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-copy { font-size: 20px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-option { min-height: 184px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-preview { height: 100px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-option-copy { padding-right: 30px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-option-copy strong { font-size: 20px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-option-copy small { font-size: 16px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-mobile-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-phone-landscape-desktop="true"] body[data-active-screen="theme"][data-theme-layout="mobile"] .theme-mobile-action { min-height: 68px; font-size: 22px; }

@media (max-width: 760px) {
  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .narrow-stage[data-screen="theme"] {
    min-height: 100svh;
    padding: 16px 12px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-shell {
    min-height: calc(100svh - 32px);
    border-radius: 23px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .entry-header {
    padding: 24px 20px 7px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .entry-title-band {
    padding-inline: 20px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .entry-page-title {
    font-size: 30px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-panel {
    padding: 13px 20px 24px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-grid {
    margin-top: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-option {
    min-height: 174px;
    padding: 9px;
    border-radius: 17px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-preview {
    height: 92px;
    padding: 9px;
    border-radius: 12px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-preview-sheet {
    padding: 11px 9px;
    gap: 6px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-option-copy {
    margin-top: 9px;
    padding-right: 24px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-option-copy strong {
    font-size: 15px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-option-copy small {
    font-size: 11px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-radio-mark {
    right: 12px;
    bottom: 14px;
    width: 21px;
    height: 21px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-actions {
    margin-top: 18px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-continue-button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .wide-stage,
  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-shell="unified-question"] .wide-stage[data-screen="exam"] {
    height: 100dvh;
    padding: 0;
    background: transparent !important;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .wide-shell,
  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-shell="unified-question"] .wide-stage[data-screen="exam"] .wide-shell {
    height: 100dvh;
    padding: 9px 10px 10px;
    background: transparent !important;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .exam-toolbar {
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(43, 60, 100, 0.06);
    border-radius: 18px;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .toolbar-left {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .toolbar-brand {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    font-size: 14px;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .toolbar-left .toolbar-button {
    width: 100%;
    height: 40px;
    padding-inline: 8px;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-shell="unified-question"] [data-action="open-nav"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"] :is(
    [data-action="open-nav"],
    [data-action="restart-flow"],
    [data-action="go-theme"]
  ),
  body[data-active-screen="instructions"][data-activity-mode="exam"] [data-action="go-theme"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .toolbar-right {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .toolbar-right::-webkit-scrollbar {
    display: none;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .toolbar-right > * {
    flex: 0 0 auto;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .timer-pill {
    order: -1;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .exam-main {
    gap: 12px;
    padding: 12px 2px;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .exam-main :is(
    .exam-card,
    .info-frame,
    .info-main-card-frame,
    .info-action-card-frame,
    .q1-question-card,
    .q1-reference-card,
    .q1-answer-card,
    .select-page-shell,
    .capture-page-wrap
  ) {
    border-radius: 18px;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .exam-bottom-row {
    gap: 8px;
    padding-top: 8px;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .paper-nav {
    min-height: 46px;
    border-radius: 14px;
  }

  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .bottom-action {
    height: 44px;
    border-radius: 13px;
  }
}

/* Mock exam UI pilot refinements: stable shell, menu clearance and themed confirms. */
body[data-active-screen="exam"][data-activity-mode="exam"] [data-action="restart-flow"] {
  display: none !important;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .timer-pill {
  color: #315df6;
  border: 1px solid rgba(49, 93, 246, 0.14);
  background: linear-gradient(135deg, #f1f6ff 0%, #dceaff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

body[data-active-screen="instructions"][data-activity-mode="exam"] .wide-stage[data-screen="instructions"],
body[data-active-screen="exam"][data-activity-mode="exam"] .wide-stage[data-screen="exam"] {
  height: 100vh !important;
  padding: 20px 24px !important;
  background: transparent !important;
}

body[data-active-screen="instructions"][data-activity-mode="exam"] .wide-stage[data-screen="instructions"] .wide-shell,
body[data-active-screen="exam"][data-activity-mode="exam"] .wide-stage[data-screen="exam"] .wide-shell {
  width: min(1280px, 100%) !important;
  height: calc(100vh - 40px) !important;
  margin-inline: auto !important;
  padding: 0 !important;
  background: transparent !important;
}

.exam-confirm-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(19, 29, 54, 0.58);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.exam-confirm-dialog {
  position: relative;
  width: min(440px, 100%);
  padding: 34px 32px 30px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 74px rgba(19, 29, 54, 0.28);
  text-align: center;
}

.exam-confirm-dialog-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #8d99b0;
  background: #f2f5fb;
  font-size: 24px;
  line-height: 1;
}

.exam-confirm-dialog-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #315df6;
  background: linear-gradient(145deg, #edf4ff, #dfeaff);
  font-size: 30px;
  font-weight: 800;
}

.exam-confirm-dialog h2 {
  margin: 0;
  color: #16213d;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.exam-confirm-dialog p {
  margin: 14px 0 0;
  color: #76839e;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.7;
}

/* Time-limit prompt shown when the two-hour exam countdown reaches zero. */
.exam-time-up-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(19, 29, 54, 0.58);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.exam-time-up-dialog {
  width: min(440px, 100%);
  padding: 30px 32px 32px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 30px 78px rgba(19, 29, 54, 0.3);
  text-align: center;
}

.exam-time-up-dialog-art {
  position: relative;
  width: 190px;
  height: 138px;
  margin: -8px auto 10px;
}

.exam-time-up-dialog-art img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 138px;
  height: 138px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 16px 24px rgba(49, 93, 246, 0.2));
}

.exam-time-up-dialog-note,
.exam-time-up-dialog-spark {
  position: absolute;
  z-index: 1;
  font-weight: 900;
}

.exam-time-up-dialog-note-one {
  left: 3px;
  top: 46px;
  color: #8367df;
  font-size: 26px;
}

.exam-time-up-dialog-note-two {
  right: 0;
  bottom: 17px;
  color: #315df6;
  font-size: 29px;
}

.exam-time-up-dialog-spark {
  right: 21px;
  top: 8px;
  color: #20ba92;
  font-size: 26px;
}

.exam-time-up-dialog h2 {
  margin: 0;
  color: #16213d;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.exam-time-up-dialog footer {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.exam-time-up-dialog button {
  width: 100%;
  min-width: 0;
  height: 50px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 850;
}

.exam-time-up-continue-button {
  border: 1px solid rgba(49, 93, 246, 0.16);
  color: #315df6;
  background: #eef3ff;
}

.exam-time-up-end-button {
  border: 1px solid rgba(229, 82, 91, 0.18);
  color: #ffffff;
  background: linear-gradient(135deg, #ff6670 0%, #ea4b58 100%);
  box-shadow: 0 10px 22px rgba(229, 82, 91, 0.18);
}

/* Keep the destructive end-test confirmation consistent with the mock-exam shell. */
.end-test-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(19, 29, 54, 0.58);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.end-test-dialog {
  position: relative;
  width: min(440px, 100%);
  min-width: 0;
  max-height: calc(100vh - 48px);
  padding: 34px 32px 30px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 74px rgba(19, 29, 54, 0.28);
  text-align: center;
}

body[data-locale="en-GB"] .end-test-dialog {
  min-width: 349.890625px;
}

.end-test-dialog-header {
  min-height: 0;
  padding: 0;
  border: 0;
  display: block;
}

.end-test-dialog-header::before {
  content: none;
  display: none;
}

.end-test-dialog-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #e5525b;
  background: linear-gradient(145deg, #fff3f4, #ffe2e5);
  font-size: 30px;
  font-weight: 850;
}

.end-test-dialog-state-symbol {
  grid-area: 1 / 1;
}

.end-test-dialog-state-mascot {
  grid-area: 1 / 1;
  width: 76px;
  height: 76px;
  display: none;
  object-fit: contain;
}

.end-test-dialog-state-note,
.end-test-dialog-state-spark {
  position: absolute;
  z-index: 1;
  display: none;
  font-weight: 900;
}

.end-test-dialog-header h2 {
  margin: 0;
  color: #16213d;
  font-size: 26px;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.end-test-dialog-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #8d99b0;
  background: #f2f5fb;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.end-test-dialog-body {
  padding: 0;
}

.end-test-dialog-copy {
  margin: 14px 0 0;
  color: #76839e;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.7;
}

.end-test-unanswered-alert {
  margin: 18px 0 0;
  padding: 13px 15px;
  border: 1px solid rgba(229, 82, 91, 0.14);
  border-radius: 14px;
  background: #fff1f2;
  color: #cf424d;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
}

.end-test-dialog-footer {
  min-height: 0;
  margin-top: 24px;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  background: transparent;
}

.end-test-confirm-button,
.end-test-cancel-button {
  width: 100%;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
}

.end-test-dialog[data-save-state="saving"] .end-test-dialog-state-icon {
  position: relative;
  width: 174px;
  height: 126px;
  margin: -6px auto 12px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.end-test-dialog[data-save-state="saving"] .end-test-dialog-state-symbol {
  display: none;
}

.end-test-dialog[data-save-state="saving"] .end-test-dialog-state-mascot {
  display: block;
  width: 126px;
  height: 126px;
  filter: drop-shadow(0 14px 22px rgba(49, 93, 246, 0.18));
}

.end-test-dialog[data-save-state="saving"] :is(
  .end-test-dialog-state-note,
  .end-test-dialog-state-spark
) {
  display: block;
}

.end-test-dialog[data-save-state="saving"] .end-test-dialog-state-note-one {
  left: 2px;
  top: 42px;
  color: #8367df;
  font-size: 25px;
}

.end-test-dialog[data-save-state="saving"] .end-test-dialog-state-note-two {
  right: 0;
  bottom: 17px;
  color: #315df6;
  font-size: 28px;
}

.end-test-dialog[data-save-state="saving"] .end-test-dialog-state-spark {
  right: 20px;
  top: 8px;
  color: #20ba92;
  font-size: 25px;
}

.end-test-dialog :is(button:disabled, button[aria-disabled="true"]) {
  opacity: .56;
  cursor: wait;
  pointer-events: none;
}

.end-test-confirm-button {
  border: 1px solid rgba(229, 82, 91, 0.18);
  color: #ffffff;
  background: linear-gradient(135deg, #ff6670 0%, #ea4b58 100%);
  box-shadow: 0 10px 22px rgba(229, 82, 91, 0.18);
}

.end-test-cancel-button {
  border: 1px solid rgba(49, 93, 246, 0.14);
  color: #315df6;
  background: #eef3ff;
  box-shadow: none;
}

/* Official-style item navigation, adapted to the current blue/white UI. */
.exam-navigation-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  padding: 28px;
  display: grid;
  place-items: center;
  background: rgba(19, 29, 54, 0.58);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.exam-navigation-dialog {
  width: min(1060px, 100%);
  max-height: calc(100vh - 56px);
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(247, 250, 255, 0.99);
  box-shadow: 0 30px 90px rgba(19, 29, 54, 0.32);
}

.exam-navigation-dialog-header {
  position: relative;
  padding: 2px 52px 20px 2px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.exam-navigation-dialog-eyebrow {
  color: #315df6;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.exam-navigation-dialog-header h2 {
  margin: 5px 0 0;
  color: #16213d;
  font-size: 28px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.exam-navigation-dialog-header p {
  margin: 7px 0 0;
  color: #7d89a2;
  font-size: 13px;
  font-weight: 650;
}

.exam-navigation-dialog-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #8d99b0;
  background: #eaf0fb;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
}

.exam-navigation-dialog-content {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 14px;
}

.exam-navigation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.exam-navigation-summary > span {
  min-height: 70px;
  padding: 12px 15px;
  border: 1px solid rgba(49, 93, 246, 0.08);
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(45, 67, 128, 0.055);
}

.exam-navigation-summary strong {
  color: #16213d;
  font-size: 25px;
  font-weight: 850;
}

.exam-navigation-summary small {
  color: #8793aa;
  font-size: 12px;
  font-weight: 750;
}

.exam-navigation-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  color: #7c88a0;
  font-size: 12px;
  font-weight: 700;
}

.exam-navigation-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.exam-navigation-legend i,
.exam-navigation-item-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #c5cede;
}

.exam-navigation-legend .is-current {
  background: #315df6;
}

.exam-navigation-legend .is-answered,
.exam-navigation-row.is-answered .exam-navigation-item-status i {
  background: #29bd8b;
}

.exam-navigation-legend .is-unanswered,
.exam-navigation-row.is-unanswered .exam-navigation-item-status i {
  background: #c5cede;
}

.exam-navigation-legend .is-marked {
  background: #8b6ae7;
}

.exam-navigation-table {
  min-height: 0;
  border: 1px solid rgba(49, 93, 246, 0.09);
  border-radius: 19px;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.exam-navigation-table-head {
  min-height: 42px;
  padding: 0 10px 0 14px;
  display: grid;
  grid-template-columns: 94px 112px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 8px;
  color: #929db2;
  background: #f5f8fe;
  font-size: 11px;
  font-weight: 800;
}

.exam-navigation-table-head span:last-child {
  text-align: center;
}

.exam-navigation-list {
  min-height: 180px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #cbd7ed transparent;
}

.exam-navigation-row {
  min-height: 58px;
  padding: 0 10px 0 0;
  border-bottom: 1px solid #eef2f8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  align-items: stretch;
  gap: 6px;
  background: #ffffff;
}

.exam-navigation-row:last-child {
  border-bottom: 0;
}

.exam-navigation-row.is-current {
  background: linear-gradient(90deg, #edf3ff 0%, #f4f8ff 100%);
  box-shadow: inset 4px 0 0 #315df6;
}

.exam-navigation-row-main {
  min-width: 0;
  padding: 8px 0 8px 14px;
  border: 0;
  display: grid;
  grid-template-columns: 24px 62px 112px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.exam-navigation-row-main:hover {
  background: rgba(49, 93, 246, 0.045);
}

.exam-navigation-current-indicator {
  color: #315df6;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.exam-navigation-item-number {
  color: #16213d;
  font-size: 14px;
  font-weight: 850;
}

.exam-navigation-item-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #78859d;
  font-size: 12px;
  font-weight: 750;
}

.exam-navigation-item-copy {
  min-width: 0;
  overflow: hidden;
  color: #68758e;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-navigation-mark-button {
  width: 38px;
  height: 38px;
  margin: auto;
  padding: 9px;
  border: 1px solid #dce4f2;
  border-radius: 12px;
  color: #a5b0c3;
  background: #f8faff;
}

.exam-navigation-mark-button svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exam-navigation-mark-button.is-active {
  border-color: rgba(139, 106, 231, 0.18);
  color: #7554d8;
  background: #f0eaff;
}

.exam-navigation-dialog-footer {
  padding-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.exam-navigation-dialog-done {
  width: 124px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #4773ff, #315df6);
  box-shadow: 0 10px 22px rgba(49, 93, 246, 0.2);
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .exam-navigation-dialog-overlay {
    padding: 12px;
  }

  .exam-navigation-dialog {
    max-height: calc(100dvh - 24px);
    padding: 20px 14px 16px;
    border-radius: 24px;
  }

  .exam-navigation-dialog-header {
    padding: 0 44px 16px 2px;
  }

  .exam-navigation-dialog-header h2 {
    font-size: 25px;
  }

  .exam-navigation-dialog-header p {
    font-size: 12px;
  }

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

  .exam-navigation-summary > span {
    min-height: 58px;
    padding: 10px 12px;
    border-radius: 15px;
  }

  .exam-navigation-summary strong {
    font-size: 21px;
  }

  .exam-navigation-legend {
    gap: 7px 13px;
    font-size: 11px;
  }

  .exam-navigation-table {
    border-radius: 17px;
  }

  .exam-navigation-table-head {
    display: none;
  }

  .exam-navigation-list {
    min-height: 210px;
  }

  .exam-navigation-row {
    min-height: 68px;
    padding-right: 5px;
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .exam-navigation-row-main {
    padding: 9px 0 9px 10px;
    grid-template-columns: 16px 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 3px 7px;
  }

  .exam-navigation-current-indicator {
    grid-column: 1;
    grid-row: 1 / 3;
    font-size: 20px;
  }

  .exam-navigation-item-number {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 13px;
  }

  .exam-navigation-item-status {
    grid-column: 3;
    grid-row: 1;
    font-size: 11px;
  }

  .exam-navigation-item-copy {
    grid-column: 3;
    grid-row: 2;
    font-size: 11px;
  }

  .exam-navigation-mark-button {
    width: 34px;
    height: 34px;
    padding: 8px;
    border-radius: 11px;
  }

  .exam-navigation-dialog-footer {
    padding-top: 13px;
  }

  .exam-navigation-dialog-done {
    width: 100%;
    height: 46px;
  }

  .end-test-dialog-overlay {
    padding: 18px;
  }

  .exam-time-up-dialog-overlay {
    padding: 18px;
  }

  .exam-time-up-dialog {
    padding: 26px 20px 22px;
    border-radius: 24px;
  }

  .exam-time-up-dialog-art {
    width: 174px;
    height: 126px;
    margin-bottom: 8px;
  }

  .exam-time-up-dialog-art img {
    width: 126px;
    height: 126px;
  }

  .exam-time-up-dialog h2 {
    font-size: 25px;
  }

  .exam-time-up-dialog footer {
    margin-top: 21px;
  }

  .end-test-dialog {
    width: 100%;
    max-height: calc(100vh - 36px);
    padding: 30px 20px 22px;
    border-radius: 24px;
  }

  body[data-locale="en-GB"] .end-test-dialog {
    min-width: 325.890625px;
  }

  .end-test-dialog-header h2 {
    font-size: 24px;
  }

  .end-test-dialog-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .end-test-confirm-button,
  .end-test-cancel-button {
    height: 48px;
    min-height: 48px;
    font-size: 14px;
  }
}

.exam-confirm-dialog footer {
  margin-top: 25px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#app-notice-dialog .exam-confirm-dialog footer {
  display: flex;
  justify-content: center;
}

#app-notice-dialog .exam-confirm-dialog-button {
  width: min(183px, 100%);
}

.exam-confirm-dialog-button {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
}

.exam-confirm-dialog-cancel {
  border: 1px solid rgba(49, 93, 246, 0.14);
  color: #315df6;
  background: #f1f5ff;
}

.exam-confirm-dialog-primary {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #4773ff, #315df6);
  box-shadow: 0 10px 22px rgba(49, 93, 246, 0.22);
}

.new-exam-draft-dialog {
  box-sizing: border-box;
  width: min(500px, 100%);
}

.new-exam-draft-progress {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(49, 93, 246, 0.12);
  border-radius: 14px;
  color: #315df6;
  background: #f4f7ff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.new-exam-draft-error {
  margin-top: 12px !important;
  padding: 10px 12px;
  border-radius: 12px;
  color: #b4233c !important;
  background: #fff1f3;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.55 !important;
}

.new-exam-draft-dialog footer {
  grid-template-columns: 1fr;
}

.new-exam-draft-end {
  border: 1px solid rgba(180, 59, 76, 0.16);
  color: #a8364a;
  background: #fff3f5;
}

.new-exam-draft-dialog[aria-busy="true"] .new-exam-draft-progress {
  color: #64748b;
  background: #f6f7fa;
}

.new-exam-draft-dialog button:disabled {
  cursor: wait;
  opacity: 0.56;
}

.learning-materials-login-gate-dialog {
  box-sizing: border-box;
  width: min(460px, 100%);
}

.learning-materials-login-gate-dialog.is-vip-gate .learning-materials-login-gate-icon {
  color: #8a5cf6;
  background: linear-gradient(145deg, #f2ecff, #e7eefe);
  box-shadow: 0 12px 28px rgba(112, 78, 220, 0.15);
}

.learning-materials-login-gate-dialog.is-vip-gate .learning-materials-login-gate-kicker {
  color: #7657d6;
}

.learning-materials-login-gate-dialog.is-trial-gate .learning-materials-login-gate-icon {
  color: #257e72;
  background: linear-gradient(145deg, #e6faf5, #e9f4ff);
  box-shadow: 0 12px 28px rgba(37, 126, 114, 0.13);
}

.learning-materials-login-gate-dialog.is-trial-gate .learning-materials-login-gate-kicker {
  color: #257e72;
}

.learning-materials-login-gate-dialog footer.is-single-action {
  grid-template-columns: 1fr;
}

.learning-materials-login-gate-dialog button[hidden] {
  display: none;
}

.learning-materials-login-gate-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exam-confirm-dialog .learning-materials-login-gate-kicker {
  margin: 0 0 8px;
  color: #95a0b6;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: 0.16em;
}

.learning-materials-login-gate-later {
  margin-top: 17px;
  padding: 4px 10px;
  border: 0;
  color: #7d89a2;
  background: transparent;
  font-size: 13px;
  font-weight: 750;
}

.learning-materials-login-gate-later:hover {
  color: #315df6;
}

@media (max-width: 760px) {
  body[data-active-screen="instructions"][data-activity-mode="exam"] .wide-stage[data-screen="instructions"],
  body[data-active-screen="exam"][data-activity-mode="exam"] .wide-stage[data-screen="exam"] {
    height: 100dvh !important;
    padding: 0 !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .wide-stage[data-screen="instructions"] .wide-shell,
  body[data-active-screen="exam"][data-activity-mode="exam"] .wide-stage[data-screen="exam"] .wide-shell {
    height: 100dvh !important;
    padding: 9px 10px 10px !important;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"] .exam-toolbar .toolbar-right {
    width: 100%;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 76px;
    gap: 6px;
    overflow: visible;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"] .exam-toolbar .toolbar-right > * {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 40px;
    padding-inline: 5px;
    font-size: 12px;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"] .exam-toolbar .timer-pill {
    order: initial;
  }

  .exam-confirm-dialog-overlay {
    padding: 18px;
    align-items: center;
  }

  .exam-confirm-dialog {
    padding: 30px 20px 22px;
    border-radius: 24px;
  }

  .exam-confirm-dialog-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 15px;
    border-radius: 18px;
  }

  /* The arrow glyph's font baseline sits visibly low even though its line box
     is centred. Centre the glyph itself inside the return-home tile. */
  #return-home-dialog .exam-confirm-dialog-icon {
    position: relative;
    font-size: 0;
  }

  #return-home-dialog .exam-confirm-dialog-icon::before {
    content: "←";
    position: absolute;
    left: 50%;
    top: 50%;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    transform: translate(-50%, -50%) translateY(-2px);
  }

  .exam-confirm-dialog h2 {
    font-size: 23px;
  }

  .exam-confirm-dialog p {
    font-size: 14px;
  }

  .exam-confirm-dialog footer {
    grid-template-columns: 1fr;
  }

  .new-exam-draft-dialog {
    max-height: calc(100dvh - 36px);
    padding: 26px 20px 20px;
    overflow-y: auto;
  }

  .new-exam-draft-dialog .exam-confirm-dialog-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 13px;
    border-radius: 16px;
    font-size: 26px;
  }

  .new-exam-draft-dialog h2 {
    font-size: 22px;
  }

  .new-exam-draft-dialog > p {
    margin-top: 10px;
    line-height: 1.6;
  }

  .new-exam-draft-progress {
    margin-top: 14px;
  }

  .new-exam-draft-dialog footer {
    margin-top: 16px;
    gap: 8px;
  }

  .new-exam-draft-dialog .exam-confirm-dialog-button {
    min-height: 46px;
  }
}

body[data-active-screen="landing"][data-landing-layout="desktop"] .landing-shell[aria-busy="true"] {
  visibility: hidden;
}

.landing-mobile-only,
.landing-mobile-summary {
  display: none;
}

/* A transparent wrapper keeps the established desktop grid unchanged. */
.landing-paper-intro {
  display: contents;
}

/* These actions stay hidden with their mobile-only parent on desktop. */
.theme-mobile-actions {
  display: none;
}

.landing-mobile-actions {
  gap: 12px;
  padding-top: 28px;
}

.landing-mobile-action,
.theme-mobile-action,
.results-mobile-home-button {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid #d8dfeb;
  border-radius: 12px;
  background: transparent;
  color: var(--xiyue-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.landing-mobile-action-primary,
.theme-mobile-action-primary {
  border-color: #315df6;
  background: #315df6;
  color: #fff;
}

.landing-mobile-action svg,
.theme-mobile-action svg,
.results-mobile-home-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.landing-mobile-action-primary svg,
.theme-mobile-action-primary svg {
  fill: currentColor;
}

.landing-mobile-action-home svg,
.theme-mobile-action-back svg,
.results-mobile-home-button svg {
  fill: none;
  stroke: #315df6;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Mobile exam entry: full-width paper introduction, four rule tiles and
   bottom actions. The mobile presentation scope preserves desktop and narrow mouse layouts. */
  body[data-active-screen="landing"][data-landing-layout="mobile"] {
    color: var(--xiyue-ink);
    background: #fff;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .mock-app {
    background: linear-gradient(180deg, #f5f8ff 0, #fff 360px);
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-stage {
    --landing-mobile-top-space: 40px;
    --landing-mobile-gutter-right: max(20px, env(safe-area-inset-right));
    --landing-mobile-gutter-left: max(20px, env(safe-area-inset-left));
    min-height: 100svh;
    background: transparent;
    /* Keep the page edges within the phone viewport. */
    overflow: hidden;
    padding: var(--landing-mobile-top-space) var(--landing-mobile-gutter-right) max(32px, env(safe-area-inset-bottom)) var(--landing-mobile-gutter-left);
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-shell {
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: 1280px;
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    min-height: calc(100svh - var(--landing-mobile-top-space) - max(32px, env(safe-area-inset-bottom)));
    gap: 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }


  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-title-band {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-column: 1;
    grid-row: 1;
    align-content: center;
    min-height: 168px;
    overflow: visible;
    gap: 9px;
    margin-right: calc(-1 * var(--landing-mobile-gutter-right));
    margin-left: calc(-1 * var(--landing-mobile-gutter-left));
    padding: 22px var(--landing-mobile-gutter-right) 22px var(--landing-mobile-gutter-left);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-page-title {
    --landing-title-base-size: clamp(24px, 6.67vw, 26px);
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 0;
    color: var(--xiyue-ink);
    font-size: var(--landing-title-base-size);
    font-weight: 800;
    line-height: 1.24;
    letter-spacing: -.03em;
    white-space: pre-line;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-page-title[data-title-has-han="true"] {
    font-size: calc(var(--landing-title-base-size) * 1.15);
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-summary {
    display: block;
    margin: 0;
    color: var(--xiyue-muted);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-features-panel {
    position: relative;
    z-index: 1;
    display: block;
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-features {
    display: grid;
    gap: 14px;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-feature {
    display: flex;
    min-width: 0;
    min-height: 128px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 17px 12px;
    border: 1px solid #e0e8ff;
    border-radius: 18px;
    color: #315df6;
    background: #f1f5ff;
    text-align: center;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-feature-edit {
    border-color: #e8dfff;
    color: #9572d9;
    background: #f2ecff;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-feature-pause {
    border-color: #d9f1e9;
    color: #168e88;
    background: #eafaf4;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-feature-navigation {
    border-color: #dceeff;
    color: #3c98d6;
    background: #eaf7ff;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-feature svg {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-feature strong {
    color: #46516a;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.35;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-feature span {
    color: #68758c;
    font-size: 12px;
    line-height: 1.45;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-actions {
    display: grid;
    grid-column: 1;
    grid-row: 3;
    align-content: end;
  }


/* Reuse the gap above the actions on short phones so their position stays
   stable while the paper and rule tiles move down. */
@media (max-width: 760px) and (max-height: 700px) and (hover: none) and (pointer: coarse) {
  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-shell {
    gap: 12px;
  }

  body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-actions {
    padding-top: 18px;
  }
}

/* Phone landscape retains the existing 1280px viewport and the same mobile content. */
html[data-phone-landscape-desktop="true"] body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-shell {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 28px;
}
html[data-phone-landscape-desktop="true"] body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-title-band {
  align-self: center;
  margin-right: 0;
  min-height: 230px;
}
html[data-phone-landscape-desktop="true"] body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-page-title {
  --landing-title-base-size: 34px;
  max-width: 100%;
}
html[data-phone-landscape-desktop="true"] body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-summary {
  font-size: 22px;
}
html[data-phone-landscape-desktop="true"] body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-features-panel {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}
html[data-phone-landscape-desktop="true"] body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-actions {
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html[data-phone-landscape-desktop="true"] body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-action {
  min-height: 68px;
  font-size: 22px;
}
html[data-phone-landscape-desktop="true"] body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-feature strong {
  font-size: 20px;
}
html[data-phone-landscape-desktop="true"] body[data-active-screen="landing"][data-landing-layout="mobile"] .landing-mobile-feature span {
  font-size: 17px;
}

/* Every INFO surface shares the exact same exam toolbar as question pages. */
body[data-active-screen="instructions"][data-activity-mode="exam"] [data-action="open-nav"],
body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] [data-action="open-nav"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] [data-action="restart-flow"] {
  display: none !important;
}

@media (max-width: 760px) {
  body[data-active-screen="instructions"][data-activity-mode="exam"] .wide-stage[data-screen="instructions"] {
    height: 100dvh !important;
    padding: 0 !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .wide-stage[data-screen="instructions"] .wide-shell {
    width: 100% !important;
    height: 100dvh !important;
    padding: 9px 10px 10px !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-toolbar {
    width: 100% !important;
    min-height: 0 !important;
    padding: 12px !important;
    border-radius: 18px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-toolbar-left {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-toolbar .toolbar-brand {
    grid-column: 1 / -1 !important;
    margin: 0 0 2px !important;
    font-size: 14px !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-toolbar-left .toolbar-button {
    display: inline-flex !important;
    width: 100% !important;
    height: 40px !important;
    padding-inline: 8px !important;
    align-items: center;
    justify-content: center;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-toolbar-right {
    width: 100% !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 76px !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-toolbar-right .toolbar-button,
  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-timer-pill {
    display: inline-flex !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    align-items: center;
    justify-content: center;
    order: initial !important;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .wide-stage[data-screen="exam"] {
    height: 100dvh !important;
    padding: 0 !important;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .wide-stage[data-screen="exam"] .wide-shell {
    width: 100% !important;
    height: 100dvh !important;
    padding: 9px 10px 10px !important;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .exam-toolbar {
    width: 100% !important;
    min-height: 0 !important;
    padding: 12px !important;
    border-radius: 18px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .toolbar-left {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .toolbar-brand {
    grid-column: 1 / -1 !important;
    margin: 0 0 2px !important;
    font-size: 14px !important;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .toolbar-left .toolbar-button {
    width: 100% !important;
    height: 40px !important;
    padding-inline: 8px !important;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .toolbar-right {
    width: 100% !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 76px !important;
    overflow: visible !important;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .toolbar-right > * {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] [data-action="go-theme"],
  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] [data-action="return-home-save-draft"],
  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] [data-action="end-test"],
  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .timer-pill {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  /* Keep both INFO toolbars pixel-identical to the regular question toolbar. */
  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-toolbar-right,
  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .toolbar-right {
    gap: 6px !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-toolbar-right > *,
  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .toolbar-right > * {
    height: 40px !important;
    padding-inline: 5px !important;
    font-size: 12px !important;
    order: initial !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] :is(
    [data-action="back-theme"],
    [data-action="go-exam-start"]
  ),
  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] :is(
    #exam-prev-button,
    #exam-next-button
  ) {
    display: block !important;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .toolbar-button {
    border-radius: 12px !important;
    line-height: normal !important;
  }

  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .timer-pill {
    border-radius: 12px !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-toolbar-left .toolbar-button:is(
    [data-action="back-theme"],
    [data-action="go-exam-start"]
  ) {
    display: block !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-toolbar-right :is(
    .toolbar-button,
    .instructions-timer-pill
  ) {
    padding-inline: 5px !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-toolbar-right :is(
    [data-action="return-home-save-draft"],
    [data-action="end-test"]
  ),
  body[data-active-screen="exam"][data-activity-mode="exam"][data-exam-fragment^="Info_"] .toolbar-right :is(
    [data-action="return-home-save-draft"],
    [data-action="end-test"]
  ) {
    display: block !important;
  }
}

/* Results: mascot score reveal followed by a calm blue-and-white detail page. */
body[data-active-screen="results"],
body[data-active-screen="results"] .mock-app {
  background:
    radial-gradient(circle at 88% 0%, rgba(121, 197, 255, 0.2), transparent 32%),
    linear-gradient(155deg, #f6f9ff 0%, #f1f4fc 100%);
}

body[data-active-screen="results"] .results-stage {
  min-height: 100vh;
  padding: 24px;
  overflow: auto;
  color: #16213d;
  background: transparent;
}

body[data-active-screen="results"] .results-page {
  width: min(1280px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 0 0 40px;
  display: grid;
  gap: 18px;
  color: #16213d;
  font-size: 15px;
  line-height: 1.5;
}

body[data-active-screen="results"] .results-header,
body[data-active-screen="results"] .results-summary-grid,
body[data-active-screen="results"] .results-category-section,
body[data-active-screen="results"] .results-practice-guide,
body[data-active-screen="results"] .results-answer-section {
  border: 1px solid rgba(43, 60, 100, 0.07);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 38px rgba(45, 67, 128, 0.08);
}

body[data-active-screen="results"] .results-header {
  min-height: 0;
  padding: 26px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 22px 30px;
}

body[data-active-screen="results"] .results-eyebrow,
body[data-active-screen="results"] .results-section-heading > p {
  margin: 0 0 5px;
  color: #315df6;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

body[data-active-screen="results"] .results-header h1 {
  margin: 0;
  color: #16213d;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 880;
  line-height: 1.15;
  letter-spacing: -0.045em;
}

body[data-active-screen="results"] .results-saved-message {
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  color: #7b879f;
  font-size: 14px;
  font-weight: 650;
}

body[data-active-screen="results"] .results-home-button {
  min-width: 118px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(49, 93, 246, 0.14);
  border-radius: 14px;
  color: #315df6;
  background: #eef3ff;
  font-size: 14px;
  font-weight: 800;
}

body[data-active-screen="results"] .results-meta {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid #edf1f8;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-active-screen="results"] .results-meta div {
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  display: block;
  background: #f6f8fd;
}

body[data-active-screen="results"] .results-meta dt {
  color: #94a0b7;
  font-size: 12px;
  font-weight: 750;
}

body[data-active-screen="results"] .results-meta dd {
  margin: 5px 0 0;
  color: #26324d;
  font-size: 14px;
  font-weight: 800;
}

body[data-active-screen="results"] .results-summary-grid {
  padding: 22px;
  border-bottom: 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
}

body[data-active-screen="results"] .results-score-panel {
  min-height: 226px;
  padding: 26px;
  border-radius: 21px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: #ffffff;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(135deg, #3867f7 0%, #3157dc 100%);
  text-align: left;
}

body[data-active-screen="results"] .results-score-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
}

body[data-active-screen="results"] .results-score-number {
  margin-top: 4px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

body[data-active-screen="results"] .results-score-number strong {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  display: inline;
  color: #ffffff;
  background: transparent;
  box-shadow: none;
  font-size: clamp(58px, 8vw, 84px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.07em;
}

body[data-active-screen="results"] .results-score-number span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 20px;
  font-weight: 800;
}

body[data-active-screen="results"] .results-achievement {
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #315df6;
  background: #ffffff;
  font-size: 13px;
  font-weight: 850;
}

body[data-active-screen="results"] .results-score-panel > .results-score-bar {
  width: 100%;
  height: 9px;
  margin-top: 24px;
  border: 0;
  border-radius: 999px;
  display: block;
  background: rgba(255, 255, 255, 0.22);
}

body[data-active-screen="results"] .results-score-panel > .results-score-bar .results-score-fill {
  z-index: 0;
  background: #ffffff;
}

body[data-active-screen="results"] .results-summary-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-active-screen="results"] .results-summary-copy article {
  min-width: 0;
  padding: 22px 16px;
  border: 1px solid rgba(49, 93, 246, 0.06);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #f1f5ff;
  text-align: center;
}

body[data-active-screen="results"] .results-summary-copy article:nth-child(2) {
  background: #f2ecff;
}

body[data-active-screen="results"] .results-summary-copy article:nth-child(3) {
  background: #eafaf4;
}

body[data-active-screen="results"] .results-summary-copy strong {
  color: #16213d;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 900;
  line-height: 1;
}

body[data-active-screen="results"] .results-summary-copy span {
  color: #7f8ba2;
  font-size: 13px;
  font-weight: 750;
}

body[data-active-screen="results"] .results-category-section,
body[data-active-screen="results"] .results-answer-section {
  padding: 26px 28px;
}

body[data-active-screen="results"] .results-section-heading h2,
body[data-active-screen="results"] .results-category-section h2,
body[data-active-screen="results"] .results-answer-section h2 {
  margin: 0;
  padding: 0;
  color: #16213d;
  font-size: 23px;
  font-weight: 880;
}

body[data-active-screen="results"] .results-section-list {
  width: 100%;
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 22px;
}

body[data-active-screen="results"] .results-section-row {
  min-height: 62px;
  padding: 12px 14px;
  border-radius: 16px;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.2fr);
  gap: 14px;
  background: #f7f9fd;
}

body[data-active-screen="results"] .results-section-name {
  color: #26324d;
  font-size: 14px;
  font-weight: 800;
}

body[data-active-screen="results"] .results-section-score {
  width: 100%;
  height: 28px;
  border: 0;
  border-radius: 999px;
  color: #26324d;
  background: #e9eef8;
}

body[data-active-screen="results"] .results-section-score .results-score-fill {
  background: linear-gradient(90deg, #73a4ff, #315df6);
}

body[data-active-screen="results"] .results-practice-guide {
  margin: 0;
  padding: 26px 28px;
  border-color: rgba(49, 93, 246, 0.08);
  background: rgba(255, 255, 255, 0.97);
}

body[data-active-screen="results"] .results-practice-guide-heading > div > p {
  color: #315df6;
}

body[data-active-screen="results"] .results-practice-guide-heading h2,
body[data-active-screen="results"] .results-practice-card strong {
  color: #16213d;
}

body[data-active-screen="results"] .results-practice-card {
  border-color: rgba(49, 93, 246, 0.08);
  border-radius: 18px;
  background: #f7f9fd;
  box-shadow: none;
}

body[data-active-screen="results"] .results-answer-table-wrap {
  margin-top: 20px;
  border: 1px solid #eaf0f8;
  border-radius: 18px;
  overflow: auto;
}

body[data-active-screen="results"] .results-answer-table {
  min-width: 880px;
}

body[data-active-screen="results"] .results-answer-row {
  background: #f8faff;
  border-color: #ffffff;
}

body[data-active-screen="results"] .results-answer-row:nth-child(odd) {
  background: #ffffff;
}

.results-score-reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(18, 28, 52, 0.58);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.results-score-reveal-dialog {
  width: min(480px, 100%);
  padding: 32px 34px 30px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 34px 90px rgba(18, 28, 52, 0.34);
  text-align: center;
  animation: results-score-reveal-in 460ms cubic-bezier(0.2, 0.9, 0.22, 1.2) both;
}

.results-score-reveal-art {
  position: relative;
  width: 210px;
  height: 174px;
  margin: -8px auto 2px;
}

.results-score-reveal-art img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 160px;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 26px rgba(49, 93, 246, 0.22));
  animation: results-mascot-bounce 900ms 180ms ease both;
}

.results-score-reveal-note,
.results-score-reveal-spark {
  position: absolute;
  z-index: 1;
  font-weight: 900;
  animation: results-note-float 1.6s ease-in-out infinite alternate;
}

.results-score-reveal-note-one {
  left: 6px;
  top: 54px;
  color: #8367df;
  font-size: 28px;
}

.results-score-reveal-note-two {
  right: 2px;
  bottom: 28px;
  color: #315df6;
  font-size: 30px;
  animation-delay: 240ms;
}

.results-score-reveal-spark {
  right: 24px;
  top: 24px;
  color: #20ba92;
  font-size: 27px;
  animation-delay: 420ms;
}

.results-score-reveal-kicker {
  margin: 8px 0 0;
  color: #97a3ba;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.results-score-reveal-score {
  margin-top: 2px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  color: #315df6;
}

.results-score-reveal-score strong {
  font-size: 70px;
  font-weight: 920;
  line-height: 1;
  letter-spacing: -0.07em;
}

.results-score-reveal-score span {
  color: #91a0bb;
  font-size: 22px;
  font-weight: 800;
}

.results-score-reveal-dialog h2 {
  margin: 15px 0 0;
  color: #16213d;
  font-size: 27px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.results-score-reveal-dialog > p:not(.results-score-reveal-kicker) {
  margin: 10px auto 0;
  max-width: 350px;
  color: #7c88a0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.65;
}

.results-score-reveal-dialog button {
  width: 100%;
  height: 52px;
  margin-top: 24px;
  border: 0;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #4773ff, #315df6);
  box-shadow: 0 14px 28px rgba(49, 93, 246, 0.24);
  font-size: 15px;
  font-weight: 850;
}

@keyframes results-score-reveal-in {
  from { opacity: 0; transform: translateY(32px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes results-mascot-bounce {
  0% { opacity: 0; transform: translateX(-50%) translateY(28px) scale(0.82); }
  55% { opacity: 1; transform: translateX(-50%) translateY(-10px) scale(1.06); }
  75% { transform: translateX(-50%) translateY(3px) scale(0.98); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes results-note-float {
  from { transform: translateY(3px) rotate(-5deg); }
  to { transform: translateY(-7px) rotate(5deg); }
}

/* Phone result details: flat canvas, score ring and compact practice rows. */
body[data-active-screen="results"][data-results-layout="mobile"],
body[data-active-screen="results"][data-results-layout="mobile"] .mock-app {
  color: var(--xiyue-ink);
  background: #fff;
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-stage {
  min-height: 100svh;
  padding: 28px max(20px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  color: var(--xiyue-ink);
  background: linear-gradient(180deg, #f5f8ff 0, #fff 360px);
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-page {
  width: 100%;
  max-width: 960px;
  gap: 0;
  padding: 0;
  color: var(--xiyue-ink);
  font-size: 14px;
}
body[data-active-screen="results"][data-results-layout="mobile"] :is(.results-header, .results-category-section, .results-practice-guide) {
  min-width: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-header {
  padding: 0 0 24px;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px 12px;
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-header h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.03em;
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-saved-message {
  margin: 10px 0 0;
  color: var(--xiyue-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-mobile-actions { padding-top: 28px; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-meta {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 0;
  border: 0;
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-meta div {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-meta dt {
  color: var(--xiyue-muted);
  font-size: 11px;
  font-weight: 500;
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-meta dd {
  margin: 4px 0 0;
  color: #46516a;
  font-size: 13px;
  font-weight: 650;
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-mobile-overview {
  display: grid;
  min-width: 0;
  grid-template-columns: 136px minmax(0, 1fr);
  grid-template-areas: "ring details" "achievement .";
  align-items: center;
  gap: 10px 24px;
  padding: 18px 0 30px;
}
.results-mobile-score-ring { grid-area: ring; position: relative; width: 136px; height: 136px; }
.results-mobile-score-ring svg { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke-width: 11px; }
.results-mobile-ring-track { stroke: #e5ecf8; }
.results-mobile-ring-progress { transform: rotate(-90deg); transform-origin: center; stroke: #315df6; stroke-linecap: round; }
.results-mobile-score-ring > strong { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2px; color: #26324d; font-size: 30px; font-weight: 750; letter-spacing: -.03em; }
.results-mobile-achievement { grid-area: achievement; justify-self: center; color: #315df6; font-size: 13px; font-weight: 700; }
.results-mobile-score-details { grid-area: details; display: grid; min-width: 0; gap: 13px; margin: 0; }
.results-mobile-score-details > div { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
.results-mobile-score-details dt { min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.4; }
.results-mobile-score-details dd { flex: 0 0 auto; min-width: 30px; margin: 0; padding: 1px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: 14px; line-height: 1.45; text-align: center; }
.results-mobile-score-details small { font-size: 12px; }
.results-mobile-detail-score { color: #315df6; }
.results-mobile-detail-answered { color: #15968b; }
.results-mobile-detail-unanswered { color: #8792a8; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-category-section {
  padding: 0 0 24px;
  border-bottom: 1px solid #e7edf6;
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-section-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-section-row {
  min-height: 49px;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 42%);
  gap: 16px;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-section-name { color: #46516a; font-size: 14px; font-weight: 650; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-section-score { height: 25px; color: #46516a; background: #edf2fc; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-section-score .results-score-fill { background: #dce6ff; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-score-text { font-size: 13px; text-shadow: none; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-guide { padding: 24px 0 0; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-guide-heading { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 16px; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-guide-heading h2 { color: var(--xiyue-ink); font-size: 20px; font-weight: 800; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-guide-message { color: var(--xiyue-muted); font-size: 14px; font-weight: 500; line-height: 1.7; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-card-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-card {
  display: grid;
  min-height: 82px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title action" "score action";
  align-items: center;
  align-content: center;
  gap: 5px 16px;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid #e7edf6;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  transition: background .16s ease;
}
body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-card strong { grid-area: title; color: #26324d; font-size: 17px; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-card-score { grid-area: score; margin: 0; color: var(--xiyue-muted); font-size: 12px; font-weight: 500; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-card-action { grid-area: action; margin: 0; padding: 0; color: #315df6; font-size: 13px; font-weight: 650; white-space: nowrap; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-card:hover { border-color: #e7edf6; background: transparent; box-shadow: none; transform: none; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-card:active { background: #f3f6ff; }
body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-card:focus-visible { outline: 2px solid #315df6; outline-offset: 3px; box-shadow: none; transform: none; }
@media (max-width: 359px) {
  body[data-active-screen="results"][data-results-layout="mobile"] .results-header { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  body[data-active-screen="results"][data-results-layout="mobile"] .results-mobile-overview { grid-template-columns: 116px minmax(0, 1fr); column-gap: 16px; }
  body[data-active-screen="results"][data-results-layout="mobile"] .results-mobile-score-ring { width: 116px; height: 116px; }
}
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-stage { padding: 28px 24px 40px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-header h1 { font-size: 34px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-mobile-overview { grid-template-columns: 164px minmax(0, 360px); column-gap: 40px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-mobile-score-ring { width: 164px; height: 164px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-section-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-section-name { font-size: 18px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-card-action { font-size: 20px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] :is(.results-saved-message, .results-meta dd, .results-mobile-achievement, .results-mobile-score-details dd) { font-size: 18px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] :is(.results-meta dt, .results-mobile-score-details small) { font-size: 16px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-mobile-home-button { min-height: 68px; font-size: 22px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-mobile-score-details dt { font-size: 20px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-mobile-score-ring > strong { font-size: 36px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-section-row { min-height: 64px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-section-score { height: 32px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-score-text { font-size: 16px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-guide-heading h2 { font-size: 28px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-guide-message { font-size: 20px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-card { min-height: 106px; padding-block: 22px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-card strong { font-size: 24px; }
html[data-phone-landscape-desktop="true"] body[data-active-screen="results"][data-results-layout="mobile"] .results-practice-card-score { font-size: 18px; }

@media (max-width: 760px) {
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-stage {
    min-height: 100svh;
    padding: 12px 12px 28px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-page {
    gap: 12px;
    padding-bottom: 20px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-header,
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-summary-grid,
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-category-section,
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-practice-guide,
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-answer-section {
    border-radius: 20px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-header {
    padding: 21px 18px 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 10px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-header h1 {
    font-size: 26px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-home-button {
    min-width: 0;
    height: 40px;
    padding-inline: 13px;
    font-size: 13px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-meta {
    grid-template-columns: 1fr;
    gap: 5px;
    padding-top: 12px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-meta div {
    padding: 2px 0;
    border-radius: 0;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: baseline;
    gap: 8px;
    background: transparent;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-meta dd {
    margin-top: 0;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-summary-grid {
    padding: 14px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-score-panel {
    min-height: 184px;
    padding: 21px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-score-number strong {
    font-size: 68px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-summary-copy {
    gap: 8px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-summary-copy article {
    padding: 17px 8px;
    border-radius: 16px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-summary-copy strong {
    font-size: 30px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-category-section,
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-practice-guide,
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-answer-section {
    padding: 21px 17px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-section-list {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 16px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-section-row {
    min-height: 58px;
    padding: 10px 12px;
    grid-template-columns: minmax(100px, 0.8fr) minmax(150px, 1.2fr);
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-practice-guide-heading {
    grid-template-columns: 1fr;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-answer-table-wrap {
    margin-top: 16px;
  }

  .results-score-reveal-overlay {
    padding: 18px;
  }

  .results-score-reveal-dialog {
    padding: 24px 22px 22px;
    border-radius: 28px;
  }

  .results-score-reveal-art {
    width: 190px;
    height: 154px;
  }

  .results-score-reveal-art img {
    width: 142px;
  }

  .results-score-reveal-score strong {
    font-size: 60px;
  }

  .results-score-reveal-dialog h2 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .results-score-reveal-dialog,
  .results-score-reveal-art img,
  .results-score-reveal-note,
  .results-score-reveal-spark {
    animation: none !important;
  }
}

/* All full-paper instruction pages must scroll naturally on phones. */
@media (max-width: 760px) {
  body[data-active-screen="instructions"][data-activity-mode="exam"] .wide-stage,
  body[data-active-screen="instructions"][data-activity-mode="exam"] .wide-shell,
  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-toolbar,
  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-main,
  body[data-active-screen="instructions"][data-activity-mode="exam"] .info-main-card-frame,
  body[data-active-screen="instructions"][data-activity-mode="exam"] .info-main-card-content,
  body[data-active-screen="instructions"][data-activity-mode="exam"] .info-main-card-body {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .wide-shell {
    max-width: 100vw !important;
    overflow: hidden;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .instructions-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .info-main-card-frame {
    flex: 0 0 auto;
    height: auto !important;
    max-height: none !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .info-main-card-content,
  body[data-active-screen="instructions"][data-activity-mode="exam"] .info-main-card-body {
    height: auto !important;
    max-height: none !important;
    overflow: visible;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .bullet-copy,
  body[data-active-screen="instructions"][data-activity-mode="exam"] .bullet-copy li {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/*
 * Answer-page card shell cleanup.
 * The legacy structural wrappers must not paint another square surface behind
 * the new rounded question, answer and INFO cards.
 */
body[data-active-screen="exam"][data-activity-mode] .exam-main :is(
  .info-card-stack,
  .q1-card-stack,
  .select-capture-wrap
) {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Keep the real select-page card rounded while its outer capture shell stays clear. */
body[data-active-screen="exam"][data-activity-mode] .exam-main .select-capture-wrap {
  border-radius: 22px;
}

/*
 * Select and drag questions deliberately keep overflow visible for their
 * menus and draggable notation. Round the painted inner surface instead of
 * clipping it, so the established interaction layers remain untouched.
 */
body[data-active-screen="exam"][data-activity-mode] .exam-main .q1-answer-card:is(
  .q7-select-answer-card,
  .select-question-bank-card,
  .drag-answer-card
) {
  border-radius: 22px !important;
}

body[data-active-screen="exam"][data-activity-mode] .exam-main .q1-answer-card:is(
  .q7-select-answer-card,
  .select-question-bank-card,
  .drag-answer-card
) > .q1-answer-card-body {
  border-radius: inherit !important;
}

@media (max-width: 760px) {
  body[data-active-screen="exam"][data-activity-mode] .exam-main .select-capture-wrap {
    border-radius: 18px;
  }

  body[data-active-screen="exam"][data-activity-mode] .exam-main .q1-answer-card:is(
    .q7-select-answer-card,
    .select-question-bank-card,
    .drag-answer-card
  ) {
    border-radius: 18px !important;
  }
}

/*
 * Full-paper bottom bar status colours.
 *
 * Legacy INFO and question-shell selectors in styles.css are intentionally
 * very specific because they control sizing and overflow. Keep those layout
 * rules intact, but make every full-paper page use the same visual treatment
 * as the instruction page. The navigation renderer emits `current` and
 * `completed`; `active` is retained only as a compatibility alias.
 */
body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .paper-item.completed:not(.current):not(.active) {
  color: #23715c;
  border-color: rgba(35, 113, 92, 0.12);
  background: #dff5ed;
  box-shadow: none;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .paper-item:is(.current, .active) {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(180deg, #4b76ff 0%, #315eea 100%);
  box-shadow: inset 0 0 0 1px rgba(25, 66, 191, 0.2);
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .wide-stage .exam-bottom-row .bottom-action {
  min-width: 92px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(49, 93, 246, 0.12);
  border-radius: 14px;
  color: #315df6;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 28px rgba(45, 67, 128, 0.07);
  font-weight: 750;
}

body:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"]
)[data-activity-mode="exam"] .wide-stage .exam-bottom-row .bottom-action:focus-visible {
  outline: 2px solid rgba(49, 93, 246, 0.72);
  outline-offset: 2px;
  box-shadow:
    0 0 0 3px rgba(49, 93, 246, 0.12),
    0 10px 28px rgba(45, 67, 128, 0.07);
}

@media (max-width: 760px) {
  body:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .wide-stage .exam-bottom-row .bottom-action {
    min-width: 0;
    height: 42px;
    padding: 0 12px;
    border-radius: 13px;
  }
}

/* Match the opening INFO navigation height to every later INFO/question page. */
body[data-active-screen="instructions"][data-activity-mode="exam"]
  .wide-stage[data-screen="instructions"]
  .instructions-bottom-row
  .paper-nav {
  height: 46px;
  min-height: 46px;
}

/*
 * Music-context scores use the engraving width authored in their source data.
 * Keep one sizing mode across desktop, tablet and phone so resizing through
 * 1024px never switches between a responsive SVG and its original width.
 */
body[data-active-screen="exam"][data-activity-mode="exam"]
  .q1-reference-card-body.music-context-reference-fixed-scroll {
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

body[data-active-screen="exam"][data-activity-mode="exam"]
  .music-context-reference.is-fixed-staff-scale,
body[data-active-screen="exam"][data-activity-mode="exam"]
  .music-context-reference.is-fixed-staff-scale .music-context-system-staff {
  flex: none;
  max-width: none !important;
}

body[data-active-screen="exam"][data-activity-mode="exam"]
  .music-context-reference.is-fixed-staff-scale .music-context-system-staff svg {
  display: block;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
}

/* Preserve the original full-width assessment workspace on desktop. */
@media (min-width: 1024px) {
  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .wide-stage[data-screen="instructions"]
    .wide-shell,
  body[data-active-screen="exam"][data-activity-mode="exam"]
    .wide-stage[data-screen="exam"]
    .wide-shell,
  body[data-active-screen="exam"][data-activity-mode="single-practice"]
    .wide-stage[data-screen="exam"]
    .wide-shell,
  body[data-active-screen="exam"][data-activity-mode="wrong-review"]
    .wide-stage[data-screen="exam"]
    .wide-shell {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
  }
}

/* Every assessment mode exposes its vertical rail only when its content overflows. */
body[data-active-screen="instructions"][data-exam-session-mode] .exam-main,
body[data-active-screen="exam"][data-exam-session-mode] .exam-main {
  overflow-y: auto;
  scrollbar-gutter: auto;
  scrollbar-width: auto;
}

body[data-active-screen="instructions"][data-exam-session-mode] .exam-main::-webkit-scrollbar,
body[data-active-screen="exam"][data-exam-session-mode] .exam-main::-webkit-scrollbar {
  width: 12px;
}

/* Keep the established phone instruction-card geometry when English wraps. */
body[data-active-screen="recharge"] .membership-payment-unavailable {
  min-height: 73.140625px;
}

body[data-active-screen="recharge"] .membership-plan-section > header {
  height: 45px;
}

body[data-active-screen="recharge"] .membership-plan-card {
  height: 184px;
}

body[data-active-screen="recharge"] .membership-purchase-note {
  min-height: 85px;
}

body[data-active-screen="recharge"] .recharge-benefits h2 {
  height: 25px;
  line-height: 25px;
}

body[data-locale="en-GB"][data-active-screen="recharge"] .membership-plan-duration {
  font-size: 14px;
}

body[data-locale="en-GB"][data-active-screen="recharge"] :is(
  .membership-plan-average,
  .membership-plan-action
) {
  font-size: 10px;
}

body[data-locale="en-GB"]:is(
  [data-active-screen="instructions"],
  [data-active-screen="exam"][data-exam-fragment^="Info_"]
)[data-activity-mode="exam"] .info-main-continue {
  font-size: 8px !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

@media (max-width: 760px) {
  body[data-locale="en-GB"]:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .exam-toolbar .toolbar-button {
    font-size: 10px !important;
    font-weight: 750 !important;
    line-height: 1.12 !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .info-main-card-frame {
    height: 330.265625px !important;
  }

  body[data-locale="en-GB"][data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame .bullet-copy {
    margin-bottom: 6px;
    padding-left: 14px;
    font-size: 12px;
    line-height: 1.3;
  }

  body[data-locale="en-GB"][data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame .info-main-card-content {
    padding: 10px 12px;
  }

  body[data-locale="en-GB"][data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame :is(h1, h2) {
    margin-bottom: 4px;
    font-size: 16px;
    line-height: 1.2;
  }

  body[data-locale="en-GB"]:is(
    [data-active-screen="instructions"],
    [data-active-screen="exam"]
  )[data-activity-mode="exam"] .toolbar-button:is(
    [data-action="go-theme"],
    [data-action="return-home-save-draft"]
  ) {
    padding-inline: 4px !important;
    text-align: center;
    white-space: pre-line !important;
    overflow-wrap: normal;
    line-height: 1.12 !important;
  }

  body[data-active-screen="recharge"] .membership-payment-unavailable {
    min-height: 82.1875px;
  }

  body[data-active-screen="recharge"] .membership-plan-section > header {
    height: 25px;
  }

  body[data-active-screen="recharge"] .membership-plan-card {
    height: 132px;
  }

  body[data-active-screen="recharge"] .membership-purchase-note {
    min-height: 113px;
  }

  body[data-locale="en-GB"][data-active-screen="recharge"] .membership-plan-duration {
    padding-right: 30px;
    font-size: 12px;
  }

  body[data-locale="en-GB"][data-active-screen="recharge"] :is(
    .membership-plan-average,
    .membership-plan-action
  ) {
    font-size: 9px;
  }
}

@media (max-width: 760px) {
  .learning-materials-stage.is-music-library { padding-bottom: 104px; }
  .learning-music-instrument-hub { gap: 15px; margin-top: 11px; }
  .learning-music-instrument-heading { padding: 0 1px 15px; }
  .learning-music-instrument-heading h2 { margin-top: 5px; font-size: 23px; }
  .learning-music-instrument-heading p { font-size: 10px; }
  .learning-music-instrument-grid { grid-template-columns: minmax(0,1fr); gap: 0; }
  .learning-music-instrument-card { min-height: 84px; grid-template-columns: 46px minmax(0,1fr) 20px; gap: 11px; padding: 13px 4px; border-radius: 0; }
  .learning-music-instrument-card .learning-music-piano-icon { width: 44px; height: 44px; border-radius: 13px; }
  .learning-music-instrument-card .learning-music-instrument-icon { width: 44px; height: 44px; border-radius: 13px; }
  .learning-music-instrument-card .learning-music-piano-icon .learning-music-piano-glyph { font-size: 28px; }
  .learning-music-instrument-icon { width: 52px; height: 52px; border-radius: 16px; }
  .learning-music-instrument-icon svg { width: 35px; height: 35px; }
  .learning-music-violin-glyph { font-size: 28px; }
  .learning-music-instrument-card-copy strong { font-size: 17px; }
  .learning-music-instrument-card-copy em { font-size: 8px; }
  .learning-music-instrument-card-arrow { display: block; font-size: 23px; }
  .learning-music-library { gap: 10px; margin-top: 11px; }
  .learning-music-browser-heading { align-items: flex-start; flex-direction: column; gap: 12px; padding: 0 1px 15px; }
  .learning-music-browser-heading h2 { margin-top: 5px; font-size: 23px; }
  .learning-music-browser-heading p { font-size: 10px; }
  .learning-music-switch-instrument { min-height: 38px; padding: 0 11px; border-radius: 11px; font-size: 10px; }
  .learning-violin-prototype { gap: 12px; margin-top: 11px; }
  .learning-violin-detail-audio { grid-template-columns: 1fr; }
  .learning-violin-audio-column { gap: 9px; }
  .learning-violin-segmented button { min-height: 42px; padding: 7px 9px; }
  .learning-violin-segmented button strong { font-size: 10px; }
  .learning-violin-segmented button small { font-size: 7px; line-height: 1.35; }
  .learning-violin-score-selector { padding: 9px 14px; }
  .learning-music-piano-icon { width: 47px; height: 47px; border-radius: 15px; }
  .learning-music-piano-glyph { font-size: 31px; }
  .learning-music-controls { gap: 12px; padding: 12px 0 0; border-radius: 0; }
  .learning-music-search-shell { grid-template-columns: minmax(0,1fr); gap: 7px; overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .learning-music-search-shell:focus-within { border-color: transparent; box-shadow: none; }
  .learning-music-text-search { min-height: 55px; padding-left: 11px; border: 1px solid #dce4f4; border-radius: 15px; background: #fff; }
  .learning-music-text-search:focus-within { border-color: #8ca7fb; box-shadow: 0 0 0 4px rgba(49,93,246,.09); }
  .learning-music-text-search input { height: 40px; font-size: 16px; }
  .learning-music-open-picker { min-height: 43px; border: 1px solid #dbe4f7; border-radius: 13px; }
  .learning-music-picker { gap: 12px; padding: 13px; border-radius: 16px; }
  .learning-music-picker-fields { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 6px; }
  .learning-music-picker-fields select { height: 44px; padding-right: 24px; padding-left: 8px; background-position: calc(100% - 10px) 18px; font-size: 16px; }
  .learning-music-picker-field-control:has(button:not([hidden])) select { padding-right: 62px; background-position: calc(100% - 38px) 18px; }
  .learning-music-picker-actions button { min-height: 44px; padding: 8px; font-size: 9px; }
  .learning-music-results-meta { min-height: 30px; padding-inline: 1px; }
  .learning-music-search-status { font-size: 9px; }
  .learning-music-group-section { gap: 0; padding: 0; border-radius: 0; }
  .learning-music-group-section > header strong { font-size: 14px; }
  .learning-music-group-section > header b { min-width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
  .learning-music-track-grid { grid-template-columns: 1fr; gap: 0; }
  .learning-music-track-card { min-height: 86px; gap: 7px 10px; padding: 14px 12px; border-radius: 0; }
  .learning-music-track-code { min-width: 34px; height: 25px; padding: 0 7px; border-radius: 8px; font-size: 9px; }
  .learning-music-track-copy { display: grid; gap: 2px; }
  .learning-music-track-copy small { color: #72809a; font-size: 9px; line-height: 1.25; }
  .learning-music-track-copy small::after { content: ""; }
  .learning-music-track-copy strong { font-size: 10px; line-height: 1.45; }
  .learning-music-track-arrow { display: block; }
  .learning-music-track-assets i { padding: 4px 6px; }
  .learning-music-detail { gap: 12px; margin-top: 0; }
  .learning-music-detail-heading { align-items: center; gap: 10px; padding: 0 1px 13px; }
  .learning-music-detail-heading small { font-size: 7px; }
  .learning-music-detail-heading h2 { margin: 4px 0 3px; font-size: 18px; }
  .learning-music-detail-heading p { font-size: 8px; }
  .learning-music-detail-heading.is-piece-focused { padding-bottom: 12px; }
  .learning-music-detail-piece-heading > em { margin-top: 7px; font-size: 9px; }
  .learning-music-detail-piece-heading > h2 { min-block-size: 0; margin: 4px 0 7px; font-size: 17px; line-height: 1.35; }
  .learning-music-detail-return { min-height: 36px; gap: 5px; padding: 0 9px; border-radius: 11px; font-size: 8px; }
  .learning-music-detail-return span { font-size: 17px; }
  .learning-music-detail-audio { grid-template-columns: 1fr; gap: 12px; padding: 15px; border-radius: 19px; }
  .learning-music-detail .learning-music-detail-audio-copy > strong { font-size: 16px; }
  .learning-music-audio-player { grid-template-columns: 38px auto minmax(0,1fr) auto; gap: 8px; padding: 8px 9px; border-radius: 15px; }
  .learning-music-audio-toggle { width: 36px; height: 36px; }
  .learning-music-audio-current,.learning-music-audio-duration { font-size: 9px; }
  .learning-music-volume-control { display: none; }
  .learning-music-detail-score { border-radius: 19px; }
  .learning-music-detail-score header { flex-wrap: wrap; gap: 9px; padding: 14px; }
  .learning-music-detail-score header strong { font-size: 11px; }
  .learning-music-detail-actions { display: grid; width: 100%; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; gap: 7px; }
  .learning-music-share-button { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; min-height: 38px; padding: 8px 6px; border-radius: 11px; font-size: 8px; }
  .learning-music-share-button svg { width: 15px; height: 15px; }
  .learning-music-detail-navigation { display: contents; }
  .learning-music-detail-navigation button { width: 100%; min-width: 0; min-height: 38px; padding: 8px 5px; border-radius: 11px; font-size: 8px; }
  .learning-music-detail-navigation button:first-child { grid-column: 1; grid-row: 1; }
  .learning-music-detail-navigation button:last-child { grid-column: 3; grid-row: 1; }
  .learning-music-detail-heading:has(.learning-music-detail-heading-actions) { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; }
  .learning-music-detail-heading-actions { display: grid; width: 100%; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
  .learning-music-detail-heading-actions .learning-music-detail-actions { display: contents; }
  .learning-music-detail-heading-actions .learning-music-share-button { grid-column: 1; grid-row: 1; }
  .learning-music-detail-heading-actions .learning-music-detail-navigation { display: contents; }
  .learning-music-detail-heading-actions .learning-music-detail-navigation button:first-child { grid-column: 2; grid-row: 1; }
  .learning-music-detail-heading-actions .learning-music-detail-navigation button:last-child { grid-column: 3; grid-row: 1; }
  .learning-music-detail-heading-actions .learning-music-detail-return { grid-column: 4; grid-row: 1; width: 100%; min-width: 0; justify-content: center; padding-inline: 5px; }
  .learning-music-compact-reader { border-radius: 19px; }
  .learning-music-compact-audio { padding: 10px; }
  .learning-violin-compact-audio .learning-violin-audio-column { grid-template-columns: minmax(0,1fr); gap: 9px; }
  /* Mobile reads the complete, vertically scrollable score without desktop reader chrome. */
  .learning-music-pdf-toolbar { display: none; min-height: 45px; grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 7px 10px; }
  .learning-music-pdf-toolbar > strong { display: none; }
  .learning-music-pdf-toolbar nav { grid-column: 1; justify-content: flex-start; }
  .learning-music-pdf-zoom-controls { grid-column: 2; }
  .learning-music-pdf-zoom-controls > .learning-music-pdf-fit-button { min-width: 58px; padding-inline: 7px; }
  .learning-music-pdf-zoom-controls > .learning-music-pdf-fullscreen-button { min-width: 58px; padding-inline: 7px; }
  .learning-music-compact-reader.has-score-selector .learning-music-pdf-toolbar { display: block; min-height: 0; padding: 10px; }
  .learning-violin-score-selector.is-toolbar { grid-column: 1 / -1; }
  .learning-violin-score-selector.is-toolbar .learning-violin-segmented { width: 100%; }
  .learning-music-compact-reader.has-score-selector .learning-music-pdf-toolbar nav { grid-column: 1; grid-row: 2; }
  .learning-music-compact-reader.has-score-selector .learning-music-pdf-zoom-controls { grid-column: 2; grid-row: 2; }
  .learning-music-pdf-toolbar > nav,
  .learning-music-pdf-toolbar > .learning-music-pdf-zoom-controls { display: none; }
  .learning-music-pdf-body { height: auto; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(440px,66vh); }
  .learning-music-pdf-thumbnails { display: none; gap: 9px; padding: 10px 12px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid #d9dee8; }
  .learning-music-pdf-thumbnails button { flex: 0 0 86px; padding: 5px; border-radius: 9px; }
  .learning-music-pdf-thumbnails span { font-size: 7px; }
  .learning-music-pdf-canvas.learning-music-score-pages { padding: 14px 10px; }
  .learning-music-score-empty { min-height: 150px; padding: 28px 14px; }
  .learning-music-score-empty strong { font-size: 14px; }
  .learning-music-share-backdrop { padding: 16px; }
  .learning-music-share-dialog { max-height: calc(100dvh - 32px); gap: 8px; padding: 24px 18px 20px; border-radius: 22px; }
  .learning-music-share-mascot { width: 64px; height: 64px; }
  .learning-music-share-dialog h2 { font-size: 20px; }
  .learning-music-share-qr-shell { width: 188px; height: 188px; }
  .learning-music-share-actions { flex-direction: column; }
  .learning-music-share-actions button { min-height: 40px; }
}

@media (max-width: 349px) {
  body[data-locale="en-GB"] .end-test-dialog {
    width: calc(100vw - 36px);
    min-width: 0;
  }
}

/* Phone landscape renders the desktop viewport without iOS text inflation. */
html[data-phone-landscape-desktop="true"] {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html[data-phone-landscape-desktop="true"] body[data-active-screen="instructions"] .instructions-main,
html[data-phone-landscape-desktop="true"] body[data-active-screen="exam"][data-exam-fragment^="Info_"] .exam-main {
  min-height: 0;
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
  overscroll-behavior-y: contain;
}

html[data-phone-landscape-desktop="true"] body[data-active-screen="instructions"] .instructions-main > .exam-question-zoom-content > .info-frame,
html[data-phone-landscape-desktop="true"] body[data-active-screen="exam"][data-exam-fragment^="Info_"] .exam-main > .info-card-stack {
  flex: 0 0 auto;
}

html[data-phone-landscape-desktop="true"] body[data-active-screen="instructions"] :is(
  .info-main-card-frame,
  .info-main-card-content,
  .info-main-card-body
),
html[data-phone-landscape-desktop="true"] body[data-active-screen="exam"][data-exam-fragment^="Info_"] :is(
  .info-main-card-frame,
  .info-main-card-content,
  .info-main-card-body
) {
  height: auto !important;
  max-height: none !important;
}

/* Desktop exam entry: retain the site header and use the flatter public-site language. */
@media (min-width: 961px) {
  body:is([data-active-screen="landing"]:where([data-landing-layout="desktop"]), [data-active-screen="theme"]:where([data-theme-layout="desktop"])) {
    color: var(--xiyue-ink);
    background: #fff;
  }

  body:is([data-active-screen="landing"]:where([data-landing-layout="desktop"]), [data-active-screen="theme"]:where([data-theme-layout="desktop"])) .mock-app {
    background: #fff;
  }

  body:is([data-active-screen="landing"]:where([data-landing-layout="desktop"]), [data-active-screen="theme"]:where([data-theme-layout="desktop"])) .site-desktop-header-shell {
    position: sticky;
    z-index: 50;
    top: 0;
    display: block;
    padding: 0 clamp(24px, 3vw, 64px);
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--xiyue-line);
    backdrop-filter: blur(14px);
  }

  body:is([data-active-screen="landing"]:where([data-landing-layout="desktop"]), [data-active-screen="theme"]:where([data-theme-layout="desktop"]))
    .home-desktop-nav > [data-action="home-ui-home"].is-active {
    color: var(--xiyue-muted);
    background: transparent;
  }

  body:is([data-active-screen="landing"]:where([data-landing-layout="desktop"]), [data-active-screen="theme"]:where([data-theme-layout="desktop"]))
    #home-desktop-exam-trigger {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .narrow-stage[data-screen="theme"] {
    min-height: calc(100vh - 75px);
    padding: 0 clamp(24px, 3vw, 64px) 64px;
    background: #fff;
  }


body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-shell {
    display: grid;
    width: min(1600px, 100%);
    max-width: 1600px;
    min-height: 0;
    margin-inline: auto;
    gap: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }


body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .entry-header {
    height: auto;
    min-height: 0;
    padding: 48px 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }


body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .entry-brand {
    color: var(--xiyue-blue-600);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .16em;
  }


body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .entry-title-band {
    position: static;
    overflow: visible;
    padding: 0 0 32px;
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }


body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .entry-page-title {
    max-width: 920px;
    margin: 0;
    color: var(--xiyue-ink);
    font-size: clamp(34px, 3.3vw, 52px);
    font-weight: 850;
    line-height: 1.12;
    letter-spacing: -.045em;
  }





  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-panel {
    min-height: 360px;
    height: 360px;
    padding: 30px 0 0;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-copy {
    color: var(--xiyue-muted);
    font-size: 14px;
    font-weight: 600;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-top: 26px;
    border-top: 1px solid var(--xiyue-line);
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-option {
    width: auto;
    min-width: 0;
    min-height: 208px;
    height: 208px;
    align-items: stretch;
    padding: 20px;
    border: 0;
    border-right: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: background .16s ease, box-shadow .16s ease;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-option:last-child {
    border-right: 0;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-option:hover {
    background: #fafbfe;
    transform: none;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-option.selected {
    border-color: var(--xiyue-line);
    background: var(--xiyue-blue-050);
    box-shadow: inset 0 -3px var(--xiyue-blue-600);
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-preview {
    width: 100%;
    height: 112px;
    padding: 10px;
    border: 1px solid rgba(43, 60, 100, .1);
    border-radius: 8px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-preview-sheet {
    padding: 14px;
    border-radius: 5px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-option-copy {
    margin-top: 14px;
    padding-right: 30px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-option-copy strong {
    font-size: 15px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-option-copy small {
    font-size: 11px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-radio-mark {
    right: 20px;
    bottom: 22px;
    width: 20px;
    height: 20px;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-actions {
    margin-top: 24px;
    justify-content: flex-end;
  }

  body[data-active-screen="theme"]:where([data-theme-layout="desktop"]) .theme-continue-button {
    min-width: 180px;
    min-height: 48px;
    border-radius: 10px;
    background: var(--xiyue-blue-600);
    box-shadow: 0 9px 20px rgba(49, 93, 246, .16);
    font-size: 15px;
  }
}

/*
 * Desktop full-paper opening INFO pilot.
 *
 * This scope deliberately stops at the opening `instructions` screen. It must
 * never match the rendered question workspace, score containers, notation
 * SVGs or any later `Info_*` paper fragment.
 */
@media (min-width: 961px) {
  body[data-active-screen="instructions"][data-activity-mode="exam"],
  body[data-active-screen="instructions"][data-activity-mode="exam"] .mock-app {
    color: var(--xiyue-ink);
    background: #fff !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .wide-stage[data-screen="instructions"] {
    height: 100vh;
    padding: 0 24px 24px;
    background: #fff !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .wide-stage[data-screen="instructions"] > .wide-shell {
    width: 100% !important;
    max-width: none !important;
    height: 100%;
    margin-inline: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    flex: 0 0 auto;
    min-height: 75px;
    padding: 14px 0;
    gap: 24px;
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    :is(.instructions-toolbar-left, .instructions-toolbar-right) {
    min-width: 0;
    flex-wrap: nowrap;
    gap: 6px;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar .toolbar-brand {
    margin-right: 18px;
    color: var(--xiyue-ink);
    font-size: 14px;
    font-weight: 820;
    letter-spacing: -.015em;
    white-space: nowrap;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar .toolbar-button {
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    font-size: 13px;
    font-weight: 750;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar .toolbar-button:hover {
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar [data-action="open-nav"] {
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar [data-action="go-exam-start"] {
    min-width: 76px;
    color: #fff;
    background: var(--xiyue-blue-600);
    box-shadow: 0 8px 18px rgba(49, 93, 246, .16);
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar .end-button {
    color: #d94c5c;
    background: #fff4f5;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-timer-pill {
    min-width: 86px;
    height: 40px;
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 8px;
    background: var(--xiyue-blue-050);
    box-shadow: none;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    padding: 28px 0 0;
    border-bottom: 0;
    background: #fff !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-main > .exam-question-zoom-content > :is(.info-main-card-frame, .info-action-card-frame) {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    overflow: visible;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame :is(.info-main-card-content, .info-main-card-body) {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-body {
    display: block;
    max-width: 960px;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame h1 {
    grid-column: 1;
    grid-row: 1;
    margin: 0 0 12px;
    color: var(--xiyue-ink);
    font-size: 22px;
    font-weight: 850;
    line-height: 1.2;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame h2 {
    margin: 20px 0 8px;
    padding-left: 0;
    color: var(--xiyue-ink);
    border-left: 0;
    font-size: 16px;
    font-weight: 820;
    line-height: 1.65;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame h2:nth-of-type(1) {
    grid-column: 2;
    grid-row: 1;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame h2:nth-of-type(2) {
    grid-column: 3;
    grid-row: 1;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame .bullet-copy {
    margin: 0;
    padding: 0 0 0 18px;
    color: var(--xiyue-muted);
    font-size: 13px;
    line-height: 1.68;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame .bullet-copy:nth-of-type(1) {
    grid-column: 1;
    grid-row: 2;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame .bullet-copy:nth-of-type(2),
  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame .bullet-copy:nth-of-type(3) {
    padding-left: 18px;
    border-left: 0;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame .bullet-copy:nth-of-type(2) {
    grid-column: 2;
    grid-row: 2;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame .bullet-copy:nth-of-type(3) {
    grid-column: 3;
    grid-row: 2;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame {
    flex: 0 0 auto;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-action-card-frame {
    flex: 0 0 auto;
    min-height: 76px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-action-card-body {
    display: flex;
    width: 100%;
    min-height: 76px;
    padding: 0;
    align-items: center;
    border-left: 0;
    background: transparent !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-continue {
    width: 120px;
    min-width: 120px;
    height: 44px;
    padding: 0 18px;
    color: #fff;
    border: 0;
    border-radius: 10px;
    background: var(--xiyue-blue-600);
    box-shadow: 0 9px 20px rgba(49, 93, 246, .16);
    font-size: 14px;
    font-weight: 800;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-bottom-row {
    flex: 0 0 auto;
    gap: 12px;
    min-height: 62px;
    padding: 16px 0 0;
    border: 0;
    background: #fff;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-paper-nav {
    min-height: 46px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-bottom-action {
    height: 44px;
    border: 0;
    border-radius: 8px;
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
    box-shadow: none;
  }
}

@media (min-width: 961px) and (max-width: 1199px) {
  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar {
    gap: 12px;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar .toolbar-brand {
    margin-right: 8px;
    font-size: 13px;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar .toolbar-button {
    padding-inline: 9px;
    font-size: 12px;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-main {
    gap: 0;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-body {
    display: block;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame h2 {
    margin-top: 18px;
    padding-left: 0;
    border-left: 0;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame .bullet-copy:nth-of-type(n) {
    padding-left: 18px;
    border-left: 0;
  }
}

/* Desktop questions using the reviewed flat examination presentation. */
@media (min-width: 961px) {
  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode],
  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode] :is(
    .mock-app,
    .wide-stage[data-screen="exam"],
    .wide-stage[data-screen="exam"] > .wide-shell,
    .exam-toolbar,
    .exam-main,
    .q1-question-card,
    .q1-question-card-body,
    .q1-reference-card,
    .q1-reference-card-body,
    .q1-answer-card,
    .q1-answer-card-body,
    .exam-bottom-row,
    .paper-nav
  ) {
    background: var(--test-surface) !important;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .wide-stage[data-screen="exam"] {
    height: 100vh;
    padding: 0 0 20px 24px !important;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .wide-stage[data-screen="exam"] > .wide-shell {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    flex: 0 0 auto;
    min-height: 75px;
    padding: 14px var(--exam-flat-safe-inline);
    align-items: center;
    gap: 24px;
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    :is(.toolbar-left, .toolbar-right) {
    min-width: 0;
    flex-wrap: nowrap;
    gap: 6px;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-toolbar .toolbar-brand {
    margin-right: 18px;
    color: var(--xiyue-ink);
    font-size: 14px;
    font-weight: 820;
    letter-spacing: -.015em;
    white-space: nowrap;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-toolbar .toolbar-button {
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    font-size: 13px;
    font-weight: 750;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-toolbar .toolbar-button:hover {
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-toolbar [data-action="open-nav"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-toolbar #exam-next-button:not(:disabled) {
    min-width: 0;
    color: var(--xiyue-blue-600);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-toolbar .end-button {
    color: #d94c5c;
    background: #fff4f5;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-toolbar .timer-pill {
    min-width: 86px;
    height: 40px;
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 8px;
    background: var(--xiyue-blue-050);
    box-shadow: none;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .q1-card-stack > :is(.q1-question-card, .q1-reference-card, .q1-answer-card) {
    border: 1px solid transparent;
    border-radius: 0;
    background: var(--test-surface) !important;
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .q1-card-stack > :is(.q1-question-card, .q1-reference-card) {
    border-bottom-color: var(--xiyue-line);
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    :is(.q1-question-card-body, .q1-reference-card-body, .q1-answer-card-body) {
    background: var(--test-surface) !important;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .q1-answer-button {
    width: 46px;
    min-width: 46px;
    height: 32px;
    padding: 0;
    color: #fff;
    border: 0;
    border-radius: 8px;
    background: var(--xiyue-blue-600);
    box-shadow: 0 7px 16px rgba(49, 93, 246, .16);
    font-size: 11px;
    font-weight: 800;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .wide-stage[data-screen="exam"] .paper-nav {
    border-color: transparent;
    border-radius: 0;
    background: var(--test-surface) !important;
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .wide-stage[data-screen="exam"] .bottom-action {
    height: 44px;
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 8px;
    background: var(--xiyue-blue-050);
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-bottom-row .bottom-actions-group {
    margin-right: 24px;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-main {
    scrollbar-color: rgba(82, 104, 140, .34) var(--test-surface) !important;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-main::-webkit-scrollbar-track,
  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-main::-webkit-scrollbar-corner {
    border-radius: 0 !important;
    background: var(--test-surface) !important;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-main::-webkit-scrollbar-thumb {
    border: 3px solid var(--test-surface) !important;
    background: rgba(82, 104, 140, .34) !important;
  }
}

@media (min-width: 961px) and (max-width: 1199px) {
  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-toolbar {
    gap: 12px;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-toolbar .toolbar-brand {
    margin-right: 8px;
    font-size: 13px;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-toolbar .toolbar-button {
    padding-inline: 9px;
    font-size: 12px;
  }
}

/* Desktop flat exam surfaces must follow the selected paper colour edge to edge. */
@media (min-width: 961px) {
  html:has(body[data-theme="classic"]:is([data-active-screen="instructions"], [data-active-screen="exam"][data-exam-session-mode])) {
    background: #fff;
  }

  html:has(body[data-theme="warm"]:is([data-active-screen="instructions"], [data-active-screen="exam"][data-exam-session-mode])) {
    background: #fff8d6;
  }

  html:has(body[data-theme="cool"]:is([data-active-screen="instructions"], [data-active-screen="exam"][data-exam-session-mode])) {
    background: #e8f2ff;
  }

  html:has(body[data-theme="pink"]:is([data-active-screen="instructions"], [data-active-screen="exam"][data-exam-session-mode])) {
    background: #fbeaf4;
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
  ) {
    --exam-flat-safe-inline: clamp(24px, 2.4vw, 56px);
    background: var(--test-surface) !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] :is(
    .mock-app,
    .wide-stage[data-screen="instructions"],
    .wide-stage[data-screen="instructions"] > .wide-shell,
    .instructions-toolbar,
    .instructions-main,
    .instructions-bottom-row
  ),
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode] :is(
    .mock-app,
    .wide-stage[data-screen="exam"],
    .wide-stage[data-screen="exam"] > .wide-shell,
    .exam-toolbar,
    .exam-main,
    .exam-bottom-row
  ),
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode] :is(
    .mock-app,
    .wide-stage[data-screen="exam"],
    .wide-stage[data-screen="exam"] > .wide-shell,
    .exam-toolbar,
    .exam-main,
    .q1-question-card,
    .q1-question-card-body,
    .q1-answer-card,
    .q1-answer-card-body,
    .exam-bottom-row,
    .paper-nav
  ) {
    background: var(--test-surface) !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar {
    padding-right: var(--exam-flat-safe-inline);
    padding-left: var(--exam-flat-safe-inline);
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-main-card-frame,
  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .info-action-card-frame,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-main-card-frame:not(.final-info-main-card-frame),
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-action-card-frame {
    padding-right: var(--exam-flat-safe-inline) !important;
    padding-left: var(--exam-flat-safe-inline) !important;
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
  ) .info-main-continue {
    width: 46px;
    min-width: 46px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 7px 16px rgba(49, 93, 246, .16);
    font-size: 11px !important;
    font-weight: 800 !important;
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .q1-question-prompt {
    margin-left: calc(var(--exam-flat-safe-inline) - 18px);
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    :is(.q1-answer-options, .q1-answer-button) {
    margin-left: calc(var(--exam-flat-safe-inline) - 14px);
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .exam-main,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode] .exam-main,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode] .exam-main {
    scrollbar-color: rgba(82, 104, 140, .34) var(--test-surface);
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .exam-main::-webkit-scrollbar-track,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode] .exam-main::-webkit-scrollbar-track,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode] .exam-main::-webkit-scrollbar-track {
    background: transparent;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"] .exam-main::-webkit-scrollbar-thumb,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode] .exam-main::-webkit-scrollbar-thumb,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode] .exam-main::-webkit-scrollbar-thumb {
    border: 3px solid var(--test-surface);
    background: rgba(82, 104, 140, .34);
  }
}

/* Desktop Q1 pilot: flatten the exam chrome without touching authored notation geometry. */
@media (min-width: 961px) {
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode],
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode] .mock-app,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .wide-stage[data-screen="exam"],
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .wide-stage[data-screen="exam"] > .wide-shell,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-main {
    color: var(--xiyue-ink);
    background: #fff !important;
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar {
    border: 1px solid transparent;
    border-bottom-color: var(--xiyue-line);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar .toolbar-brand {
    color: var(--xiyue-ink);
    font-weight: 820;
    letter-spacing: -.015em;
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar .toolbar-button {
    border-color: transparent;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar .toolbar-button:hover,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar [data-action="open-nav"] {
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar #exam-next-button:not(:disabled) {
    color: #fff;
    background: var(--xiyue-blue-600);
    box-shadow: 0 8px 18px rgba(49, 93, 246, .16);
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar .end-button {
    color: #d94c5c;
    background: #fff4f5;
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar .timer-pill {
    color: var(--xiyue-blue-600);
    border-color: transparent;
    border-radius: 8px;
    background: var(--xiyue-blue-050);
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .q1-card-stack > :is(.q1-question-card, .q1-answer-card) {
    border: 1px solid transparent;
    border-radius: 0;
    background: #fff !important;
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .q1-card-stack > .q1-question-card {
    border-bottom-color: var(--xiyue-line);
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    :is(.q1-question-card-body, .q1-answer-card-body) {
    background: #fff !important;
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .q1-answer-button {
    width: 46px;
    min-width: 46px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--xiyue-blue-600);
    box-shadow: 0 7px 16px rgba(49, 93, 246, .16);
    font-size: 11px;
    font-weight: 800;
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .wide-stage[data-screen="exam"] .paper-nav {
    border-color: transparent;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .wide-stage[data-screen="exam"] .bottom-action {
    height: 44px;
    border: 0;
    border-radius: 8px;
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
    box-shadow: none;
  }
}

/* Desktop section/final INFO pages use the same flat, full-width exam shell. */
@media (min-width: 961px) {
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode] .mock-app {
    color: var(--xiyue-ink);
    background: #fff !important;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .wide-stage[data-screen="exam"] {
    height: 100vh;
    padding: 0 24px 24px;
    background: #fff !important;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .wide-stage[data-screen="exam"] > .wide-shell {
    width: 100% !important;
    max-width: none !important;
    height: 100%;
    margin-inline: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    flex: 0 0 auto;
    min-height: 75px;
    padding: 14px 0;
    gap: 24px;
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    :is(.toolbar-left, .toolbar-right) {
    min-width: 0;
    flex-wrap: nowrap;
    gap: 6px;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .toolbar-brand {
    margin-right: 18px;
    color: var(--xiyue-ink);
    font-size: 14px;
    font-weight: 820;
    letter-spacing: -.015em;
    white-space: nowrap;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .toolbar-button {
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    font-size: 13px;
    font-weight: 750;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .toolbar-button:hover {
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar [data-action="open-nav"] {
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar #exam-next-button:not(:disabled) {
    min-width: 76px;
    color: #fff;
    background: var(--xiyue-blue-600);
    box-shadow: 0 8px 18px rgba(49, 93, 246, .16);
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .end-button {
    color: #d94c5c;
    background: #fff4f5;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .timer-pill {
    min-width: 86px;
    height: 40px;
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 8px;
    background: var(--xiyue-blue-050);
    box-shadow: none;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-main {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    padding: 28px 0 0;
    background: #fff !important;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-card-stack {
    display: flex;
    width: 100%;
    min-height: 0;
    margin: 0;
    flex-direction: column;
    gap: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-card-stack > :is(.info-main-card-frame, .info-action-card-frame) {
    width: 100%;
    height: auto !important;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    overflow: visible;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-main-card-frame {
    flex: 0 0 auto;
    padding-bottom: 28px !important;
    border-bottom: 1px solid var(--xiyue-line) !important;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-main-card-frame :is(.info-main-card-content, .info-main-card-body) {
    width: 100%;
    max-width: 960px;
    height: auto !important;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    overflow: visible;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-main-section {
    gap: 14px;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-main-heading {
    color: var(--xiyue-ink);
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-main-list p,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .final-info-copy {
    color: var(--xiyue-muted);
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .final-info-copy {
    max-width: 960px;
  }

  body[data-active-screen="exam"][data-exam-fragment="Info_9-Final-page"][data-exam-session-mode]
    .final-info-card-body {
    width: min(960px, calc(100vw - 48px));
    margin-left: calc((100vw - min(960px, calc(100vw - 48px))) / 2 - 24px);
    margin-right: 0;
  }

  body[data-active-screen="exam"][data-exam-fragment="Info_9-Final-page"][data-exam-session-mode]
    .info-card-stack > .final-info-main-card-frame {
    height: 238px !important;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .final-info-rule {
    background: var(--xiyue-line);
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-action-card-frame {
    flex: 0 0 auto;
    min-height: 76px;
    border-bottom: 1px solid var(--xiyue-line) !important;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-action-card-body {
    display: flex;
    width: 100%;
    min-height: 76px;
    padding: 0;
    align-items: center;
    border: 0;
    border-radius: 0;
    background: transparent !important;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-main-continue {
    width: 120px;
    min-width: 120px;
    height: 44px;
    padding: 0 18px;
    color: #fff;
    border: 0;
    border-radius: 10px;
    background: var(--xiyue-blue-600);
    box-shadow: 0 9px 20px rgba(49, 93, 246, .16);
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: 0;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-bottom-row {
    flex: 0 0 auto;
    gap: 12px;
    min-height: 62px;
    padding: 16px 0 0;
    border: 0;
    background: #fff;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .paper-nav {
    min-height: 46px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .bottom-action {
    height: 44px;
    border: 0;
    border-radius: 8px;
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
    box-shadow: none;
  }
}

@media (min-width: 961px) and (max-width: 1199px) {
  body[data-active-screen="exam"][data-exam-fragment="Info_9-Final-page"][data-exam-session-mode]
    .info-card-stack > .final-info-main-card-frame {
    height: 262px !important;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar {
    gap: 12px;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .toolbar-brand {
    margin-right: 8px;
    font-size: 13px;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .toolbar-button {
    padding-inline: 9px;
    font-size: 12px;
  }
}

/* Keep theme-aware surface and spacing overrides after the pilot page rules. */
@media (min-width: 961px) {
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode] :is(
    .mock-app,
    .wide-stage[data-screen="exam"],
    .wide-stage[data-screen="exam"] > .wide-shell,
    .exam-toolbar,
    .exam-main,
    .exam-bottom-row
  ),
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode],
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode] :is(
    .mock-app,
    .wide-stage[data-screen="exam"],
    .wide-stage[data-screen="exam"] > .wide-shell,
    .exam-toolbar,
    .exam-main,
    .q1-question-card,
    .q1-question-card-body,
    .q1-answer-card,
    .q1-answer-card-body,
    .exam-bottom-row,
    .paper-nav
  ) {
    background: var(--test-surface) !important;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar {
    padding-right: var(--exam-flat-safe-inline);
    padding-left: var(--exam-flat-safe-inline);
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-main-card-frame:not(.final-info-main-card-frame),
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-action-card-frame {
    padding-right: var(--exam-flat-safe-inline) !important;
    padding-left: var(--exam-flat-safe-inline) !important;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-main-continue {
    width: 46px;
    min-width: 46px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 7px 16px rgba(49, 93, 246, .16);
    font-size: 11px !important;
    font-weight: 800 !important;
  }
}

/*
 * Desktop exam shell alignment.
 *
 * Keep the deliberate 24px reading inset on the left, but let the shell and
 * its scroll rail reach the browser's right edge. Opening INFO, section INFO
 * and the Q1 pilot also share one toolbar specification here so moving between
 * them never changes the chrome. This block does not target authored question
 * content or notation nodes.
 */
@media (min-width: 961px) {
  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .wide-stage[data-screen="instructions"],
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .wide-stage[data-screen="exam"],
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .wide-stage[data-screen="exam"] {
    height: 100vh;
    padding: 0 0 20px 24px !important;
    background: var(--test-surface) !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .wide-stage[data-screen="instructions"] > .wide-shell,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .wide-stage[data-screen="exam"] > .wide-shell,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .wide-stage[data-screen="exam"] > .wide-shell {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    background: var(--test-surface) !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    flex: 0 0 auto;
    min-height: 75px;
    padding: 14px var(--exam-flat-safe-inline);
    align-items: center;
    gap: 24px;
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: var(--test-surface) !important;
    box-shadow: none;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    :is(.instructions-toolbar-left, .instructions-toolbar-right),
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    :is(.toolbar-left, .toolbar-right),
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    :is(.toolbar-left, .toolbar-right) {
    min-width: 0;
    flex-wrap: nowrap;
    gap: 6px;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar .toolbar-brand,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .toolbar-brand,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar .toolbar-brand {
    margin-right: 18px;
    color: var(--xiyue-ink);
    font-size: 14px;
    font-weight: 820;
    letter-spacing: -.015em;
    white-space: nowrap;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar .toolbar-button,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .toolbar-button,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar .toolbar-button {
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    font-size: 13px;
    font-weight: 750;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar .toolbar-button:hover,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .toolbar-button:hover,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar .toolbar-button:hover {
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar [data-action="open-nav"],
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar [data-action="open-nav"],
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar [data-action="open-nav"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar [data-action="go-exam-start"],
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar #exam-next-button:not(:disabled),
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar #exam-next-button:not(:disabled) {
    min-width: 0;
    color: var(--xiyue-blue-600);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar .end-button,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .end-button,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar .end-button {
    color: #d94c5c;
    background: #fff4f5;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar .instructions-timer-pill,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .timer-pill,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar .timer-pill {
    min-width: 86px;
    height: 40px;
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 8px;
    background: var(--xiyue-blue-050);
    box-shadow: none;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-bottom-actions-group,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-bottom-row .bottom-actions-group,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-bottom-row .bottom-actions-group {
    margin-right: 24px;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .exam-main,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-main,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-main {
    scrollbar-color: rgba(82, 104, 140, .34) var(--test-surface) !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .exam-main::-webkit-scrollbar-track,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-main::-webkit-scrollbar-track,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-main::-webkit-scrollbar-track,
  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .exam-main::-webkit-scrollbar-corner,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-main::-webkit-scrollbar-corner,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-main::-webkit-scrollbar-corner {
    border-radius: 0 !important;
    background: var(--test-surface) !important;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .exam-main::-webkit-scrollbar-thumb,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-main::-webkit-scrollbar-thumb,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-main::-webkit-scrollbar-thumb {
    border: 3px solid var(--test-surface) !important;
    background: rgba(82, 104, 140, .34) !important;
  }
}

@media (min-width: 961px) and (max-width: 1199px) {
  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar {
    gap: 12px;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar .toolbar-brand,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .toolbar-brand,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar .toolbar-brand {
    margin-right: 8px;
    font-size: 13px;
  }

  body[data-active-screen="instructions"][data-activity-mode="exam"]
    .instructions-toolbar .toolbar-button,
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .exam-toolbar .toolbar-button,
  body[data-active-screen="exam"][data-exam-fragment="2020-G5-1.1a"][data-exam-session-mode]
    .exam-toolbar .toolbar-button {
    padding-inline: 9px;
    font-size: 12px;
  }
}

/* Keep reused legacy card classes from restoring rounded examination shells. */
@media (min-width: 961px) {
  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode] {
    --exam-flat-safe-inline: clamp(24px, 2.4vw, 56px);
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    .exam-toolbar {
    padding-right: var(--exam-flat-safe-inline) !important;
    padding-left: var(--exam-flat-safe-inline) !important;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    #exam-main :is(.q1-question-prompt, .q1-question-followup) {
    margin-left: calc(var(--exam-flat-safe-inline) - 18px);
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    #exam-main :is(.q1-answer-options, .q1-answer-button) {
    margin-left: calc(var(--exam-flat-safe-inline) - 14px);
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    #exam-main .q1-card-stack > :is(.q1-question-card, .q1-reference-card, .q1-answer-card) {
    border: 1px solid transparent !important;
    border-radius: 0 !important;
    background: var(--test-surface) !important;
    box-shadow: none !important;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    #exam-main .q1-card-stack > :is(.q1-question-card, .q1-reference-card) {
    border-bottom-color: var(--xiyue-line) !important;
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .exam-bottom-row {
    flex: 0 0 auto;
    gap: 12px;
    min-height: 62px;
    padding: 16px 0 0 !important;
    border: 0;
    background: var(--test-surface) !important;
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .paper-nav {
    height: 46px;
    min-height: 46px;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    overflow: visible;
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .paper-nav-track {
    height: 84px;
    margin-top: -40px;
    padding-top: 40px;
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .paper-item {
    flex-basis: 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    font-size: 12px;
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .paper-nav-arrow {
    flex-basis: 34px;
    width: 34px;
    min-width: 34px;
    height: 44px;
    align-self: stretch;
    font-size: 16px;
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .bottom-actions-group {
    gap: 8px;
    margin-right: 24px;
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .bottom-action {
    height: 44px;
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 8px;
    background: var(--xiyue-blue-050);
    box-shadow: none;
  }
}

/*
 * Shared desktop exam alignment.
 * Every unified question follows Q1 at the top/content edge and INFO at the
 * bottom navigation edge. Question renderers and notation geometry remain
 * outside this rule set.
 */
@media (min-width: 961px) {
  body[data-active-screen="exam"][data-exam-shell="unified-question"][data-exam-session-mode] {
    --exam-flat-safe-inline: clamp(24px, 2.4vw, 56px);
  }

  body[data-active-screen="exam"][data-exam-shell="unified-question"][data-exam-session-mode]
    .exam-toolbar {
    padding-right: var(--exam-flat-safe-inline) !important;
    padding-left: var(--exam-flat-safe-inline) !important;
  }

  body[data-active-screen="exam"][data-exam-shell="unified-question"][data-exam-session-mode]
    #exam-main :is(.q1-question-prompt, .q1-question-followup) {
    margin-left: calc(var(--exam-flat-safe-inline) - 18px);
  }

  body[data-active-screen="exam"][data-exam-shell="unified-question"][data-exam-session-mode]
    #exam-main :is(.q1-answer-options, .q1-answer-button) {
    margin-left: calc(var(--exam-flat-safe-inline) - 14px);
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-shell="unified-question"][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .exam-bottom-row {
    flex: 0 0 auto;
    gap: 12px;
    min-height: 62px;
    padding: 16px 0 0 !important;
    border: 0;
    background: var(--test-surface) !important;
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-shell="unified-question"][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .paper-nav {
    height: 46px;
    min-height: 46px;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    overflow: visible;
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-shell="unified-question"][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .paper-nav-track {
    height: 84px;
    margin-top: -40px;
    padding-top: 40px;
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-shell="unified-question"][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .paper-item {
    flex-basis: 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    font-size: 12px;
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-shell="unified-question"][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .paper-nav-arrow {
    flex-basis: 34px;
    width: 34px;
    min-width: 34px;
    height: 44px;
    align-self: stretch;
    font-size: 16px;
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-shell="unified-question"][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .bottom-actions-group {
    gap: 8px;
    margin-right: 24px;
  }

  body:is(
    [data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode],
    [data-active-screen="exam"][data-exam-shell="unified-question"][data-exam-session-mode]
  ) .wide-stage[data-screen="exam"] .bottom-action {
    height: 44px;
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 8px;
    background: var(--xiyue-blue-050);
    box-shadow: none;
  }
}

/*
 * Desktop Grade 5 paper-wide alignment.
 *
 * Q2 supplies the reading line.  Move content boxes without changing their
 * used width, so authored SVG/image geometry and drag coordinates stay intact.
 * This covers the ordinary Grade 5 mock examination and every preview paper.
 */
@media (min-width: 961px) {
  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode] {
    --exam-question-shift: calc(var(--exam-flat-safe-inline) - 23px);
    --exam-answer-shift: calc(var(--exam-flat-safe-inline) - 19px);
    --exam-notation-stave-left: 14px;
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    #exam-main :is(.q1-question-card-body, .q1-reference-card-body) > * {
    box-sizing: border-box;
    max-width: calc(100% - var(--exam-question-shift));
    position: relative;
    left: var(--exam-question-shift);
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    #exam-main .q1-question-card-body :is(.q1-question-prompt, .q1-question-followup) {
    margin-left: 0 !important;
  }

  /* These rhythm SVGs keep a 14px authored stave inset. Offset only their
     scroll boxes so the first visible staff line meets the toolbar guide. */
  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]:is(
    [data-exam-fragment="2020-G5-1.1a"],
    [data-exam-fragment="2020-G5-1.1b"],
    [data-exam-fragment="2020-G5-1.1c"],
    [data-exam-fragment="2020-G5-1.5"]
  )
    #exam-main .q1-question-card-body > .q1-generated-notation-wrap {
    max-width: 100%;
    left: calc(var(--exam-question-shift) - var(--exam-notation-stave-left));
  }

  body[data-active-screen="exam"][data-exam-question-ui-pilot][data-exam-session-mode]
    #exam-main .q1-answer-card-body > :is(
      .q1-answer-options,
      .q1-fill-answer-list,
      .q7-select-answer-list,
      .drag-answer-stage,
      .enharmonic-choice-answer-options,
      .key-signature-choice-answer-options,
      .scale-clef-choice-answer-options,
      .compound-rewrite-answer-options,
      .rhythm-bar-choice-answer-options,
      .q36-answer-list,
      .music-context-answer-scroll,
      .q1-answer-button
    ) {
    box-sizing: border-box;
    max-width: calc(100% - var(--exam-answer-shift));
    position: relative;
    left: var(--exam-answer-shift);
    margin-left: 0 !important;
  }

  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-main-card-frame:not(.final-info-main-card-frame),
  body[data-active-screen="exam"][data-exam-fragment^="Info_"][data-exam-session-mode]
    .info-action-card-frame {
    padding-left: var(--exam-flat-safe-inline) !important;
  }
}

/*
 * Desktop completion flow.
 * Match the flat full-paper shell: spacing and rules establish hierarchy,
 * while rounded surfaces are reserved for actions and compact status marks.
 * Mobile keeps its existing layout until the separate mobile redesign.
 */
@media (min-width: 961px) {
  .end-test-dialog-overlay,
  .results-score-reveal-overlay {
    padding: 32px;
  }

  .end-test-dialog-overlay {
    background: rgba(22, 33, 61, 0.34);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }

  .results-score-reveal-overlay {
    padding: 0;
    background: #fbfcff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .end-test-dialog {
    width: min(540px, 100%);
    max-height: calc(100vh - 64px);
    padding: 28px 30px 26px;
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 22px 60px rgba(18, 28, 52, 0.2);
    text-align: left;
  }

  /* The exam shell applies a small desktop scale. Keep the longer English
     copy on the same measured dialog width as both Chinese locales. */
  body[data-locale="en-GB"] .end-test-dialog {
    min-width: 343.890625px;
  }

  .end-test-dialog-state-icon {
    display: none;
  }

  .end-test-dialog-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    align-items: center;
    gap: 16px;
  }

  .end-test-dialog-header h2 {
    font-size: 24px;
    letter-spacing: -0.025em;
  }

  .end-test-dialog-close {
    position: static;
    justify-self: end;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 0;
    background: transparent;
    font-size: 26px;
  }

  .end-test-dialog-body {
    padding-left: 0;
  }

  .end-test-dialog-copy {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.65;
  }

  .end-test-unanswered-alert {
    margin-top: 18px;
    padding: 12px 15px;
    border: 0;
    border-left: 3px solid #315df6;
    border-radius: 0;
    color: #3f4d66;
    background: #f3f6fc;
    text-align: left;
  }

  .end-test-dialog-footer {
    margin-top: 22px;
    padding-left: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
  }

  body[data-active-screen][data-activity-mode] .end-test-dialog .end-test-confirm-button,
  body[data-active-screen][data-activity-mode] .end-test-dialog .end-test-cancel-button {
    width: auto;
    height: 46px;
    min-height: 46px;
    border-radius: 8px;
  }

  body[data-active-screen][data-activity-mode] .end-test-dialog .end-test-confirm-button {
    min-width: 136px;
    border: 0;
    background: #315df6;
    box-shadow: none;
  }

  body[data-active-screen][data-activity-mode] .end-test-dialog .end-test-cancel-button {
    min-width: 104px;
    margin-right: 16px;
    order: -1;
    border: 0;
    color: #52617b;
    background: transparent;
    box-shadow: none;
  }

  .end-test-dialog[data-save-state="saving"] {
    width: min(460px, 100%);
    text-align: center;
  }

  .end-test-dialog[data-save-state="saving"] .end-test-dialog-header {
    display: block;
  }

  .end-test-dialog[data-save-state="saving"] .end-test-dialog-state-icon {
    display: grid;
    margin: -6px auto 8px;
  }

  .end-test-dialog[data-save-state="saving"] .end-test-dialog-body {
    padding-left: 0;
  }

  .results-score-reveal-dialog {
    width: min(680px, calc(100% - 64px));
    min-height: min(620px, 100vh);
    max-height: 100vh;
    padding: 54px 32px 44px;
    border: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: auto;
    background: transparent;
    box-shadow: none;
    text-align: center;
    animation: results-end-screen-in 260ms ease-out both;
  }

  .results-score-reveal-art {
    width: 220px;
    height: 170px;
    margin: 0 auto 14px;
    flex: 0 0 auto;
  }

  .results-score-reveal-art img {
    width: 144px;
    filter: drop-shadow(0 18px 24px rgba(49, 93, 246, 0.18));
    animation: results-spirit-pop 720ms 120ms cubic-bezier(0.2, 1.25, 0.36, 1) both;
  }

  .results-score-reveal-note-one {
    left: 12px;
    top: 35px;
    font-size: 22px;
  }

  .results-score-reveal-note-two {
    right: 8px;
    bottom: 20px;
    font-size: 24px;
  }

  .results-score-reveal-spark {
    right: 25px;
    top: 16px;
    font-size: 22px;
  }

  .results-score-reveal-kicker {
    margin: 0;
    font-size: 12px;
  }

  .results-score-reveal-score {
    justify-content: center;
    margin-top: 8px;
  }

  .results-score-reveal-score strong {
    font-size: 68px;
  }

  .results-score-reveal-dialog h2 {
    margin-top: 16px;
    font-size: 28px;
  }

  .results-score-reveal-dialog > p:not(.results-score-reveal-kicker) {
    max-width: 460px;
    margin: 10px auto 0;
  }

  .results-score-reveal-dialog button {
    width: auto;
    min-width: 210px;
    height: 48px;
    margin-top: 26px;
    padding: 0 26px;
    border-radius: 8px;
    background: #315df6;
    box-shadow: none;
  }

  @keyframes results-end-screen-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes results-spirit-pop {
    0% {
      opacity: 0;
      transform: translateX(-50%) translateY(28px) scale(0.5);
    }
    68% {
      opacity: 1;
      transform: translateX(-50%) translateY(-8px) scale(1.08);
    }
    84% {
      transform: translateX(-50%) translateY(3px) scale(0.98);
    }
    100% {
      opacity: 1;
      transform: translateX(-50%) translateY(0) scale(1);
    }
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]),
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .mock-app {
    background: #ffffff;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-stage {
    padding: 0 clamp(38px, 4.2vw, 84px) 48px;
    background: #ffffff;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-page {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 0;
    gap: 0;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(
    .results-header,
    .results-summary-grid,
    .results-category-section,
    .results-practice-guide,
    .results-answer-section
  ) {
    border: 0;
    border-bottom: 1px solid #e5eaf3;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-header {
    padding: 38px 0 28px;
    gap: 26px 34px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-header h1 {
    font-size: clamp(30px, 3vw, 42px);
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-home-button {
    height: 42px;
    min-width: 108px;
    border: 0;
    border-radius: 8px;
    background: #f1f5ff;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-meta {
    padding-top: 22px;
    gap: 0;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-meta div {
    padding: 2px 24px;
    border-left: 1px solid #e5eaf3;
    border-radius: 0;
    background: transparent;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-meta div:first-child {
    padding-left: 0;
    border-left: 0;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-meta dd {
    font-size: 15px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-summary-grid {
    padding: 30px 0;
    grid-template-columns: minmax(340px, 0.9fr) minmax(420px, 1.1fr);
    gap: 0;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-score-panel {
    min-height: 190px;
    padding: 8px clamp(34px, 4vw, 72px) 8px 0;
    border-right: 1px solid #e5eaf3;
    border-radius: 0;
    color: #16213d;
    background: transparent;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-score-label {
    color: #7f8ba2;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-score-number strong {
    color: #315df6;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-score-number span {
    color: #91a0bb;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-achievement {
    margin-top: 8px;
    padding: 0;
    border-radius: 0;
    color: #315df6;
    background: transparent;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-score-panel > .results-score-bar {
    height: 7px;
    margin-top: 22px;
    background: #e9eef8;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-score-panel > .results-score-bar .results-score-fill {
    background: #315df6;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-summary-copy {
    padding-left: clamp(34px, 4vw, 72px);
    gap: 0;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-summary-copy article {
    padding: 22px 28px;
    border: 0;
    border-left: 1px solid #e5eaf3;
    border-radius: 0;
    background: transparent !important;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-summary-copy article:first-child {
    border-left: 0;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-category-section,
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-practice-guide,
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-answer-section {
    margin: 0;
    padding: 32px 0 34px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-section-list {
    margin-top: 22px;
    gap: 0 38px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-section-row {
    min-height: 62px;
    padding: 12px 0;
    border-top: 1px solid #edf1f7;
    border-radius: 0;
    background: transparent;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-section-score {
    height: 24px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-practice-guide-heading {
    margin-bottom: 20px;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-practice-card-list {
    gap: 0;
    border-top: 1px solid #edf1f7;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-practice-card {
    min-height: 136px;
    padding: 20px 28px;
    border: 0;
    border-left: 1px solid #edf1f7;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-practice-card:first-child {
    padding-left: 0;
    border-left: 0;
  }

  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-practice-card:hover,
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-practice-card:focus-visible {
    transform: none;
    background: #f8faff;
    box-shadow: none;
  }
}

/* Completion content sits slightly above the geometric midpoint so the
   illustration, score and action read as one optically centred group. */
@media (min-width: 961px) and (min-height: 680px) {
  .results-score-reveal-dialog {
    transform: translateY(clamp(-52px, -4.5vh, -30px));
  }
}

/*
 * Desktop coloured-paper palettes.
 *
 * Only examination chrome follows these colours: navigation, status marks,
 * timers and action buttons. Authored prompts, answers, form text and music
 * notation are intentionally absent so their original black remains intact.
 */
@media (min-width: 961px) {
  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) {
    --selection-blue: var(--exam-chrome-accent);
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) :is(.instructions-toolbar, .exam-toolbar) {
    border-bottom-color: var(--exam-chrome-line) !important;
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) :is(.instructions-toolbar, .exam-toolbar) .toolbar-brand {
    color: var(--exam-chrome-ink) !important;
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) :is(.instructions-toolbar, .exam-toolbar) .toolbar-button {
    color: var(--exam-chrome-accent) !important;
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) :is(.instructions-toolbar, .exam-toolbar) .toolbar-button:hover,
  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) :is(.instructions-toolbar, .exam-toolbar) :is(
    [data-action="open-nav"],
    .end-button
  ),
  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) :is(.instructions-timer-pill, .timer-pill) {
    color: var(--exam-chrome-accent) !important;
    background: var(--exam-chrome-tint) !important;
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) :is(
    .answer-submit,
    .q1-answer-button,
    [data-action="submit-current-page"],
    .info-main-continue
  ) {
    color: #fff !important;
    border-color: transparent !important;
    background: var(--exam-chrome-accent) !important;
    box-shadow: 0 7px 16px var(--exam-chrome-shadow) !important;
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) .paper-item.completed:not(.current):not(.active) {
    color: var(--exam-chrome-accent-strong) !important;
    border-color: var(--exam-chrome-line) !important;
    background: var(--exam-chrome-tint) !important;
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) .paper-item:is(.current, .active) {
    color: #fff !important;
    border-color: transparent !important;
    background: var(--exam-chrome-accent) !important;
    box-shadow: inset 0 0 0 1px var(--exam-chrome-shadow) !important;
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) :is(.paper-item, .paper-nav-arrow) {
    color: var(--exam-chrome-muted);
    border-color: var(--exam-chrome-line);
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) .wide-stage .exam-bottom-row .bottom-action {
    color: var(--exam-chrome-accent) !important;
    border-color: var(--exam-chrome-line) !important;
    background: var(--exam-chrome-tint) !important;
    box-shadow: none !important;
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) :is(
    .info-main-card-frame,
    .info-action-card-frame,
    .q1-question-card,
    .q1-reference-card
  ) {
    border-bottom-color: var(--exam-chrome-line) !important;
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) .end-test-unanswered-alert {
    border-left-color: var(--exam-chrome-accent);
  }

  body:is(
    [data-active-screen="instructions"][data-activity-mode="exam"],
    [data-active-screen="exam"][data-exam-session-mode]
  ) .end-test-confirm-button {
    background: var(--exam-chrome-accent) !important;
  }
}

/* Return-to-home confirmation uses the same compact desktop dialog language
   as the end-test confirmation. The arrow tile is omitted because the title
   already explains the action. */
@media (min-width: 961px) {
  #return-home-dialog {
    padding: 32px;
    background: rgba(22, 33, 61, 0.34);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }

  #return-home-dialog .exam-confirm-dialog {
    width: min(500px, 100%);
    height: auto;
    min-height: 0;
    max-height: calc(100vh - 64px);
    padding: 26px 28px 22px;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 22px 60px rgba(18, 28, 52, 0.2);
    text-align: left;
  }

  #return-home-dialog .exam-confirm-dialog-icon {
    display: none;
  }

  #return-home-dialog .exam-confirm-dialog-close {
    top: 20px;
    right: 24px;
    width: 32px;
    height: 32px;
    border-radius: 0;
    background: transparent;
    font-size: 26px;
  }

  #return-home-dialog .exam-confirm-dialog h2 {
    padding-right: 48px;
    font-size: 24px;
    letter-spacing: -0.025em;
  }

  #return-home-dialog .exam-confirm-dialog p {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.65;
  }

  /* Keep the complete English explanation on one desktop line so changing
     language does not make this compact dialog jump in height. */
  body[data-locale="en-GB"] #return-home-dialog .exam-confirm-dialog p {
    white-space: nowrap;
    font-size: 12px;
    line-height: 24.75px;
  }

  #return-home-dialog .exam-confirm-dialog footer {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
  }

  #return-home-dialog .exam-confirm-dialog-button {
    width: auto;
    height: 46px;
    min-height: 46px;
    border-radius: 8px;
  }

  #return-home-dialog .exam-confirm-dialog-cancel {
    min-width: 104px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }

  #return-home-dialog .exam-confirm-dialog-primary {
    min-width: 136px;
  }
}

/*
 * Coloured-paper completion surfaces.
 *
 * These rules deliberately stay outside authored exam content. They colour
 * only the save/return confirmation and the post-test score reveal, while the
 * question copy, answers, input controls and notation retain their own inks.
 * Classic white keeps its existing presentation unchanged.
 */
body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  #return-home-dialog .exam-confirm-dialog {
  border-color: color-mix(in srgb, var(--exam-chrome-line) 72%, #fff);
  background: color-mix(in srgb, var(--test-surface) 84%, #fff);
  box-shadow: 0 28px 74px color-mix(in srgb, var(--exam-chrome-shadow) 76%, transparent);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  #return-home-dialog .exam-confirm-dialog-close {
  color: var(--exam-chrome-muted);
  background: transparent;
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  #return-home-dialog .exam-confirm-dialog-icon {
  color: var(--exam-chrome-accent);
  background: var(--exam-chrome-tint);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  #return-home-dialog .exam-confirm-dialog h2 {
  color: var(--exam-chrome-ink);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  #return-home-dialog .exam-confirm-dialog p {
  color: var(--exam-chrome-muted);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  #return-home-dialog .exam-confirm-dialog-cancel {
  color: var(--exam-chrome-accent);
  border-color: transparent;
  background: transparent;
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  #return-home-dialog .exam-confirm-dialog-primary {
  color: #fff;
  background: var(--exam-chrome-accent);
  box-shadow: 0 10px 22px var(--exam-chrome-shadow);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]
  .results-score-reveal-overlay {
  background: radial-gradient(
    circle at 50% 32%,
    var(--exam-chrome-tint) 0%,
    var(--test-surface) 42%,
    var(--test-surface) 100%
  );
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]
  .results-score-reveal-art img {
  opacity: 1;
  mix-blend-mode: normal !important;
  filter: drop-shadow(0 18px 24px var(--exam-chrome-shadow));
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]
  :is(.results-score-reveal-note-one, .results-score-reveal-note-two) {
  color: var(--exam-chrome-accent);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]
  .results-score-reveal-spark {
  color: var(--exam-chrome-accent-strong);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]
  .results-score-reveal-kicker,
body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]
  .results-score-reveal-dialog > p:not(.results-score-reveal-kicker),
body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]
  .results-score-reveal-score span {
  color: var(--exam-chrome-muted);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]
  .results-score-reveal-score strong {
  color: var(--exam-chrome-accent);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]
  .results-score-reveal-dialog h2 {
  color: var(--exam-chrome-ink);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]
  .results-score-reveal-dialog button {
  color: #fff;
  background: var(--exam-chrome-accent);
  box-shadow: 0 12px 26px var(--exam-chrome-shadow);
}

/* Detailed results keep their flat information hierarchy while adopting the
   selected paper palette. This remains results-only and cannot recolour exam
   prompts, answer controls or music notation. */
@media (min-width: 961px) {
html:has(body[data-active-screen="results"][data-theme="warm"]) {
  --results-root-surface: #fff8d6;
  --results-scroll-thumb: #b99b58;
}

html:has(body[data-active-screen="results"][data-theme="cool"]) {
  --results-root-surface: #e8f2ff;
  --results-scroll-thumb: #86a6cc;
}

html:has(body[data-active-screen="results"][data-theme="pink"]) {
  --results-root-surface: #fbeaf4;
  --results-scroll-thumb: #c789aa;
}

html:has(body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"])) {
  background: var(--results-root-surface);
  scrollbar-color: var(--results-scroll-thumb) var(--results-root-surface);
}

html:has(body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]))::-webkit-scrollbar-track {
  background: var(--results-root-surface);
}

html:has(body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]))::-webkit-scrollbar-thumb {
  border-color: var(--results-root-surface);
  background: var(--results-scroll-thumb);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]),
body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]) .mock-app,
body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-stage {
  color: var(--exam-chrome-ink);
  background: var(--test-surface) !important;
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(
  .results-header,
  .results-summary-grid,
  .results-category-section,
  .results-practice-guide,
  .results-answer-section,
  .results-meta,
  .results-score-panel,
  .results-summary-copy article,
  .results-section-row,
  .results-practice-card-list,
  .results-practice-card,
  .results-answer-table-wrap
) {
  border-color: var(--exam-chrome-line);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(
  .results-eyebrow,
  .results-section-heading > p,
  .results-practice-guide-heading > div > p,
  .results-practice-card-kicker,
  .results-practice-card-action,
  .results-score-number strong,
  .results-achievement
) {
  color: var(--exam-chrome-accent);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(
  .results-header h1,
  .results-meta dd,
  .results-summary-copy strong,
  .results-section-heading h2,
  .results-category-section h2,
  .results-answer-section h2,
  .results-section-name,
  .results-score-text,
  .results-practice-guide-heading h2,
  .results-practice-card strong
) {
  color: var(--exam-chrome-ink);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(
  .results-saved-message,
  .results-meta dt,
  .results-score-label,
  .results-score-number span,
  .results-summary-copy span,
  .results-practice-guide-message,
  .results-practice-card-score
) {
  color: var(--exam-chrome-muted);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-home-button {
  color: var(--exam-chrome-accent);
  border-color: var(--exam-chrome-line);
  background: var(--exam-chrome-tint);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(
  .results-meta div,
  .results-summary-copy article,
  .results-section-row,
  .results-practice-card
) {
  background: transparent !important;
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(
  .results-score-panel > .results-score-bar,
  .results-section-score
) {
  color: var(--exam-chrome-ink);
  background: var(--exam-chrome-tint);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-score-fill {
  background: var(--exam-chrome-accent) !important;
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-section-score .results-score-fill {
  background: color-mix(in srgb, var(--exam-chrome-accent) 48%, var(--exam-chrome-tint)) !important;
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-practice-card:hover,
body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-practice-card:focus-visible {
  background: var(--exam-chrome-tint) !important;
}
}

/* Focused practice now shares the responsive mock-exam workspace.  Only the
   practice-specific controls and toolbar copy differ; question renderers,
   notation sizing and drag/drop geometry remain untouched. */
@media (max-width: 960px) {
  body[data-active-screen="exam"][data-activity-mode="single-practice"] {
    background: var(--test-surface);
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .mock-app {
    background: var(--test-surface);
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .wide-stage {
    background: transparent;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-main {
    gap: 16px;
    padding: 16px 4px 14px;
    background: transparent;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] [data-action="open-nav"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: var(--exam-chrome-accent);
    border-color: var(--exam-chrome-line);
    background: var(--exam-chrome-tint);
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-main :is(
    .exam-card,
    .info-frame,
    .info-main-card-frame,
    .info-action-card-frame,
    .q1-question-card,
    .q1-reference-card,
    .q1-answer-card,
    .select-page-shell,
    .capture-page-wrap,
    .card-content,
    .q1-question-card-body,
    .q1-reference-card-body,
    .q1-answer-card-body
  ) {
    background-color: var(--test-surface) !important;
  }
}

@media (max-width: 760px) {
  body[data-active-screen="exam"][data-activity-mode="single-practice"] .wide-stage,
  body[data-active-screen="exam"][data-activity-mode="single-practice"][data-exam-shell="unified-question"]
    .wide-stage[data-screen="exam"] {
    height: 100dvh;
    padding: 0;
    background: transparent !important;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .wide-shell,
  body[data-active-screen="exam"][data-activity-mode="single-practice"][data-exam-shell="unified-question"]
    .wide-stage[data-screen="exam"] .wide-shell {
    height: 100dvh;
    padding: 9px 10px 10px !important;
    background: transparent !important;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar {
    margin: 0;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(43, 60, 100, 0.06);
    border-radius: 18px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .toolbar-left {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .toolbar-brand {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    font-size: 14px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] :is(
    #exam-prev-button,
    #exam-next-button,
    [data-action="open-nav"]
  ) {
    display: inline-flex !important;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: center;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-main {
    gap: 12px;
    padding: 12px 2px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-main :is(
    .exam-card,
    .info-frame,
    .info-main-card-frame,
    .info-action-card-frame,
    .q1-question-card,
    .q1-reference-card,
    .q1-answer-card,
    .select-page-shell,
    .capture-page-wrap
  ) {
    border-radius: 18px;
  }
}

/* Focused-practice toolbar actions mirror the mock exam.  It keeps the two
   relevant global actions and drops the legacy practice-menu shortcut. */
body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-return-button {
  display: none !important;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar .toolbar-right {
  display: flex !important;
  align-items: center;
  gap: 6px;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar .toolbar-right > * {
  display: none !important;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar .toolbar-right > :is(
  .exam-content-zoom-controls,
  [data-action="go-theme"],
  [data-action="return-home-save-draft"]
) {
  display: inline-flex !important;
}

/* Keep both toolbar groups on the same control rhythm.  The right-side
   actions are revealed after the legacy practice controls are filtered, so
   lock their box geometry alongside Previous / Next. */
body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar :is(
  #exam-prev-button,
  #exam-next-button,
  [data-action="open-nav"],
  [data-action="go-theme"],
  [data-action="return-home-save-draft"]
) {
  box-sizing: border-box;
  height: 40px !important;
  min-height: 40px;
  margin-block: 0;
  padding-block: 0;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar :is(
  .toolbar-brand,
  .toolbar-button
) {
  color: var(--exam-chrome-accent);
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar .toolbar-brand {
  color: var(--exam-chrome-ink);
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar :is(
  [data-action="open-nav"],
  .toolbar-button:hover
) {
  background: var(--exam-chrome-tint);
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar #exam-next-button:not(:disabled) {
  color: var(--exam-chrome-accent);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

@media (min-width: 961px) {
  body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar #exam-prev-button {
    color: var(--exam-chrome-accent);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }
}

@media (max-width: 900px) {
  body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    background: color-mix(in srgb, var(--test-surface) 92%, #fff);
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar .toolbar-right {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar #exam-next-button:not(:disabled) {
    color: #fff;
    background: var(--exam-chrome-accent);
    box-shadow: 0 8px 18px var(--exam-chrome-shadow);
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .exam-toolbar .toolbar-right > :is(
    [data-action="go-theme"],
    [data-action="return-home-save-draft"]
  ) {
    min-width: 0;
    flex: 1 1 0;
    justify-content: center;
  }
}

/* Compact, palette-aware practice feedback.  Its supportive retry state uses
   the selected interface accent instead of an unrelated alert red. */
body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-dialog {
  width: min(360px, calc(100vw - 36px));
  padding: 20px 22px 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 52px color-mix(in srgb, var(--exam-chrome-shadow) 70%, rgba(22, 40, 92, 0.12));
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="exam"][data-activity-mode="single-practice"]
  .single-practice-result-dialog {
  background: color-mix(in srgb, var(--test-surface) 28%, #fff);
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-orbit {
  width: 148px;
  height: 128px;
  margin-top: -4px;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--exam-chrome-tint) 78%, transparent),
    color-mix(in srgb, var(--exam-chrome-tint) 22%, transparent) 58%,
    transparent 72%
  );
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-mascot {
  width: 124px;
  height: 124px;
  filter: drop-shadow(0 14px 18px var(--exam-chrome-shadow));
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-kicker,
body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-message,
body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-dismiss-hint {
  color: var(--exam-chrome-muted);
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-dialog h2,
body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-overlay:is(
  .is-incorrect,
  .is-unanswered
) .single-practice-result-dialog h2 {
  color: var(--exam-chrome-accent);
}

body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-score {
  color: var(--exam-chrome-accent-strong);
  background: var(--exam-chrome-tint);
}

@media (max-width: 760px) {
  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-dialog {
    width: min(326px, calc(100vw - 44px));
    padding: 14px 16px 15px;
    border-radius: 20px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-orbit {
    width: 116px;
    height: 102px;
    margin-top: -3px;
  }

  body[data-active-screen="exam"][data-activity-mode="single-practice"] .single-practice-result-mascot {
    width: 100px;
    height: 100px;
  }
}

/* The practice summary deliberately shares the final-score reveal component.
   Only the displayed measure differs: one accuracy and the number practised. */
.single-practice-summary-overlay {
  z-index: 12010;
}

.single-practice-summary-dialog .single-practice-summary-accuracy strong {
  letter-spacing: -0.045em;
}

.single-practice-summary-dialog .single-practice-summary-metric-label {
  align-self: center;
  margin-right: 2px;
  color: #66738c;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  .single-practice-summary-overlay {
  background: radial-gradient(
    circle at 50% 32%,
    var(--exam-chrome-tint) 0%,
    var(--test-surface) 42%,
    var(--test-surface) 100%
  );
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  .single-practice-summary-dialog .results-score-reveal-art img {
  opacity: 1;
  mix-blend-mode: normal !important;
  filter: drop-shadow(0 18px 24px var(--exam-chrome-shadow));
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  .single-practice-summary-dialog :is(.results-score-reveal-note-one, .results-score-reveal-note-two) {
  color: var(--exam-chrome-accent);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  .single-practice-summary-dialog .results-score-reveal-spark {
  color: var(--exam-chrome-accent-strong);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  .single-practice-summary-dialog :is(
    .results-score-reveal-kicker,
    .results-score-reveal-score span
  ),
body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  .single-practice-summary-dialog > p:not(.results-score-reveal-kicker) {
  color: var(--exam-chrome-muted);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  .single-practice-summary-dialog .results-score-reveal-score strong {
  color: var(--exam-chrome-accent);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  .single-practice-summary-dialog h2 {
  color: var(--exam-chrome-ink);
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])
  .single-practice-summary-dialog button {
  color: #fff;
  background: var(--exam-chrome-accent);
  box-shadow: 0 12px 26px var(--exam-chrome-shadow);
}

/* Questions-to-review hub now follows the same card system and spacing as
   focused practice while preserving counts and last-error information. */
body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories {
  padding: 25px;
  border-radius: 28px;
}

body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
  height: 76px;
  margin-bottom: 18px;
  padding: 0 2px 18px;
}

body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header > span {
  padding: 7px 10px;
  border-radius: 11px;
  color: #315df6;
  background: #edf2ff;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
}

body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button {
  min-height: 78px;
  gap: 13px;
  padding: 11px 13px;
  border: 1px solid #edf0f6;
  border-radius: 18px;
  background: #fbfcff;
}

body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button:focus-visible {
  border-color: rgba(49, 93, 246, 0.22);
  background: #fff;
  box-shadow: 0 10px 22px rgba(45, 67, 128, 0.08);
}

@media (hover: hover) and (pointer: fine) {
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button:not(:disabled):hover {
    transform: translateY(-1px);
    border-color: rgba(49, 93, 246, 0.22);
    background: #fff;
    box-shadow: 0 10px 22px rgba(45, 67, 128, 0.08);
  }
}

/* Wrong-review questions share the same examination workspace.  The overview
   is available from the middle toolbar action, so it is not repeated above
   every question. */
body[data-active-screen="exam"][data-activity-mode="wrong-review"] {
  --selection-blue: var(--exam-chrome-accent);
  color: var(--exam-chrome-ink);
  background: var(--test-surface);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] :is(
  .mock-app,
  .wide-stage,
  .wide-shell,
  .exam-toolbar,
  .exam-main
) {
  background: var(--test-surface) !important;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-main:not(.is-teacher-review) {
  display: contents;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar .toolbar-right {
  display: flex !important;
  align-items: center;
  gap: 6px;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar .toolbar-right > * {
  display: none !important;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar .toolbar-right > :is(
  .exam-content-zoom-controls,
  [data-action="go-theme"],
  [data-action="return-home-save-draft"]
) {
  display: inline-flex !important;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar [data-action="open-nav"] {
  display: inline-flex !important;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar :is(
  #exam-prev-button,
  #exam-next-button,
  [data-action="open-nav"],
  [data-action="go-theme"],
  [data-action="return-home-save-draft"]
) {
  box-sizing: border-box;
  height: 40px !important;
  min-height: 40px;
  margin-block: 0;
  padding-block: 0;
  align-items: center;
  justify-content: center;
  color: var(--exam-chrome-accent);
  border-color: transparent;
  line-height: 1;
}

/* Single practice and wrong-review reuse the tested exam magnifier on desktop
   and phone landscape. Phone portrait deliberately keeps the compact toolbar,
   matching the mock-exam behavior. */
@media (max-width: 760px) and (orientation: portrait) {
  body[data-active-screen="exam"]:is(
    [data-activity-mode="single-practice"],
    [data-activity-mode="wrong-review"]
  ) .exam-toolbar .toolbar-right > .exam-content-zoom-controls {
    display: none !important;
  }
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar .toolbar-brand {
  color: var(--exam-chrome-ink);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar :is(
  [data-action="open-nav"],
  .toolbar-button:hover
) {
  background: var(--exam-chrome-tint);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar :is(
  #exam-prev-button,
  #exam-next-button
):not(:disabled) {
  color: var(--exam-chrome-accent);
  background: transparent;
  box-shadow: none;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-main :is(
  .exam-card,
  .info-frame,
  .info-main-card-frame,
  .info-action-card-frame,
  .q1-question-card,
  .q1-reference-card,
  .q1-answer-card,
  .select-page-shell,
  .capture-page-wrap,
  .card-content,
  .q1-question-card-body,
  .q1-reference-card-body,
  .q1-answer-card-body
) {
  background-color: var(--test-surface) !important;
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] :is(
  .answer-submit,
  .q1-answer-button,
  [data-action="submit-current-page"]
) {
  color: #fff;
  border-color: transparent !important;
  background: var(--exam-chrome-accent);
  box-shadow: 0 9px 20px var(--exam-chrome-shadow);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-dialog {
  width: min(360px, calc(100vw - 36px));
  padding: 20px 22px 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 52px color-mix(in srgb, var(--exam-chrome-shadow) 70%, rgba(22, 40, 92, 0.12));
}

body:is([data-theme="warm"], [data-theme="cool"], [data-theme="pink"])[data-active-screen="exam"][data-activity-mode="wrong-review"]
  .wrong-review-result-dialog {
  background: color-mix(in srgb, var(--test-surface) 28%, #fff);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-orbit {
  width: 148px;
  height: 128px;
  margin-top: -4px;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--exam-chrome-tint) 78%, transparent),
    color-mix(in srgb, var(--exam-chrome-tint) 22%, transparent) 58%,
    transparent 72%
  );
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-mascot {
  width: 124px;
  height: 124px;
  filter: drop-shadow(0 14px 18px var(--exam-chrome-shadow));
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] :is(
  .wrong-review-result-kicker,
  .wrong-review-result-message,
  .wrong-review-result-dismiss-hint
) {
  color: var(--exam-chrome-muted);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-overlay:is(
  .is-incorrect,
  .is-unanswered
) .wrong-review-result-dialog h2 {
  color: var(--exam-chrome-accent);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-score {
  color: var(--exam-chrome-accent-strong);
  background: var(--exam-chrome-tint);
}

body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-button.is-retry {
  color: #fff;
  border-color: transparent;
  background: var(--exam-chrome-accent);
  box-shadow: 0 10px 22px var(--exam-chrome-shadow);
}

@media (min-width: 961px) {
  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wide-stage[data-screen="exam"] {
    height: 100vh;
    padding: 0 0 20px 24px !important;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wide-stage[data-screen="exam"] > .wide-shell {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 75px;
    padding: 14px clamp(24px, 2.4vw, 56px);
    align-items: center;
    gap: 24px;
    border: 0;
    border-bottom: 1px solid var(--exam-chrome-line);
    border-radius: 0;
    box-shadow: none;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-main {
    padding: 0 4px 16px;
  }
}

@media (max-width: 900px) {
  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    background: color-mix(in srgb, var(--test-surface) 92%, #fff) !important;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar .toolbar-right {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories {
    padding: 20px 17px;
    border-radius: 24px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header {
    height: 64px;
    margin-bottom: 9px;
    padding-bottom: 15px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button {
    min-height: 76px;
    padding: 10px 3px;
    border: 0;
    border-bottom: 1px solid var(--home-line);
    border-radius: 0;
    background: transparent;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button:last-child {
    border-bottom: 0;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wide-stage,
  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wide-stage[data-screen="exam"] {
    height: 100dvh;
    padding: 0;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wide-shell,
  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wide-stage[data-screen="exam"] .wide-shell {
    height: 100dvh;
    padding: 9px 10px 10px !important;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar {
    margin: 0;
    gap: 8px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--exam-chrome-line) 70%, transparent);
    border-radius: 18px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .toolbar-left {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .toolbar-brand {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    font-size: 14px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] :is(
    #exam-prev-button,
    #exam-next-button,
    [data-action="open-nav"]
  ) {
    display: inline-flex !important;
    width: 100%;
    min-width: 0;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-toolbar .toolbar-right > :is(
    [data-action="go-theme"],
    [data-action="return-home-save-draft"]
  ) {
    min-width: 0;
    flex: 1 1 0;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .exam-main {
    gap: 12px;
    padding: 12px 2px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-main :is(
    .exam-card,
    .info-main-card-frame,
    .info-action-card-frame,
    .q1-question-card,
    .q1-reference-card,
    .q1-answer-card,
    .select-page-shell,
    .capture-page-wrap
  ) {
    border-radius: 18px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-dialog {
    width: min(326px, calc(100vw - 44px));
    padding: 14px 16px 15px;
    border-radius: 20px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-orbit {
    width: 116px;
    height: 102px;
    margin-top: -3px;
  }

  body[data-active-screen="exam"][data-activity-mode="wrong-review"] .wrong-review-result-mascot {
    width: 100px;
    height: 100px;
  }
}

/* Focused practice and wrong-answer review already have linear previous/next
   flows, so the mock-paper overview control is intentionally omitted. */
body[data-active-screen="exam"]:is(
  [data-activity-mode="single-practice"],
  [data-activity-mode="wrong-review"]
) .exam-toolbar [data-action="open-nav"] {
  display: none !important;
}

@media (max-width: 760px) {
  body[data-active-screen="exam"]:is(
    [data-activity-mode="single-practice"],
    [data-activity-mode="wrong-review"]
  ) .toolbar-left {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Learning calendar: progress dashboard aligned with the current XiYue UI. */
body[data-active-screen="learning-calendar"] .learning-calendar-stage {
  padding: 28px 24px 56px;
  background: transparent;
}

body[data-active-screen="learning-calendar"] .learning-calendar-shell {
  display: grid;
  width: min(1280px, 100%);
  gap: 18px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-titlebar {
  min-height: 60px;
  margin: 0;
  gap: 13px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-titlebar > button {
  width: 46px;
  height: 46px;
  color: var(--xiyue-blue-600);
  border: 1px solid var(--xiyue-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
  font-size: 25px;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

body[data-active-screen="learning-calendar"] .learning-calendar-titlebar > button:hover {
  border-color: #ccd8ff;
  background: var(--xiyue-blue-050);
  transform: translateX(-1px);
}

body[data-active-screen="learning-calendar"] .learning-calendar-titlebar small {
  color: #8d98ad;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .16em;
}

body[data-active-screen="learning-calendar"] .learning-calendar-titlebar h1 {
  margin-top: 3px;
  color: var(--xiyue-ink);
  font-size: 27px;
  letter-spacing: -.035em;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary {
  position: relative;
  display: grid;
  min-height: 198px;
  box-sizing: border-box;
  grid-template-columns: minmax(260px, .72fr) minmax(420px, 1.28fr);
  grid-template-rows: 1fr;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 27px 238px 25px 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 28px;
  background:
    radial-gradient(circle at 78% 4%, rgba(255, 255, 255, .19), transparent 15rem),
    linear-gradient(135deg, #315df6 0%, #477ff6 64%, #64a8f4 100%);
  box-shadow: 0 18px 42px rgba(49, 93, 246, .18);
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary::after {
  content: "";
  position: absolute;
  right: -72px;
  bottom: -148px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy,
body[data-active-screen="learning-calendar"] .learning-calendar-summary-stats {
  position: relative;
  z-index: 2;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy > small {
  color: rgba(255, 255, 255, .74);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .16em;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy h2 {
  margin: 6px 0 0;
  color: #fff;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -.035em;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy p {
  max-width: 540px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.6;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-self: end;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary article {
  display: grid;
  min-height: 63px;
  box-sizing: border-box;
  grid-template-columns: 34px minmax(0, 1fr);
  place-content: center stretch;
  align-items: center;
  justify-items: stretch;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  background: rgba(255, 255, 255, .13);
  box-shadow: none;
  backdrop-filter: blur(6px);
}

body[data-active-screen="learning-calendar"] .learning-calendar-stat-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  border-radius: 11px;
  background: rgba(255, 255, 255, .16);
}

body[data-active-screen="learning-calendar"] .learning-calendar-stat-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary article > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.1;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary article small {
  color: rgba(255, 255, 255, .72);
  font-size: 8px;
  line-height: 1.35;
  white-space: normal;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-art {
  position: absolute;
  z-index: 1;
  right: 29px;
  bottom: -17px;
  width: 190px;
  height: 190px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-art img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 15px 20px rgba(20, 54, 145, .24));
}

body[data-active-screen="learning-calendar"] :is(.learning-calendar-summary-note, .learning-calendar-summary-spark) {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 18px rgba(33, 64, 145, .16);
  font-weight: 850;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-note.note-one {
  top: 22px;
  left: 0;
  width: 32px;
  height: 32px;
  color: #785bd6;
  font-size: 13px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-note.note-two {
  top: 3px;
  right: 4px;
  width: 38px;
  height: 38px;
  color: #315df6;
  font-size: 15px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-spark {
  top: 55px;
  right: 0;
  width: 27px;
  height: 27px;
  color: #19a987;
  font-size: 12px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .72fr);
  gap: 18px;
}

body[data-active-screen="learning-calendar"] :is(.learning-calendar-card, .learning-day-detail) {
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid var(--xiyue-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(45, 67, 128, .055);
}

body[data-active-screen="learning-calendar"] .learning-calendar-card > header {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-month-navigation {
  display: grid;
  min-width: min(380px, 54%);
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-card > header button {
  width: 40px;
  height: 40px;
  color: var(--xiyue-blue-600);
  border: 1px solid #dfe6f5;
  border-radius: 12px;
  background: var(--xiyue-blue-050);
  font-size: 22px;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

body[data-active-screen="learning-calendar"] .learning-calendar-card > header button:hover {
  border-color: #cbd7ff;
  background: var(--xiyue-blue-100);
  transform: translateY(-1px);
}

body[data-active-screen="learning-calendar"] .learning-calendar-card h2 {
  color: var(--xiyue-ink);
  font-size: 18px;
  letter-spacing: -.02em;
}

body[data-active-screen="learning-calendar"] .learning-calendar-legend {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  color: #7a8499;
  font-size: 9px;
  font-weight: 700;
}

body[data-active-screen="learning-calendar"] .learning-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

body[data-active-screen="learning-calendar"] .learning-calendar-legend span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ab58f;
}

body[data-active-screen="learning-calendar"] .learning-calendar-legend .is-today::before {
  background: var(--xiyue-blue-600);
}

body[data-active-screen="learning-calendar"] :is(.learning-calendar-weekdays, .learning-calendar-grid) {
  gap: 7px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-weekdays {
  margin: 22px 0 9px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-weekdays span {
  color: #929caf;
  font-size: 9px;
  font-weight: 750;
}

body[data-active-screen="learning-calendar"] :is(.learning-calendar-day, .learning-calendar-spacer) {
  min-height: 70px;
  aspect-ratio: auto;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day {
  position: relative;
  display: flex;
  box-sizing: border-box;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 12px;
  color: #69758d;
  border: 1px solid transparent;
  border-radius: 13px;
  background: #f7f9fc;
  font-size: 10px;
  font-weight: 800;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day:hover {
  border-color: #d7e0f2;
  background: #f2f5fb;
  transform: translateY(-1px);
}

body[data-active-screen="learning-calendar"] .learning-calendar-day.is-learned {
  color: #138269;
  border-color: #d8f2e9;
  background: #ecfaf6;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day.is-learned::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #27b58e;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day.is-today {
  color: var(--xiyue-blue-600);
  border-color: #cdd9ff;
  background: var(--xiyue-blue-050);
  box-shadow: none;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day.is-selected {
  color: #fff;
  border-color: var(--xiyue-blue-600);
  background: var(--xiyue-blue-600);
  box-shadow: 0 8px 18px rgba(49, 93, 246, .2);
}

body[data-active-screen="learning-calendar"] .learning-calendar-day.is-selected::after {
  background: #fff;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day:focus-visible,
body[data-active-screen="learning-calendar"] .learning-calendar-card > header button:focus-visible,
body[data-active-screen="learning-calendar"] .learning-calendar-titlebar > button:focus-visible {
  outline: 3px solid rgba(49, 93, 246, .22);
  outline-offset: 2px;
}

body[data-active-screen="learning-calendar"] .learning-day-detail {
  position: sticky;
  top: 20px;
  min-height: 330px;
}

body[data-active-screen="learning-calendar"] .learning-day-detail > small {
  color: var(--xiyue-blue-600);
  font-size: 9px;
  letter-spacing: .15em;
}

body[data-active-screen="learning-calendar"] .learning-day-detail h2 {
  margin-top: 7px;
  color: var(--xiyue-ink);
  font-size: 22px;
  letter-spacing: -.025em;
}

body[data-active-screen="learning-calendar"] .learning-day-detail > p {
  margin: 5px 0 0;
  color: #8791a6;
  font-size: 10px;
}

body[data-active-screen="learning-calendar"] .learning-day-overview {
  min-height: 62px;
  gap: 7px;
  margin-top: 17px;
}

body[data-active-screen="learning-calendar"] .learning-day-overview > span {
  align-content: center;
  padding: 9px 4px;
  border: 1px solid #edf0f6;
  border-radius: 12px;
  background: #f8f9fc;
}

body[data-active-screen="learning-calendar"] .learning-day-overview strong {
  color: var(--xiyue-ink);
  font-size: 15px;
}

body[data-active-screen="learning-calendar"] .learning-day-overview small {
  color: #8791a6;
  font-size: 8px;
}

body[data-active-screen="learning-calendar"] .learning-day-activity {
  position: relative;
  gap: 7px;
  margin-top: 11px;
  padding: 13px 13px 13px 16px;
  overflow: hidden;
  border: 1px solid #e7ecf6;
  border-radius: 14px;
  background: #fbfcff;
}

body[data-active-screen="learning-calendar"] .learning-day-activity::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--xiyue-blue-600);
}

body[data-active-screen="learning-calendar"] .learning-day-activity[data-activity-type="single-practice"]::before {
  background: #27ad8a;
}

body[data-active-screen="learning-calendar"] .learning-day-activity[data-activity-type="wrong-review"]::before {
  background: #d9962a;
}

body[data-active-screen="learning-calendar"] .learning-day-activity[data-activity-type="learning-materials"]::before {
  background: #785bd6;
}

body[data-active-screen="learning-calendar"] .learning-day-activity.is-in-progress {
  border-color: #cfdaff;
  background: #f7f9ff;
}

body[data-active-screen="learning-calendar"] .learning-day-activity header strong {
  color: var(--xiyue-ink);
  font-size: 11px;
}

body[data-active-screen="learning-calendar"] .learning-day-activity header span {
  color: var(--xiyue-blue-600);
  background: var(--xiyue-blue-100);
}

body[data-active-screen="learning-calendar"] .learning-day-activity p {
  color: #68748c;
  font-size: 9px;
  line-height: 1.6;
}

body[data-active-screen="learning-calendar"] .learning-day-empty {
  display: grid;
  min-height: 190px;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: #9aa4b6;
  text-align: center;
}

body[data-active-screen="learning-calendar"] .learning-day-empty span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--xiyue-blue-600);
  border-radius: 15px;
  background: var(--xiyue-blue-050);
  font-size: 19px;
}

body[data-active-screen="learning-calendar"] .learning-day-empty p {
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
}

@media (max-width: 960px) {
  body[data-active-screen="learning-calendar"] .learning-calendar-summary {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: stretch;
    gap: 14px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy {
    max-width: 62%;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-layout {
    grid-template-columns: 1fr;
  }

  body[data-active-screen="learning-calendar"] .learning-day-detail {
    position: static;
  }
}

@media (max-width: 760px) {
  body[data-active-screen="learning-calendar"] .learning-calendar-stage {
    padding: 17px 15px 42px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-shell {
    gap: 12px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-titlebar {
    height: 52px;
    min-height: 52px;
    gap: 11px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-titlebar > button {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-titlebar h1 {
    font-size: 23px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary {
    min-height: 198px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 12px;
    padding: 18px 16px 15px;
    border-radius: 24px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy {
    max-width: 64%;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy > small {
    font-size: 8px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy h2 {
    margin-top: 5px;
    font-size: 19px;
    line-height: 1.16;
    white-space: nowrap;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy p {
    margin-top: 6px;
    font-size: 8px;
    line-height: 1.45;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-stats {
    gap: 5px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary article {
    min-height: 55px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
    padding: 8px 3px;
    border-radius: 13px;
    text-align: center;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-stat-icon {
    display: none;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary article > span:last-child {
    justify-items: center;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary strong {
    font-size: 15px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary article small {
    max-width: 96px;
    font-size: 7px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-art {
    right: 8px;
    top: 1px;
    bottom: auto;
    width: 126px;
    height: 126px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-art img {
    width: 118px;
    height: 118px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-note.note-one {
    top: 19px;
    width: 25px;
    height: 25px;
    font-size: 11px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-note.note-two {
    right: 3px;
    width: 29px;
    height: 29px;
    font-size: 12px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-spark {
    top: 43px;
    width: 22px;
    height: 22px;
    font-size: 10px;
  }

  body[data-active-screen="learning-calendar"] :is(.learning-calendar-card, .learning-day-detail) {
    padding: 16px 12px;
    border-radius: 22px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-card > header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-month-navigation {
    width: 100%;
    min-width: 0;
    grid-template-columns: 38px 1fr 38px;
    gap: 7px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-card > header button {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-card h2 {
    font-size: 17px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-legend {
    justify-content: center;
    gap: 13px;
    font-size: 8px;
  }

  body[data-active-screen="learning-calendar"] :is(.learning-calendar-weekdays, .learning-calendar-grid) {
    gap: 4px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-weekdays {
    margin: 15px 0 7px;
  }

  body[data-active-screen="learning-calendar"] :is(.learning-calendar-day, .learning-calendar-spacer) {
    min-height: 40px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-day {
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 10px;
    font-size: 9px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-day.is-learned::after {
    right: 6px;
    bottom: 5px;
    width: 4px;
    height: 4px;
  }

  body[data-active-screen="learning-calendar"] .learning-day-detail {
    min-height: 250px;
  }
}

/* Learning calendar: flat examination/result-page presentation. */
body[data-active-screen="learning-calendar"],
body[data-active-screen="learning-calendar"] .mock-app,
body[data-active-screen="learning-calendar"] .learning-calendar-stage {
  color: var(--xiyue-ink);
  background: #fff;
}

body[data-active-screen="learning-calendar"] .learning-calendar-stage {
  min-height: 100vh;
  padding: 0 0 56px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-toolbar {
  min-height: 75px;
  border-bottom: 1px solid var(--xiyue-line);
  background: #fff;
}

body[data-active-screen="learning-calendar"] .learning-calendar-toolbar-inner {
  display: flex;
  width: min(1360px, 100%);
  min-height: 75px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 14px clamp(24px, 4vw, 64px);
}

body[data-active-screen="learning-calendar"] .learning-calendar-toolbar h1 {
  margin: 0;
  color: var(--xiyue-ink);
  font-size: 14px;
  font-weight: 820;
  letter-spacing: -.015em;
}

body[data-active-screen="learning-calendar"] .learning-calendar-toolbar button {
  height: 40px;
  padding: 0 13px;
  color: var(--xiyue-blue-600);
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 750;
}

body[data-active-screen="learning-calendar"] .learning-calendar-toolbar button:hover,
body[data-active-screen="learning-calendar"] .learning-calendar-card > header button:hover {
  background: var(--xiyue-blue-100);
  transform: none;
}

body[data-active-screen="learning-calendar"] .learning-calendar-shell {
  display: grid;
  width: min(1360px, 100%);
  box-sizing: border-box;
  gap: 0;
  margin: 0 auto;
  padding: 34px clamp(24px, 4vw, 64px) 0;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary {
  position: static;
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(260px, 1fr) minmax(560px, 1.45fr);
  grid-template-rows: auto;
  align-items: end;
  gap: 42px;
  margin: 0;
  padding: 0 0 28px;
  overflow: visible;
  color: var(--xiyue-ink);
  border: 0;
  border-bottom: 1px solid var(--xiyue-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary::after,
body[data-active-screen="learning-calendar"] .learning-day-activity::before {
  display: none;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy,
body[data-active-screen="learning-calendar"] .learning-calendar-summary-stats {
  position: static;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy > small,
body[data-active-screen="learning-calendar"] .learning-day-detail > small {
  color: var(--xiyue-blue-600);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy h2 {
  margin: 7px 0 0;
  color: var(--xiyue-ink);
  font-size: 30px;
  font-weight: 880;
  line-height: 1.18;
  letter-spacing: -.04em;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy p {
  max-width: 480px;
  margin: 8px 0 0;
  color: var(--xiyue-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: stretch;
  gap: 0;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary article {
  display: grid;
  min-height: 86px;
  box-sizing: border-box;
  grid-template-columns: 38px minmax(0, 1fr);
  place-content: center stretch;
  align-items: center;
  justify-items: stretch;
  gap: 12px;
  padding: 8px 20px;
  border: 0;
  border-left: 1px solid var(--xiyue-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-active-screen="learning-calendar"] .learning-calendar-stat-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--xiyue-blue-600);
  border-radius: 10px;
  background: var(--xiyue-blue-050);
}

body[data-active-screen="learning-calendar"] .learning-calendar-stat-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary article > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary strong {
  color: var(--xiyue-ink);
  font-size: 24px;
  font-weight: 880;
  line-height: 1.05;
}

body[data-active-screen="learning-calendar"] .learning-calendar-summary article small {
  color: var(--xiyue-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

body[data-active-screen="learning-calendar"] .learning-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, .72fr);
  align-items: start;
  gap: 0;
}

body[data-active-screen="learning-calendar"] :is(.learning-calendar-card, .learning-day-detail) {
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body[data-active-screen="learning-calendar"] .learning-calendar-card {
  padding: 30px 36px 0 0;
}

body[data-active-screen="learning-calendar"] .learning-calendar-card > header {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-month-navigation {
  display: grid;
  width: 330px;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-card > header button {
  width: 40px;
  height: 40px;
  color: var(--xiyue-blue-600);
  border: 0;
  border-radius: 8px;
  background: var(--xiyue-blue-050);
  box-shadow: none;
  font-size: 22px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-card h2 {
  margin: 0;
  color: var(--xiyue-ink);
  font-size: 18px;
  font-weight: 840;
  letter-spacing: -.02em;
  text-align: center;
}

body[data-active-screen="learning-calendar"] .learning-calendar-legend,
body[data-active-screen="learning-calendar"] .learning-calendar-legend span {
  display: flex;
  align-items: center;
}

body[data-active-screen="learning-calendar"] .learning-calendar-legend {
  flex: 0 0 auto;
  gap: 14px;
  color: var(--xiyue-muted);
  font-size: 10px;
  font-weight: 700;
}

body[data-active-screen="learning-calendar"] .learning-calendar-legend span {
  gap: 6px;
  white-space: nowrap;
}

body[data-active-screen="learning-calendar"] .learning-calendar-legend span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ab58f;
}

body[data-active-screen="learning-calendar"] .learning-calendar-legend .is-today::before {
  background: var(--xiyue-blue-600);
}

body[data-active-screen="learning-calendar"] :is(.learning-calendar-weekdays, .learning-calendar-grid) {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-weekdays {
  margin: 24px 0 8px;
}

body[data-active-screen="learning-calendar"] .learning-calendar-weekdays span {
  color: var(--xiyue-subtle);
  font-size: 10px;
  font-weight: 750;
  line-height: 18px;
  text-align: center;
}

body[data-active-screen="learning-calendar"] :is(.learning-calendar-day, .learning-calendar-spacer) {
  min-height: 66px;
  aspect-ratio: auto;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day {
  position: relative;
  display: flex;
  box-sizing: border-box;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 11px;
  color: #69758d;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f7f8fb;
  box-shadow: none;
  font-size: 11px;
  font-weight: 780;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day:hover {
  border-color: #dfe5f0;
  background: #f2f5fb;
  transform: none;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day.is-learned {
  color: #137e66;
  border-color: #d8f2e9;
  background: #effaf7;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day.is-learned::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #27b58e;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day.is-today {
  color: var(--xiyue-blue-600);
  border-color: #cad6ff;
  background: var(--xiyue-blue-050);
  box-shadow: none;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day.is-selected {
  color: #fff;
  border-color: var(--xiyue-blue-600);
  background: var(--xiyue-blue-600);
  box-shadow: none;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day.is-selected::after {
  background: #fff;
}

body[data-active-screen="learning-calendar"] .learning-day-detail {
  position: static;
  min-height: 0;
  max-height: 590px;
  margin-top: 30px;
  padding: 0 0 0 36px;
  overflow: auto;
  border-left: 1px solid var(--xiyue-line);
  scrollbar-width: thin;
  scrollbar-color: #cbd4e5 transparent;
}

body[data-active-screen="learning-calendar"] .learning-day-detail h2 {
  margin: 7px 0 0;
  color: var(--xiyue-ink);
  font-size: 24px;
  font-weight: 880;
  letter-spacing: -.03em;
}

body[data-active-screen="learning-calendar"] .learning-day-detail > p {
  margin: 5px 0 0;
  color: var(--xiyue-muted);
  font-size: 11px;
}

body[data-active-screen="learning-calendar"] .learning-day-overview {
  display: grid;
  min-height: 70px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--xiyue-line);
  border-bottom: 1px solid var(--xiyue-line);
}

body[data-active-screen="learning-calendar"] .learning-day-overview > span {
  display: grid;
  min-width: 0;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 4px 8px;
  border: 0;
  border-left: 1px solid var(--xiyue-line);
  border-radius: 0;
  background: transparent;
}

body[data-active-screen="learning-calendar"] .learning-day-overview > span:first-child {
  border-left: 0;
}

body[data-active-screen="learning-calendar"] .learning-day-overview strong {
  color: var(--xiyue-ink);
  font-size: 20px;
  font-weight: 880;
}

body[data-active-screen="learning-calendar"] .learning-day-overview small {
  color: var(--xiyue-muted);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

body[data-active-screen="learning-calendar"] .learning-day-activity {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 16px 0;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid var(--xiyue-line);
  border-radius: 0;
  background: transparent;
}

body[data-active-screen="learning-calendar"] .learning-day-activity.is-in-progress {
  border-color: var(--xiyue-line);
  background: transparent;
}

body[data-active-screen="learning-calendar"] .learning-day-activity header {
  display: flex;
  min-height: 20px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-active-screen="learning-calendar"] .learning-day-activity header strong {
  color: var(--xiyue-ink);
  font-size: 12px;
  font-weight: 820;
}

body[data-active-screen="learning-calendar"] .learning-day-activity header span {
  flex: 0 0 auto;
  padding: 0;
  color: var(--xiyue-blue-600);
  background: transparent;
  font-size: 9px;
  font-weight: 780;
}

body[data-active-screen="learning-calendar"] .learning-day-activity p {
  margin: 0;
  color: var(--xiyue-muted);
  font-size: 10px;
  line-height: 1.6;
}

body[data-active-screen="learning-calendar"] .learning-day-empty {
  min-height: 220px;
}

body[data-active-screen="learning-calendar"] .learning-day-empty span {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

body[data-active-screen="learning-calendar"] :is(
  .learning-calendar-toolbar button,
  .learning-calendar-card > header button,
  .learning-calendar-day
):focus-visible {
  outline: 3px solid rgba(49, 93, 246, .22);
  outline-offset: 2px;
}

@media (max-width: 960px) {
  body[data-active-screen="learning-calendar"] .learning-calendar-summary {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-layout {
    grid-template-columns: 1fr;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-card {
    padding-right: 0;
  }

  body[data-active-screen="learning-calendar"] .learning-day-detail {
    max-height: none;
    margin-top: 28px;
    padding: 28px 0 0;
    overflow: visible;
    border-top: 1px solid var(--xiyue-line);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  body[data-active-screen="learning-calendar"] .learning-calendar-stage {
    padding: 0 0 40px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar,
  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar-inner {
    min-height: 60px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar-inner {
    padding: 10px 15px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar button {
    height: 38px;
    padding: 0 10px;
    font-size: 12px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-shell {
    padding: 22px 15px 0;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    padding: 0 0 22px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy {
    max-width: none;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy > small {
    font-size: 9px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy h2 {
    margin-top: 6px;
    font-size: 25px;
    white-space: normal;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy p {
    margin-top: 7px;
    font-size: 11px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary article {
    min-height: 62px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 3px;
    padding: 4px 6px;
    text-align: center;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary article:first-child {
    border-left: 0;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-stat-icon {
    display: none;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary article > span:last-child {
    justify-items: center;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary strong {
    font-size: 19px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-summary article small {
    font-size: 8px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-card {
    height: 393px;
    min-height: 393px;
    padding-top: 22px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-card > header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-month-navigation {
    width: 100%;
    grid-template-columns: 38px 1fr 38px;
    gap: 8px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-card > header button {
    width: 38px;
    height: 38px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-legend {
    justify-content: center;
    font-size: 9px;
  }

  body[data-active-screen="learning-calendar"] :is(.learning-calendar-weekdays, .learning-calendar-grid) {
    gap: 4px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-weekdays {
    margin: 17px 0 7px;
  }

  body[data-active-screen="learning-calendar"] :is(.learning-calendar-day, .learning-calendar-spacer) {
    min-height: 41px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-day {
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 6px;
    font-size: 10px;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-day.is-learned::after {
    right: 5px;
    bottom: 5px;
    width: 4px;
    height: 4px;
  }

  body[data-active-screen="learning-calendar"] .learning-day-detail {
    height: 300px;
    min-height: 300px;
    margin-top: 24px;
    padding-top: 24px;
    overflow: auto;
  }
}

/* Account overview: align with the flat calendar and examination result pages. */
body[data-active-screen="login"]:has(.account-ui-overview-heading),
body[data-active-screen="login"]:has(.account-ui-overview-heading) .mock-app,
body[data-active-screen="login"] .login-stage:has(.account-ui-overview-heading) {
  color: var(--xiyue-ink);
  background: #fff;
}

body[data-active-screen="login"] .login-stage:has(.account-ui-overview-heading) {
  display: block;
  min-height: 100vh;
  padding: 0 0 56px;
}

body[data-active-screen="login"] .login-shell:has(.account-ui-overview-heading) {
  display: block;
  width: 100%;
  max-width: none;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) {
  width: 100%;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body[data-active-screen="login"] .account-ui-overview-heading {
  display: flex;
  width: 100%;
  height: 75px;
  min-height: 75px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 14px max(clamp(24px, 4vw, 64px), calc((100% - 1360px) / 2 + clamp(24px, 4vw, 64px)));
  border-bottom: 1px solid var(--xiyue-line);
}

body[data-active-screen="login"] .account-ui-overview-heading h1 {
  margin: 0;
  color: var(--xiyue-ink);
  font-size: 14px;
  font-weight: 820;
  letter-spacing: -.015em;
}

body[data-active-screen="login"] .account-ui-overview-heading > button {
  display: inline-flex;
  width: auto;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  color: var(--xiyue-blue-600);
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 750;
}

body[data-active-screen="login"] .account-ui-overview-heading > button:hover {
  background: var(--xiyue-blue-100);
  transform: none;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-hero,
body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-grid,
body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-wrong-count,
body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-message {
  width: min(1360px, 100%);
  box-sizing: border-box;
  margin-right: auto;
  margin-left: auto;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-hero {
  display: grid;
  min-height: 0;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 34px clamp(24px, 4vw, 64px);
  overflow: visible;
  border: 0;
  border-bottom: 1px solid var(--xiyue-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-mascot {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: var(--xiyue-blue-050);
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-mascot img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  transform: translateY(3px);
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-identity {
  gap: 5px;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-identity small {
  color: var(--xiyue-blue-600);
  font-size: 10px;
  font-weight: 800;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-identity strong {
  color: var(--xiyue-ink);
  font-size: 27px;
  font-weight: 880;
  letter-spacing: -.035em;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-identity span {
  color: var(--xiyue-muted);
  font-size: 11px;
  font-weight: 650;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-vip {
  display: grid;
  min-width: 94px;
  gap: 4px;
  margin: 0;
  padding: 9px 0 9px 28px;
  color: var(--xiyue-blue-600);
  border-left: 1px solid var(--xiyue-line);
  border-radius: 0;
  background: transparent;
  text-align: left;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-vip strong {
  font-size: 12px;
  font-weight: 820;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-vip small {
  color: var(--xiyue-muted);
  font-size: 9px;
  font-weight: 650;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-message {
  margin-top: 18px;
  padding: 11px clamp(24px, 4vw, 64px);
  color: var(--xiyue-muted);
  border-radius: 0;
  background: var(--xiyue-blue-050);
  font-size: 11px;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 0;
  padding: 30px clamp(24px, 4vw, 64px) 0;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card {
  overflow: visible;
  padding: 0 34px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card + .account-ui-card {
  padding: 0 0 0 34px;
  border-left: 1px solid var(--xiyue-line);
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card header {
  display: flex;
  height: 45px;
  align-items: flex-start;
  padding: 0;
  border-bottom: 1px solid var(--xiyue-line);
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card header > strong {
  color: var(--xiyue-ink);
  font-size: 18px;
  font-weight: 860;
  letter-spacing: -.02em;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card header small {
  display: none;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card button {
  min-height: 72px;
  gap: 14px;
  padding: 13px 10px 13px 2px;
  border: 0;
  border-bottom: 1px solid var(--xiyue-line);
  border-radius: 0;
  background: transparent;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card button:hover {
  padding-left: 10px;
  background: var(--xiyue-blue-050);
  transform: none;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card button > span {
  gap: 5px;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card button strong {
  color: var(--xiyue-ink);
  font-size: 13px;
  font-weight: 800;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card button small {
  color: var(--xiyue-muted);
  font-size: 10px;
  font-weight: 600;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card button b {
  color: var(--xiyue-subtle);
  font-size: 20px;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card .account-ui-logout strong {
  color: #d84252;
}

body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-wrong-count {
  height: auto;
  margin-top: 0;
  padding: 17px clamp(24px, 4vw, 64px) 0;
  color: var(--xiyue-muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}

body[data-active-screen="login"] .account-ui-overview-heading > button:focus-visible,
body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card button:focus-visible {
  outline: 3px solid rgba(49, 93, 246, .22);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  body[data-active-screen="login"] .login-stage:has(.account-ui-overview-heading) {
    padding: 0 0 96px;
  }

  body[data-active-screen="login"] .account-ui-overview-heading {
    height: 60px;
    min-height: 60px;
    padding: 10px 15px;
  }

  body[data-active-screen="login"] .account-ui-overview-heading > button {
    height: 38px;
    padding: 0 10px;
    font-size: 12px;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-hero {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 24px 15px;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-mascot {
    width: 54px;
    height: 54px;
    border-radius: 13px;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-mascot img {
    width: 62px;
    height: 62px;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-identity strong {
    font-size: 21px;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-identity :is(small, span) {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-vip {
    min-width: 0;
    padding-left: 12px;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-grid {
    grid-template-columns: 1fr;
    padding: 22px 15px 0;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card,
  body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card + .account-ui-card {
    padding: 0;
    border-left: 0;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card + .account-ui-card {
    margin-top: 24px;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card header {
    height: 41px;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-card button {
    min-height: 68px;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-overview-heading) .account-ui-wrong-count {
    padding: 16px 15px 0;
    text-align: left;
  }
}

/* Account detail pages: share the homepage navigation and flat desktop canvas. */
@media (min-width: 961px) {
  body[data-active-screen="feedback"] .site-desktop-header-shell,
  body[data-active-screen="login"]:has(.account-identity-management-card) .site-desktop-header-shell,
  body[data-active-screen="login"]:has(.authorized-device-summary) .site-desktop-header-shell,
  body[data-active-screen="login"]:has(.about-us-hero) .site-desktop-header-shell {
    position: sticky;
    z-index: 50;
    top: 0;
    display: block;
    padding: 0 clamp(24px, 3vw, 64px);
    background: #fff;
  }

  body[data-active-screen="feedback"] .home-desktop-nav > [data-action="home-ui-home"],
  body[data-active-screen="login"]:has(.account-identity-management-card) .home-desktop-nav > [data-action="home-ui-home"],
  body[data-active-screen="login"]:has(.authorized-device-summary) .home-desktop-nav > [data-action="home-ui-home"],
  body[data-active-screen="login"]:has(.about-us-hero) .home-desktop-nav > [data-action="home-ui-home"] {
    color: var(--xiyue-muted);
    background: transparent;
  }

  body[data-active-screen="feedback"] #home-desktop-account-trigger,
  body[data-active-screen="login"]:has(.account-identity-management-card) #home-desktop-account-trigger,
  body[data-active-screen="login"]:has(.authorized-device-summary) #home-desktop-account-trigger,
  body[data-active-screen="login"]:has(.about-us-hero) #home-desktop-account-trigger {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="login"]:has(.account-identity-management-card),
  body[data-active-screen="login"]:has(.authorized-device-summary),
  body[data-active-screen="login"]:has(.about-us-hero),
  body[data-active-screen="feedback"],
  body[data-active-screen="login"]:has(.account-identity-management-card) .mock-app,
  body[data-active-screen="login"]:has(.authorized-device-summary) .mock-app,
  body[data-active-screen="login"]:has(.about-us-hero) .mock-app,
  body[data-active-screen="feedback"] .mock-app {
    color: var(--xiyue-ink);
    background: #fff;
  }

  body[data-active-screen="login"] .login-stage:has(.account-identity-management-card),
  body[data-active-screen="login"] .login-stage:has(.authorized-device-summary),
  body[data-active-screen="login"] .login-stage:has(.about-us-hero),
  body[data-active-screen="feedback"] .feedback-stage {
    display: block;
    min-height: calc(100vh - 76px);
    box-sizing: border-box;
    padding: 34px clamp(24px, 3vw, 64px) 64px;
    background: #fff;
  }

  body[data-active-screen="login"] .login-shell:has(.account-identity-management-card),
  body[data-active-screen="login"] .login-shell:has(.authorized-device-summary),
  body[data-active-screen="login"] .login-shell:has(.about-us-hero),
  body[data-active-screen="feedback"] .account-feature-shell {
    display: block;
    width: min(1600px, 100%);
    max-width: 1600px;
    margin: 0 auto;
  }

  body[data-active-screen="login"] .login-panel:has(.account-identity-management-card),
  body[data-active-screen="login"] .login-panel:has(.authorized-device-summary),
  body[data-active-screen="login"] .login-panel:has(.about-us-hero),
  body[data-active-screen="feedback"] .feedback-panel {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .login-panel:has(.account-identity-management-card) .account-ui-heading,
  body[data-active-screen="login"] .login-panel:has(.authorized-device-summary) .account-ui-heading,
  body[data-active-screen="login"] .login-panel:has(.about-us-hero) .account-ui-heading,
  body[data-active-screen="feedback"] .account-feature-titlebar {
    display: block;
    width: 100%;
    height: 65px;
    min-height: 65px;
    box-sizing: border-box;
    margin: 0 0 28px;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="login"] .login-panel:has(.account-identity-management-card) .account-ui-heading > button,
  body[data-active-screen="login"] .login-panel:has(.authorized-device-summary) .account-ui-heading > button,
  body[data-active-screen="login"] .login-panel:has(.about-us-hero) .account-ui-heading > button,
  body[data-active-screen="feedback"] .account-feature-titlebar > button,
  body[data-active-screen="login"] .login-panel:has(.account-identity-management-card) .account-ui-heading p,
  body[data-active-screen="login"] .login-panel:has(.authorized-device-summary) .account-ui-heading p,
  body[data-active-screen="login"] .login-panel:has(.about-us-hero) .account-ui-heading p,
  body[data-active-screen="feedback"] .account-feature-titlebar small {
    display: none;
  }

  body[data-active-screen="login"] .login-panel:has(.account-identity-management-card) .account-ui-heading h1,
  body[data-active-screen="login"] .login-panel:has(.authorized-device-summary) .account-ui-heading h1,
  body[data-active-screen="login"] .login-panel:has(.about-us-hero) .account-ui-heading h1,
  body[data-active-screen="feedback"] .account-feature-titlebar h1 {
    margin: 0;
    color: var(--xiyue-ink);
    font-size: 30px;
    font-weight: 880;
    letter-spacing: -.035em;
  }

  body[data-active-screen="login"] .account-identity-management-card {
    grid-template-columns: minmax(260px, .7fr) minmax(600px, 1.3fr);
    gap: clamp(36px, 5vw, 78px);
    padding: 12px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .account-identity-management-card > div:first-child small {
    display: none;
  }

  body[data-active-screen="login"] .account-identity-management-card h2 {
    margin: 0;
    font-size: 23px;
    font-weight: 850;
  }

  body[data-active-screen="login"] .account-identity-management-card p {
    margin-top: 12px;
    color: var(--xiyue-muted);
    font-size: 12px;
    line-height: 1.75;
  }

  body[data-active-screen="login"] .account-identity-management-options {
    gap: 12px;
  }

  body[data-active-screen="login"] .account-identity-management-options button {
    min-height: 112px;
    border-color: var(--xiyue-line);
    border-radius: 12px;
    background: #f8f9fc;
    box-shadow: none;
  }

  body[data-active-screen="login"] .account-identity-management-options button:hover,
  body[data-active-screen="login"] .account-identity-management-options button:focus-visible,
  body[data-active-screen="login"] .account-identity-management-options button.is-selected {
    border-color: #bfcdf8;
    background: var(--xiyue-blue-050);
    box-shadow: none;
  }

  body[data-active-screen="login"] .authorized-device-summary {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0 0 25px;
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
  }

  body[data-active-screen="login"] .authorized-device-summary strong {
    color: var(--xiyue-ink);
    font-size: 19px;
    font-weight: 840;
  }

  body[data-active-screen="login"] .authorized-device-summary p {
    max-width: 720px;
    color: var(--xiyue-muted);
    font-size: 11px;
  }

  body[data-active-screen="login"] .authorized-device-list-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 38px;
    margin-top: 14px;
  }

  body[data-active-screen="login"] .authorized-device-card,
  body[data-active-screen="login"] .authorized-device-card.is-current {
    min-height: 84px;
    box-sizing: border-box;
    padding: 15px 2px;
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
  }

  body[data-active-screen="login"] .authorized-device-card.has-action {
    grid-template-columns: 46px minmax(0, 1fr) auto;
  }

  body[data-active-screen="login"] .authorized-device-card > .authorized-device-copy {
    display: grid;
    min-width: 0;
    align-content: center;
    gap: 5px;
  }

  body[data-active-screen="login"] .authorized-device-title {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 7px;
  }

  body[data-active-screen="login"] .authorized-device-title strong {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body[data-active-screen="login"] .authorized-device-title em {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
  }

  body[data-active-screen="login"] .authorized-device-copy > small {
    display: block;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  body[data-active-screen="login"] .authorized-device-remove-button {
    min-width: 58px;
    min-height: 38px;
    padding: 7px 12px;
  }

  body[data-active-screen="login"] .authorized-device-icon {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    background: var(--xiyue-blue-050);
    color: var(--xiyue-blue-600);
    font-size: 20px;
  }

  body[data-active-screen="login"] .authorized-device-card strong {
    color: var(--xiyue-ink);
    font-size: 12px;
  }

  body[data-active-screen="login"] .authorized-device-card small {
    color: var(--xiyue-muted);
    font-size: 9px;
  }

  body[data-active-screen="login"] .about-us-hero {
    display: block;
    min-height: 0;
    padding: 14px 0 30px;
    overflow: visible;
    color: var(--xiyue-ink);
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .about-us-hero::after,
  body[data-active-screen="login"] .about-us-hero small,
  body[data-active-screen="login"] .about-us-card > small {
    display: none;
  }

  body[data-active-screen="login"] .about-us-hero > div {
    max-width: 760px;
  }

  body[data-active-screen="login"] .about-us-hero h2 {
    margin: 0;
    color: var(--xiyue-ink);
    font-size: 28px;
    font-weight: 870;
  }

  body[data-active-screen="login"] .about-us-hero p {
    margin-top: 13px;
    color: var(--xiyue-muted);
    font-size: 12px;
    line-height: 1.8;
  }

  body[data-active-screen="login"] .about-us-hero img {
    position: static;
    width: 156px;
    height: 156px;
    justify-self: end;
    filter: drop-shadow(0 12px 20px rgba(49, 93, 246, .14));
  }

  body[data-active-screen="login"] .about-us-grid {
    grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
    margin-top: 0;
  }

  body[data-active-screen="login"] .about-us-card {
    padding: 30px 38px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .about-us-card + .about-us-card {
    padding-right: 0;
    padding-left: 38px;
    border-top: 0;
    border-left: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="login"] .about-us-card h2 {
    margin: 0;
    font-size: 20px;
  }

  body[data-active-screen="login"] .about-us-intro-card p {
    margin-top: 16px;
    color: var(--xiyue-muted);
    font-size: 11px;
    line-height: 1.9;
  }

  body[data-active-screen="login"] .about-us-intro-card {
    display: block;
  }

  body[data-active-screen="login"] .about-us-wechat-support {
    grid-template-columns: 154px minmax(0, 1fr);
    gap: 22px;
    margin-top: 26px;
    padding-top: 26px;
    border: 0;
    border-top: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
  }

  body[data-active-screen="login"] .about-us-wechat-support > img {
    width: 154px;
    height: 154px;
  }

  body[data-active-screen="login"] .about-us-details {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }

  body[data-active-screen="login"] .about-us-details > div {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  body[data-active-screen="feedback"] .feedback-panel {
    gap: 22px;
  }

  body[data-active-screen="feedback"] .feedback-copy {
    max-width: 800px;
  }

  body[data-active-screen="feedback"] .feedback-copy > p:first-child {
    color: var(--xiyue-muted);
    font-size: 12px;
  }

  body[data-active-screen="feedback"] .feedback-form {
    gap: 26px;
    padding-top: 6px;
  }

  body[data-active-screen="feedback"] .feedback-field textarea {
    border-color: var(--xiyue-line);
    border-radius: 10px;
    background: #f8f9fc;
    box-shadow: none;
  }

  body[data-active-screen="feedback"] .feedback-upload-card,
  body[data-active-screen="feedback"] .feedback-preview {
    border-color: #dfe5f0;
    border-radius: 10px;
    background: #f8f9fc;
  }

  body[data-active-screen="feedback"] .feedback-actions {
    grid-template-columns: minmax(180px, 240px);
  }

  body[data-active-screen="feedback"] .feedback-actions .login-button-primary {
    border-radius: 10px;
    background: var(--xiyue-blue-600);
    box-shadow: none;
  }
}

/* Keep these wrong-review overrides after the legacy hub rules so the
   teacher's student overview cannot fall back to the old blue hero. */
@media (min-width: 961px) {
  body[data-active-screen="wrong-review-hub"],
  body[data-active-screen="wrong-review-hub"] .mock-app,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-stage {
    color: var(--xiyue-ink);
    background: #fff;
  }

  body[data-active-screen="wrong-review-hub"] .site-desktop-header-shell {
    position: sticky;
    z-index: 50;
    top: 0;
    display: block;
    padding: 0 clamp(24px, 3vw, 64px);
    border-bottom: 1px solid var(--xiyue-line);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(14px);
  }

  body[data-active-screen="wrong-review-hub"] .home-desktop-nav > [data-action="home-ui-home"].is-active {
    color: var(--xiyue-muted);
    background: transparent;
  }

  body[data-active-screen="wrong-review-hub"][data-teacher-wrong-review="false"] #home-desktop-wrong-trigger,
  body[data-active-screen="wrong-review-hub"][data-teacher-wrong-review="true"] #home-desktop-account-trigger {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-stage {
    min-height: calc(100vh - 76px);
    padding: 34px clamp(24px, 3vw, 64px) 64px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-shell {
    display: block;
    width: min(1600px, 100%);
    max-width: 1600px;
    margin: 0 auto;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar {
    display: flex;
    min-height: 56px;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar > button {
    width: 42px;
    height: 42px;
    color: var(--xiyue-blue-600);
    border: 1px solid var(--xiyue-line);
    border-radius: 9px;
    background: var(--xiyue-blue-050);
    box-shadow: none;
    font-size: 25px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar small,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary-art,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary::after,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header small {
    display: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar h1 {
    margin: 0;
    color: var(--xiyue-ink);
    font-size: 30px;
    font-weight: 880;
    letter-spacing: -.035em;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary {
    display: grid;
    width: 100%;
    height: auto;
    min-height: 154px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    box-sizing: border-box;
    padding: 28px 0;
    overflow: visible;
    color: var(--xiyue-ink);
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary-copy {
    max-width: 780px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary small {
    margin: 0;
    color: var(--xiyue-blue-600);
    font-size: 10px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary h2 {
    margin: 7px 0 0;
    color: var(--xiyue-ink);
    font-size: 38px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary p {
    max-width: 780px;
    margin: 10px 0 0;
    color: var(--xiyue-muted);
    font-size: 12px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary > button {
    min-width: 148px;
    min-height: 44px;
    justify-content: center;
    margin: 0;
    padding: 0 18px;
    color: #fff;
    border-radius: 10px;
    background: var(--xiyue-blue-600);
    box-shadow: none;
    font-size: 12px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary > button:disabled {
    color: var(--xiyue-muted);
    background: #f1f3f7;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories {
    padding: 28px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header {
    height: auto;
    min-height: 58px;
    align-items: center;
    margin: 0;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header h2 {
    color: var(--xiyue-ink);
    font-size: 21px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header > span {
    padding: 6px 9px;
    border-radius: 7px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 38px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button {
    min-height: 78px;
    gap: 14px;
    padding: 13px 2px;
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button:not(:disabled):hover,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button:not(:disabled):focus-visible {
    padding-left: 10px;
    border-color: var(--xiyue-line);
    background: var(--xiyue-blue-050);
    box-shadow: none;
    transform: none;
  }
}

@media (max-width: 960px) {
  body[data-active-screen="wrong-review-hub"],
  body[data-active-screen="wrong-review-hub"] .mock-app,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-stage {
    background: #fff;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar {
    min-height: 68px;
    box-sizing: border-box;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary {
    display: grid;
    height: auto;
    min-height: 202px;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 24px 2px;
    overflow: visible;
    color: var(--xiyue-ink);
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary::after,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary-art {
    display: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary small { color: var(--xiyue-blue-600); }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary h2 { color: var(--xiyue-ink); }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary p { color: var(--xiyue-muted); }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary > button {
    min-height: 42px;
    justify-content: center;
    margin: 0;
    color: #fff;
    border-radius: 10px;
    background: var(--xiyue-blue-600);
    box-shadow: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories {
    padding: 22px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header {
    margin-bottom: 0;
  }
}

@media (min-width: 481px) and (max-width: 960px) {
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar {
    min-height: 76px;
  }
}

/* Compact account access gate. */
.learning-materials-login-gate-dialog:not(.is-vip-gate):not(.is-trial-gate) {
  width: min(400px, 100%);
  padding: 30px 28px 24px;
}

.learning-materials-login-gate-dialog:not(.is-vip-gate):not(.is-trial-gate) .learning-materials-login-gate-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 15px;
  border-radius: 16px;
}

.learning-materials-login-gate-dialog:not(.is-vip-gate):not(.is-trial-gate) footer {
  margin-top: 21px;
}

#learning-materials-login-gate-copy[hidden] {
  display: none;
}

/* Password management uses the same flat account-detail canvas. */
@media (min-width: 961px) {
  body[data-active-screen="login"]:has(.account-password-management-card),
  body[data-active-screen="login"]:has(.account-password-management-card) .mock-app {
    color: var(--xiyue-ink);
    background: #fff;
  }

  body[data-active-screen="login"]:has(.account-password-management-card) .site-desktop-header-shell {
    position: sticky;
    z-index: 50;
    top: 0;
    display: block;
    padding: 0 clamp(24px, 3vw, 64px);
    border-bottom: 1px solid var(--xiyue-line);
    background: #fff;
  }

  body[data-active-screen="login"]:has(.account-password-management-card) .home-desktop-nav > [data-action="home-ui-home"] {
    color: var(--xiyue-muted);
    background: transparent;
  }

  body[data-active-screen="login"]:has(.account-password-management-card) #home-desktop-account-trigger {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="login"] .login-stage:has(.account-password-management-card) {
    display: block;
    min-height: calc(100vh - 76px);
    box-sizing: border-box;
    padding: 34px clamp(24px, 3vw, 64px) 64px;
    background: #fff;
  }

  body[data-active-screen="login"] .login-shell:has(.account-password-management-card) {
    display: block;
    width: min(1600px, 100%);
    max-width: 1600px;
    margin: 0 auto;
  }

  body[data-active-screen="login"] .login-panel:has(.account-password-management-card) {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .login-panel:has(.account-password-management-card) .account-ui-heading {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    box-sizing: border-box;
    margin: 0 0 28px;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="login"] .login-panel:has(.account-password-management-card) .account-ui-heading > button,
  body[data-active-screen="login"] .login-panel:has(.account-password-management-card) .account-ui-heading p {
    display: none;
  }

  body[data-active-screen="login"] .login-panel:has(.account-password-management-card) .account-ui-heading h1 {
    margin: 0;
    color: var(--xiyue-ink);
    font-size: 30px;
    font-weight: 880;
    letter-spacing: -.035em;
  }

  .account-password-management-card {
    display: grid;
    grid-template-columns: minmax(260px, .7fr) minmax(520px, 1.3fr);
    gap: clamp(36px, 5vw, 78px);
    align-items: start;
    padding-top: 12px;
  }

  .account-password-management-copy h2 {
    margin: 0;
    font-size: 23px;
    font-weight: 850;
  }

  .account-password-management-copy p {
    margin: 12px 0 0;
    color: var(--xiyue-muted);
    font-size: 12px;
    line-height: 1.75;
  }

  .account-password-management-card .account-password-panel {
    width: min(620px, 100%);
    gap: 18px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .account-password-management-card .login-field {
    gap: 8px;
    color: var(--xiyue-ink);
    font-size: 12px;
  }

  .account-password-management-card :is(.login-field input, .password-input-shell) {
    height: 48px;
    border-color: var(--xiyue-line);
    border-radius: 10px;
    background: #f8f9fc;
  }

  .account-password-management-card .password-input-shell > input {
    height: 46px;
  }

  .account-password-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 4px;
  }

  .account-password-actions .login-button {
    min-height: 46px;
    border-radius: 10px;
  }

  .account-password-actions .login-button:not(.login-button-primary) {
    color: var(--xiyue-blue-600);
    border: 1px solid #cdd9ff;
    background: var(--xiyue-blue-050);
  }
}

/* Exam centre and preview: shared navigation, white canvas and flat sections. */
@media (min-width: 961px) {
  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]),
  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .mock-app {
    color: var(--xiyue-ink);
    background: #fff;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .site-desktop-header-shell {
    position: sticky;
    z-index: 50;
    top: 0;
    display: block;
    padding: 0 clamp(24px, 3vw, 64px);
    border-bottom: 1px solid var(--xiyue-line);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(14px);
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-desktop-nav > [data-action="home-ui-home"].is-active {
    color: var(--xiyue-muted);
    background: transparent;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) #home-desktop-exam-trigger {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-stage,
  body[data-active-screen="exam-preview"] .exam-preview-stage {
    min-height: calc(100vh - 76px);
    box-sizing: border-box;
    padding: 34px clamp(24px, 3vw, 64px) 64px;
    background: #fff;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-shell,
  body[data-active-screen="exam-preview"] .exam-preview-shell {
    display: block;
    width: min(1600px, 100%);
    max-width: 1600px;
    margin: 0 auto;
  }

  body[data-active-screen="exam-menu"] .entry-hub-titlebar,
  body[data-active-screen="exam-preview"] .exam-preview-titlebar {
    display: flex;
    width: 100%;
    height: auto;
    min-height: 56px;
    align-items: center;
    gap: 14px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="exam-menu"] .entry-hub-titlebar > button,
  body[data-active-screen="exam-preview"] .exam-preview-titlebar > button {
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--xiyue-blue-600);
    border: 1px solid var(--xiyue-line);
    border-radius: 9px;
    background: var(--xiyue-blue-050);
    box-shadow: none;
    font-size: 25px;
  }

  body[data-active-screen="exam-menu"] .entry-hub-titlebar small,
  body[data-active-screen="exam-preview"] .exam-preview-titlebar small {
    display: none;
  }

  body[data-active-screen="exam-menu"] .entry-hub-titlebar h1,
  body[data-active-screen="exam-preview"] .exam-preview-titlebar h1 {
    margin: 0;
    color: var(--xiyue-ink);
    font-size: 30px;
    font-weight: 880;
    letter-spacing: -.035em;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide,
  body[data-active-screen="exam-preview"] .exam-preview-summary {
    display: block;
    width: 100%;
    height: auto;
    min-height: 154px;
    box-sizing: border-box;
    padding: 28px 0;
    overflow: visible;
    color: var(--xiyue-ink);
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide::after,
  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide-art {
    display: none;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide-copy {
    max-width: 780px;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide-copy > small {
    color: var(--xiyue-blue-600);
    font-size: 10px;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide h2 {
    margin-top: 7px;
    color: var(--xiyue-ink);
    font-size: 30px;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide p {
    max-width: 780px;
    margin-top: 10px;
    color: var(--xiyue-muted);
    font-size: 12px;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide-tags {
    margin-top: 14px;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide-tags span {
    padding: 6px 9px;
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 7px;
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 38px;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid > *,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-card-group,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid > .home-feature-preview {
    grid-column: auto;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-card.home-feature-card,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-card.home-feature-primary,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid > .start-card.home-feature-preview {
    min-height: 136px;
    height: auto;
    box-sizing: border-box;
    gap: 16px;
    padding: 24px 2px;
    overflow: visible;
    color: var(--xiyue-ink);
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="exam-menu"] .home-feature-icon,
  body[data-active-screen="exam-menu"] .home-feature-icon-preview {
    width: 50px;
    height: 50px;
    color: var(--xiyue-blue-600);
    border-radius: 12px;
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="exam-menu"] .home-feature-copy small,
  body[data-active-screen="exam-menu"] .home-feature-primary .home-feature-copy small {
    color: var(--xiyue-blue-600);
  }

  body[data-active-screen="exam-menu"] .home-feature-copy strong {
    color: var(--xiyue-ink);
    font-size: 20px;
  }

  body[data-active-screen="exam-menu"] .home-feature-copy > span,
  body[data-active-screen="exam-menu"] .home-feature-primary .home-feature-copy > span {
    color: var(--xiyue-muted);
    font-size: 11px;
  }

  body[data-active-screen="exam-menu"] .home-feature-lock,
  body[data-active-screen="exam-menu"] .home-feature-primary .home-feature-lock,
  body[data-active-screen="exam-menu"] .home-feature-primary .home-feature-lock.is-unlocked {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-exam-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-option-button {
    min-height: 58px;
    border-color: var(--xiyue-line);
    border-radius: 10px;
    background: #f8f9fc;
  }

  body[data-active-screen="exam-preview"] .exam-preview-panel {
    padding-top: 8px;
  }

  body[data-active-screen="exam-preview"] .exam-preview-paper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 38px;
  }

  body[data-active-screen="exam-preview"] .exam-preview-paper-group {
    align-content: start;
    gap: 0;
  }

  body[data-active-screen="exam-preview"] .exam-preview-paper-card,
  body[data-active-screen="exam-preview"] .exam-preview-paper-card.is-locked {
    min-height: 88px;
    box-sizing: border-box;
    padding: 15px 2px;
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  body[data-active-screen="exam-preview"] .exam-preview-paper-card:hover,
  body[data-active-screen="exam-preview"] .exam-preview-paper-card:focus-visible {
    padding-left: 10px;
    background: var(--xiyue-blue-050);
    box-shadow: none;
    transform: none;
  }

  body[data-active-screen="exam-preview"] .exam-preview-paper-heading {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
  }

  body[data-active-screen="exam-preview"] .exam-preview-paper-title {
    color: var(--xiyue-ink);
    font-size: 16px;
  }

  body[data-active-screen="exam-preview"] .exam-preview-paper-eyebrow {
    color: var(--xiyue-muted);
    font-size: 9px;
  }

  body[data-active-screen="exam-preview"] .exam-preview-paper-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 2px 15px;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="exam-preview"] .exam-preview-paper-options .start-option-button {
    min-height: 44px;
    border: 1px solid var(--xiyue-line);
    border-radius: 9px;
    background: #f8f9fc;
    box-shadow: none;
  }
}

@media (max-width: 960px) {
  body[data-active-screen="login"]:has(.account-password-management-card),
  body[data-active-screen="login"]:has(.account-password-management-card) .mock-app,
  body[data-active-screen="login"] .login-stage:has(.account-password-management-card),
  body[data-active-screen="exam-menu"],
  body[data-active-screen="exam-menu"] .mock-app,
  body[data-active-screen="exam-menu"] .home-exam-menu-stage,
  body[data-active-screen="exam-preview"],
  body[data-active-screen="exam-preview"] .mock-app,
  body[data-active-screen="exam-preview"] .exam-preview-stage {
    background: #fff;
  }

  body[data-active-screen="login"] .login-panel:has(.account-password-management-card) {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .account-password-management-card {
    display: grid;
    gap: 20px;
    padding-top: 8px;
  }

  .account-password-management-copy h2 {
    margin: 0;
    font-size: 20px;
  }

  .account-password-management-copy p {
    margin: 8px 0 0;
    color: var(--xiyue-muted);
    font-size: 11px;
  }

  .account-password-management-card .account-password-panel {
    gap: 15px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .account-password-actions {
    grid-template-columns: 1fr;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide,
  body[data-active-screen="exam-preview"] .exam-preview-summary {
    height: auto;
    min-height: 0;
    padding: 22px 2px;
    color: var(--xiyue-ink);
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide::after,
  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide-art {
    display: none;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide-copy > small,
  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide h2,
  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide p {
    color: inherit;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide-copy > small {
    color: var(--xiyue-blue-600);
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide p {
    color: var(--xiyue-muted);
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide-tags span {
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 7px;
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-card.home-feature-card,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-card.home-feature-primary,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid > .start-card.home-feature-preview,
  body[data-active-screen="exam-preview"] .exam-preview-paper-card,
  body[data-active-screen="exam-preview"] .exam-preview-paper-card.is-locked {
    height: auto;
    min-height: 86px;
    color: var(--xiyue-ink);
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="exam-menu"] .home-feature-primary .home-feature-copy :is(small, span) {
    color: var(--xiyue-muted);
  }

  body[data-active-screen="exam-menu"] .home-feature-copy strong,
  body[data-active-screen="exam-preview"] .exam-preview-paper-title {
    color: var(--xiyue-ink);
  }

  body[data-active-screen="exam-menu"] .home-feature-primary .home-feature-lock {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="exam-preview"] .exam-preview-paper-grid {
    gap: 0;
  }

  body[data-active-screen="exam-preview"] .exam-preview-paper-options {
    padding: 10px 0 16px;
    border: 0;
    border-bottom: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}

/* Keep the final flat Exam Preview layout stable across interface languages. */
@media (max-width: 480px) {
  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide,
  body[data-active-screen="exam-preview"] .exam-preview-summary {
    height: 180px;
    min-height: 180px;
  }

  body[data-active-screen="exam-preview"] .exam-preview-paper-card,
  body[data-active-screen="exam-preview"] .exam-preview-paper-card.is-locked {
    height: 96px;
    min-height: 96px;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-card.home-feature-card,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-card.home-feature-primary,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid > .start-card.home-feature-preview {
    height: 160px;
    min-height: 160px;
  }
}

@media (min-width: 481px) and (max-width: 960px) {
  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide,
  body[data-active-screen="exam-preview"] .exam-preview-summary {
    height: 198px;
    min-height: 198px;
  }

  body[data-active-screen="exam-preview"] .exam-preview-paper-card,
  body[data-active-screen="exam-preview"] .exam-preview-paper-card.is-locked {
    height: 86px;
    min-height: 86px;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-card.home-feature-card,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-card.home-feature-primary,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid > .start-card.home-feature-preview {
    height: 150px;
    min-height: 150px;
  }
}

@media (min-width: 961px) {
  body[data-active-screen="learning-calendar"] .learning-day-detail {
    min-height: 252px;
  }

  body:is([data-active-screen="exam-menu"], [data-active-screen="exam-preview"]) .home-exam-guide,
  body[data-active-screen="exam-preview"] .exam-preview-summary {
    height: 188px;
    min-height: 188px;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-card.home-feature-card,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-card.home-feature-primary,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid > .start-card.home-feature-preview {
    height: 136px;
    min-height: 136px;
  }
}

/* Final exam entry spacing and focused-practice flat layout. */
body[data-active-screen="exam-menu"] .home-exam-menu-grid .start-exam-options {
  margin-top: 10px;
  padding: 12px 0 18px;
  border: 0;
  border-bottom: 1px solid var(--xiyue-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-active-screen="exam-preview"] .exam-preview-paper-options {
  margin-top: 10px;
  padding-top: 12px;
  border: 0;
  border-bottom: 1px solid var(--xiyue-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-active-screen="learning-materials"],
body[data-active-screen="learning-materials"] .mock-app,
body[data-active-screen="learning-materials"] .learning-materials-stage {
  background: #fff;
}

body[data-active-screen="single-practice"],
body[data-active-screen="single-practice"] .mock-app,
body[data-active-screen="single-practice"] .single-practice-stage {
  color: var(--xiyue-ink);
  background: #fff;
}

body[data-active-screen="single-practice"] .single-practice-summary {
  display: block;
  width: 100%;
  height: auto;
  min-height: 154px;
  box-sizing: border-box;
  padding: 28px 0;
  overflow: visible;
  color: var(--xiyue-ink);
  border: 0;
  border-bottom: 1px solid var(--xiyue-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-active-screen="single-practice"] .single-practice-summary::after,
body[data-active-screen="single-practice"] .single-practice-summary-art {
  display: none;
}

body[data-active-screen="single-practice"] .single-practice-summary-copy {
  max-width: 780px;
}

body[data-active-screen="single-practice"] .single-practice-summary-copy > small {
  color: var(--xiyue-blue-600);
  font-size: 10px;
}

body[data-active-screen="single-practice"] .single-practice-summary h2 {
  margin: 7px 0 0;
  color: var(--xiyue-ink);
  font-size: 38px;
}

body[data-active-screen="single-practice"] .single-practice-summary p {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--xiyue-muted);
  font-size: 12px;
}

body[data-active-screen="single-practice"] .single-practice-summary-tags {
  margin-top: 14px;
}

body[data-active-screen="single-practice"] .single-practice-summary-tags span {
  padding: 6px 9px;
  color: var(--xiyue-blue-600);
  border: 0;
  border-radius: 7px;
  background: var(--xiyue-blue-050);
}

body[data-active-screen="single-practice"] .single-practice-categories {
  padding: 28px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-active-screen="single-practice"] .single-practice-categories-heading {
  height: auto;
  min-height: 58px;
  align-items: center;
  margin: 0;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--xiyue-line);
}

body[data-active-screen="single-practice"] .single-practice-categories-heading small {
  display: none;
}

body[data-active-screen="single-practice"] .single-practice-categories-heading h2 {
  color: var(--xiyue-ink);
  font-size: 21px;
}

body[data-active-screen="single-practice"] .single-practice-categories-heading > span {
  padding: 6px 9px;
  border-radius: 7px;
}

body[data-active-screen="single-practice"] .single-practice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 38px;
}

body[data-active-screen="single-practice"] .single-practice-card {
  min-height: 78px;
  grid-template-columns: 46px minmax(0, 1fr) 16px;
  gap: 14px;
  padding: 13px 2px;
  border: 0;
  border-bottom: 1px solid var(--xiyue-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

body[data-active-screen="single-practice"] .single-practice-card::before {
  content: "";
}

body[data-active-screen="single-practice"] .single-practice-card:hover,
body[data-active-screen="single-practice"] .single-practice-card:focus-visible {
  padding-left: 10px;
  border-color: var(--xiyue-line);
  background: var(--xiyue-blue-050);
  box-shadow: none;
  transform: none;
}

@media (min-width: 961px) {
  body[data-active-screen="learning-calendar"] .learning-day-detail {
    padding-right: 24px;
  }

  body[data-active-screen="single-practice"] .site-desktop-header-shell {
    position: sticky;
    z-index: 50;
    top: 0;
    display: block;
    padding: 0 clamp(24px, 3vw, 64px);
    border-bottom: 1px solid var(--xiyue-line);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(14px);
  }

  body[data-active-screen="single-practice"] .home-desktop-nav > [data-action="home-ui-home"].is-active {
    color: var(--xiyue-muted);
    background: transparent;
  }

  body[data-active-screen="single-practice"] #home-desktop-practice-trigger {
    color: var(--xiyue-blue-600) !important;
    background-color: var(--xiyue-blue-050) !important;
  }

  body[data-active-screen="single-practice"] .single-practice-stage {
    min-height: calc(100vh - 76px);
    padding: 34px clamp(24px, 3vw, 64px) 64px;
  }

  body[data-active-screen="single-practice"] .single-practice-summary {
    height: 188px;
    min-height: 188px;
  }

  body[data-active-screen="single-practice"] .single-practice-shell {
    display: block;
    width: min(1600px, 100%);
    max-width: 1600px;
    margin: 0 auto;
  }
}

@media (max-width: 960px) {
  body[data-active-screen="single-practice"] .single-practice-summary {
    height: 180px;
    min-height: 180px;
    padding: 24px 2px;
  }

  body[data-active-screen="single-practice"] .single-practice-summary h2 {
    font-size: 28px;
  }

  body[data-active-screen="single-practice"] .single-practice-categories {
    padding: 22px 0 0;
  }

  body[data-active-screen="single-practice"] .single-practice-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}

/* VIP membership: shared navigation, flat canvas and an explicit purchase flow. */
body[data-active-screen="recharge"],
body[data-active-screen="recharge"] .mock-app,
body[data-active-screen="recharge"] .recharge-stage {
  color: var(--xiyue-ink);
  background: #fff;
}

body[data-active-screen="recharge"] .membership-order-flow {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border-block: 1px solid var(--xiyue-line);
  list-style: none;
}

body[data-active-screen="recharge"] .membership-order-flow li {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--xiyue-muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.4;
  text-align: center;
}

body[data-active-screen="recharge"] .membership-order-flow li + li {
  border-left: 1px solid var(--xiyue-line);
}

body[data-active-screen="recharge"] .membership-order-flow b {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--xiyue-blue-600);
  border-radius: 7px;
  background: var(--xiyue-blue-050);
  font-size: 9px;
}

body[data-active-screen="recharge"] .membership-plan-card.is-selected,
body[data-active-screen="recharge"] .membership-plan-card.is-selected:hover,
body[data-active-screen="recharge"] .membership-plan-card.is-selected:focus-visible {
  border-color: var(--xiyue-blue-600);
  background: var(--xiyue-blue-050);
  box-shadow: inset 3px 0 0 var(--xiyue-blue-600);
  opacity: 1;
}

body[data-active-screen="recharge"] .membership-order-empty {
  margin: 0;
  padding: 13px 2px 0;
  color: var(--xiyue-muted);
  border-top: 1px solid var(--xiyue-line);
  font-size: 11px;
  line-height: 1.65;
}

body[data-active-screen="recharge"] .membership-order-confirmation {
  display: grid;
  gap: 16px;
  margin-top: 4px;
  padding: 22px 0 0;
  border-top: 1px solid var(--xiyue-line);
  background: transparent;
}

body[data-active-screen="recharge"] .membership-order-confirmation > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

body[data-active-screen="recharge"] .membership-order-confirmation > header > div {
  display: grid;
  gap: 4px;
}

body[data-active-screen="recharge"] .membership-order-confirmation > header small {
  color: var(--xiyue-subtle);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .14em;
}

body[data-active-screen="recharge"] .membership-order-confirmation h3 {
  margin: 0;
  color: var(--xiyue-ink);
  font-size: 20px;
}

body[data-active-screen="recharge"] .membership-order-confirmation > header > strong {
  color: var(--xiyue-blue-600);
  font-size: 28px;
}

body[data-active-screen="recharge"] .membership-order-confirmation dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin: 0;
  padding: 0;
  border-block: 1px solid var(--xiyue-line);
}

body[data-active-screen="recharge"] .membership-order-confirmation dl > div {
  display: grid;
  min-height: 48px;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--xiyue-line);
}

body[data-active-screen="recharge"] .membership-order-confirmation dl > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

body[data-active-screen="recharge"] .membership-order-confirmation dt {
  color: var(--xiyue-subtle);
  font-size: 10px;
  font-weight: 720;
}

body[data-active-screen="recharge"] .membership-order-confirmation dd {
  margin: 0;
  color: #3d4961;
  font-size: 10px;
  font-weight: 720;
  line-height: 1.55;
}

body[data-active-screen="recharge"] .membership-order-consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  color: #5f6c84;
  cursor: pointer;
  font-size: 10px;
  line-height: 1.7;
}

body[data-active-screen="recharge"] .membership-order-consent input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--xiyue-blue-600);
}

body[data-active-screen="recharge"] .membership-order-consent a {
  color: var(--xiyue-blue-600);
  font-weight: 800;
  text-decoration: none;
}

body[data-active-screen="recharge"] .membership-order-submit {
  width: min(280px, 100%);
  min-height: 46px;
  padding: 0 18px;
  color: #fff;
  border: 0;
  border-radius: 10px;
  background: var(--xiyue-blue-600);
  box-shadow: 0 10px 22px rgba(49, 93, 246, .16);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
}

body[data-active-screen="recharge"] .membership-order-submit:disabled {
  color: #929cad;
  background: #e8ebf1;
  box-shadow: none;
  cursor: not-allowed;
}

body[data-active-screen="recharge"] .membership-order-confirmation > p {
  margin: -4px 0 0;
  color: var(--xiyue-subtle);
  font-size: 9px;
  line-height: 1.6;
}

@media (min-width: 961px) {
  body[data-active-screen="recharge"] .site-desktop-header-shell {
    position: sticky;
    z-index: 50;
    top: 0;
    display: block;
    padding: 0 clamp(24px, 3vw, 64px);
    border-bottom: 1px solid var(--xiyue-line);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(14px);
  }

  body[data-active-screen="recharge"] .home-desktop-nav > [data-action="home-ui-home"].is-active {
    color: var(--xiyue-muted);
    background: transparent;
  }

  body[data-active-screen="recharge"] #home-desktop-membership-state {
    color: var(--xiyue-blue-600);
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="recharge"] .recharge-stage {
    display: block;
    min-height: calc(100vh - 76px);
    box-sizing: border-box;
    padding: 34px clamp(24px, 3vw, 64px) 64px;
  }

  body[data-active-screen="recharge"] .account-feature-shell {
    display: block;
    width: min(1600px, 100%);
    max-width: 1600px;
    margin: 0 auto;
  }

  body[data-active-screen="recharge"] .account-feature-titlebar {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    box-sizing: border-box;
    margin: 0 0 28px;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="recharge"] .account-feature-titlebar > button,
  body[data-active-screen="recharge"] .account-feature-titlebar small {
    display: none;
  }

  body[data-active-screen="recharge"] .account-feature-titlebar h1 {
    margin: 0;
    color: var(--xiyue-ink);
    font-size: 30px;
    font-weight: 880;
    letter-spacing: -.035em;
  }

  body[data-active-screen="recharge"] .recharge-panel {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    gap: 26px 48px;
    box-sizing: border-box;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="recharge"] .recharge-copy {
    display: grid;
    align-content: center;
    gap: 10px;
    min-height: 88px;
    margin: 0;
  }

  body[data-active-screen="recharge"] .recharge-copy > p:not(.recharge-feature) {
    max-width: 700px;
    margin: 0;
    color: var(--xiyue-muted);
    font-size: 12px;
    line-height: 1.75;
  }

  body[data-active-screen="recharge"] .recharge-feature {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--xiyue-blue-600) !important;
    font-size: 10px !important;
    font-weight: 850;
    letter-spacing: .08em;
  }

  body[data-active-screen="recharge"] .membership-current-status {
    min-height: 88px;
    box-sizing: border-box;
    padding: 20px 22px;
    border: 1px solid #dce5ff;
    border-radius: 12px;
    background: var(--xiyue-blue-050);
  }

  body[data-active-screen="recharge"] .membership-recurring-status {
    grid-column: 1 / -1;
    border-radius: 10px;
    box-shadow: none;
  }

  body[data-active-screen="recharge"] .membership-plan-section {
    grid-column: 1 / -1;
    gap: 18px;
    padding-top: 4px;
  }

  body[data-active-screen="recharge"] .membership-plan-section > header {
    height: auto;
    min-height: 54px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="recharge"] .membership-plan-section > header h2 {
    font-size: 21px;
  }

  body[data-active-screen="recharge"] .membership-plan-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
  }

  body[data-active-screen="recharge"] .membership-plan-card {
    height: auto;
    min-height: 154px;
    padding: 20px 20px 16px;
    border: 1px solid var(--xiyue-line);
    border-radius: 11px;
    background: #fafbfe;
    box-shadow: none;
  }

  body[data-active-screen="recharge"] .membership-plan-card:hover,
  body[data-active-screen="recharge"] .membership-plan-card:focus-visible {
    border-color: #bdcbf8;
    background: var(--xiyue-blue-050);
    box-shadow: none;
    transform: none;
  }

  body[data-active-screen="recharge"] .membership-plan-badge {
    border-radius: 0 10px 0 9px;
  }

  body[data-active-screen="recharge"] .membership-plan-price strong {
    font-size: 32px;
  }

  body[data-active-screen="recharge"] .membership-plan-action {
    padding-top: 9px;
  }

  body[data-active-screen="recharge"] .membership-purchase-note,
  body[data-active-screen="recharge"] .membership-benefit-summary {
    min-height: 104px;
    box-sizing: border-box;
    margin: 0;
    padding: 20px 0;
    border-block: 1px solid var(--xiyue-line);
    border-radius: 0;
    background: transparent;
  }

  body[data-active-screen="recharge"] .membership-purchase-note {
    align-content: start;
  }

  body[data-active-screen="recharge"] .membership-benefit-summary {
    align-items: flex-start;
  }

  body[data-active-screen="recharge"] .membership-recharge-actions {
    grid-column: 1 / -1;
  }
}

/* Password management follows the compact login/register form language. */
body[data-active-screen="login"] .account-password-management-card .account-password-identifier-field input[readonly] {
  color: #7b8496;
  background: #f1f3f7;
  cursor: default;
}

body[data-active-screen="login"] .account-password-management-card .login-code-row {
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 9px;
}

body[data-active-screen="login"] .account-password-management-card .login-code-button {
  width: 118px;
  min-width: 118px;
  padding: 0 10px;
  color: var(--xiyue-blue-600);
  border-color: #d6dfff;
  background: var(--xiyue-blue-050);
  box-shadow: none;
}

body[data-active-screen="login"] .account-password-management-card .account-password-panel {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

@media (min-width: 961px) {
  body[data-active-screen="login"] .login-panel:has(.account-password-management-card) .account-ui-heading {
    display: none;
  }

  body[data-active-screen="login"] .login-panel:has(.account-password-management-card) > .account-ui-message {
    width: min(480px, 100%);
    box-sizing: border-box;
    margin: 0 auto 14px;
  }

  body[data-active-screen="login"] .account-password-management-card {
    display: block;
    width: min(480px, 100%);
    box-sizing: border-box;
    margin: 26px auto 0;
    padding: 30px 32px 32px;
    border: 1px solid var(--xiyue-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(42, 60, 104, .10);
  }

  body[data-active-screen="login"] .account-password-management-copy {
    margin-bottom: 20px;
    text-align: center;
  }

  body[data-active-screen="login"] .account-password-management-copy h2 {
    color: var(--xiyue-ink);
    font-size: 25px;
  }

  body[data-active-screen="login"] .account-password-management-copy p {
    margin-top: 8px;
  }

  body[data-active-screen="login"] .account-password-management-card .account-password-panel {
    width: 100%;
    gap: 14px;
  }

  body[data-active-screen="login"] .account-password-management-card :is(.login-field input, .password-input-shell) {
    height: 46px;
    border-radius: 10px;
  }

  body[data-active-screen="login"] .account-password-management-card .password-input-shell > input {
    height: 44px;
  }

  body[data-active-screen="login"] .account-password-actions {
    margin-top: 8px;
  }
}

@media (max-width: 960px) {
  body[data-active-screen="recharge"] .membership-order-flow {
    grid-template-columns: 1fr;
  }

  body[data-active-screen="recharge"] .membership-order-flow li {
    min-height: 38px;
    justify-content: flex-start;
    padding: 7px 10px;
    text-align: left;
  }

  body[data-active-screen="recharge"] .membership-order-flow li + li {
    border-top: 1px solid var(--xiyue-line);
    border-left: 0;
  }

  body[data-active-screen="recharge"] .membership-order-confirmation dl {
    grid-template-columns: 1fr;
  }

  body[data-active-screen="recharge"] .membership-order-confirmation dl > div:nth-last-child(2) {
    border-bottom: 1px solid var(--xiyue-line);
  }

  body[data-active-screen="login"] .account-password-management-card {
    width: min(480px, 100%);
    margin-inline: auto;
  }

  body[data-active-screen="login"] .account-password-management-card .account-password-panel {
    gap: 14px;
  }
}

body.is-membership-agreement-open {
  overflow: hidden;
}

body[data-active-screen="recharge"] .membership-agreement-inline {
  display: inline;
  padding: 0;
  color: var(--xiyue-blue-600);
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  line-height: inherit;
}

body[data-active-screen="recharge"] .membership-agreement-inline:hover,
body[data-active-screen="recharge"] .membership-agreement-inline:focus-visible {
  text-decoration: underline;
}

.membership-agreement-dialog-overlay {
  position: fixed;
  z-index: 14000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 28, 52, .62);
  backdrop-filter: blur(9px);
}

.membership-agreement-dialog-overlay.hidden {
  display: none;
}

.membership-agreement-dialog {
  display: grid;
  width: min(780px, 100%);
  max-height: calc(100dvh - 48px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(18, 28, 52, .34);
}

.membership-agreement-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 23px 26px 19px;
  border-bottom: 1px solid var(--xiyue-line);
  background: #fafbfe;
}

.membership-agreement-dialog > header > div {
  display: grid;
  gap: 4px;
}

.membership-agreement-dialog > header p {
  margin: 0;
  color: #8294c1;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .15em;
}

.membership-agreement-dialog > header h2 {
  margin: 0;
  color: var(--xiyue-ink);
  font-size: 23px;
  line-height: 1.3;
}

.membership-agreement-dialog > header span {
  color: var(--xiyue-muted);
  font-size: 10px;
  font-weight: 700;
}

.membership-agreement-dialog > header button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  color: #66748e;
  border: 1px solid #dfe6f2;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.membership-agreement-dialog-body {
  min-height: 260px;
  padding: 8px 34px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-color: #cbd7ed transparent;
}

.membership-agreement-dialog-body .agreement-copy {
  display: grid;
  gap: 12px;
}

.membership-agreement-document {
  padding: 26px 0 30px;
}

.membership-agreement-document + .membership-agreement-document {
  border-top: 1px solid var(--xiyue-line);
}

.membership-agreement-document > header {
  display: grid;
  gap: 4px;
  margin-bottom: 2px;
}

.membership-agreement-document > header small {
  color: var(--xiyue-blue-600);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
}

.membership-agreement-document > header h3 {
  margin: 0;
  color: var(--xiyue-ink);
  font-size: 18px;
  line-height: 1.45;
}

.membership-agreement-dialog-body .agreement-copy p {
  margin: 0;
  color: #596983;
  font-size: 12px;
  line-height: 1.82;
}

.membership-agreement-dialog-body .agreement-copy p:first-child {
  margin: 14px 0 2px;
  padding: 12px 15px;
  color: #3153b9;
  border-radius: 10px;
  background: var(--xiyue-blue-050);
}

.membership-agreement-dialog-body .agreement-copy strong {
  color: #253754;
}

.membership-agreement-dialog-body .agreement-copy a {
  color: var(--xiyue-blue-600);
}

.membership-agreement-dialog-body .agreement-copy .agreement-material-notice {
  padding: 12px 14px;
  color: #714b16;
  border: 1px solid #f1d59f;
  border-radius: 10px;
  background: #fff9ea;
}

.membership-agreement-loading {
  margin: 0;
  padding: 80px 20px;
  color: var(--xiyue-muted);
  text-align: center;
}

.membership-agreement-error {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 64px 20px;
  color: #63718a;
  text-align: center;
}

.membership-agreement-error strong {
  color: #263754;
  font-size: 18px;
}

.membership-agreement-error p {
  margin: 0;
  line-height: 1.7;
}

.membership-agreement-error button,
.membership-agreement-dialog-actions > button {
  min-height: 42px;
  padding: 0 20px;
  color: #fff;
  border: 0;
  border-radius: 10px;
  background: var(--xiyue-blue-600);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
}

.membership-agreement-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 26px;
  border-top: 1px solid var(--xiyue-line);
  background: #f8faff;
}

.membership-agreement-dialog > footer small {
  color: var(--xiyue-muted);
  font-size: 10px;
  line-height: 1.55;
}

.membership-agreement-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.membership-agreement-dialog-actions > button.is-secondary,
.membership-agreement-dialog-actions > button.is-decline {
  color: #596983;
  border: 1px solid #dce4f1;
  background: #fff;
}

.membership-agreement-dialog-actions > button.is-decline {
  color: #7a8497;
}

.membership-agreement-dialog-actions > button:disabled {
  cursor: wait;
  opacity: .5;
}

@media (max-width: 620px) {
  .membership-agreement-dialog-overlay {
    align-items: end;
    padding: 10px;
  }

  .membership-agreement-dialog {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 20px;
  }

  .membership-agreement-dialog > header {
    padding: 18px 17px 15px;
  }

  .membership-agreement-dialog > header h2 {
    font-size: 20px;
  }

  .membership-agreement-dialog-body {
    min-height: 220px;
    padding: 5px 17px 20px;
  }

  .membership-agreement-document {
    padding: 21px 0 25px;
  }

  .membership-agreement-dialog-body .agreement-copy p {
    font-size: 12px;
    line-height: 1.85;
  }

  .membership-agreement-dialog > footer {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    gap: 10px;
    padding: 13px 17px 15px;
  }

  .membership-agreement-dialog > footer small {
    text-align: center;
  }

  .membership-agreement-dialog-actions {
    display: grid !important;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    justify-self: stretch;
    justify-content: stretch;
    gap: 8px;
  }

  .membership-agreement-dialog-actions > button {
    width: 100%;
    min-width: 0;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 11px;
  }
}

/* VIP checkout is framed by vip.html; inner dialogs use that frame as their only surface. */
html.is-membership-checkout-embed.has-membership-inner-dialog,
html.is-membership-checkout-embed.has-membership-inner-dialog body,
html.is-membership-checkout-embed.has-membership-inner-dialog .mock-app,
html.is-membership-checkout-embed.has-membership-inner-dialog body[data-active-screen="recharge"] .recharge-stage,
html.is-membership-checkout-embed.has-membership-inner-dialog body[data-active-screen="recharge"] .recharge-panel {
  background: transparent !important;
}

html.is-membership-checkout-embed.has-membership-inner-dialog,
html.is-membership-checkout-embed.has-membership-inner-dialog body {
  overflow: hidden !important;
}

html.is-membership-checkout-embed.has-membership-inner-dialog .membership-embedded-checkout {
  visibility: hidden;
}

html.is-membership-checkout-embed .membership-embedded-checkout {
  min-height: 0;
  align-content: start;
  gap: 20px;
  padding: 32px 30px 28px;
}

html.is-membership-checkout-embed .membership-embedded-checkout > header {
  align-items: center;
  padding-right: 34px;
}

html.is-membership-checkout-embed .membership-embedded-checkout h1 {
  font-size: 22px;
}

html.is-membership-checkout-embed .membership-embedded-plan {
  padding: 18px;
  border: 1px solid #e2e8f4;
  border-radius: 14px;
  background: #f7f9fe;
}

html.is-membership-checkout-embed .membership-embedded-plan > div strong {
  font-size: 16px;
}

html.is-membership-checkout-embed body[data-active-screen="recharge"] .membership-embedded-consent {
  padding: 13px 14px;
  border: 1px solid #e4eaf5;
  border-radius: 14px;
  background: #f8faff;
  font-size: 11px;
  line-height: 1.8;
}

html.is-membership-checkout-embed .membership-embedded-consent .membership-agreement-inline {
  white-space: nowrap;
}

html.is-membership-checkout-embed body[data-active-screen="recharge"] .membership-embedded-submit {
  width: 100% !important;
  max-width: none !important;
  min-height: 48px;
  margin: 0 !important;
}

html.is-membership-checkout-embed .membership-embedded-note {
  margin: -7px 0 0;
}

html.is-membership-checkout-embed .membership-agreement-dialog-overlay,
html.is-membership-checkout-embed .membership-payment-dialog-overlay {
  place-items: center;
  padding: 10px !important;
  background: transparent;
  backdrop-filter: none;
}

html.is-membership-checkout-embed #app-notice-dialog {
  place-items: center;
  padding: 24px;
  background: transparent;
  backdrop-filter: none;
}

html.is-membership-checkout-embed #app-notice-dialog .exam-confirm-dialog {
  width: min(420px, 100%);
}

html.is-membership-checkout-embed .membership-agreement-dialog,
html.is-membership-checkout-embed .membership-payment-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: 100%;
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 20px;
  box-shadow: 0 26px 70px rgba(18, 28, 52, .24);
}

html.is-membership-checkout-embed .membership-payment-dialog[data-presentation="desktop"] {
  width: min(480px, 100%);
  height: auto;
  max-height: calc(100dvh - 20px);
  border-radius: 28px;
}

html.is-membership-checkout-embed .membership-agreement-dialog > header {
  padding: 20px 24px 16px;
}

html.is-membership-checkout-embed .membership-agreement-dialog > header h2 {
  font-size: 21px;
}

html.is-membership-checkout-embed .membership-agreement-dialog-body {
  min-height: 0;
  padding: 4px 32px 22px;
}

html.is-membership-checkout-embed .membership-agreement-dialog-body .agreement-copy {
  gap: 9px;
}

html.is-membership-checkout-embed .membership-agreement-dialog-body .agreement-copy p {
  font-size: 11px;
  line-height: 1.78;
}

html.is-membership-checkout-embed .membership-agreement-dialog > footer {
  padding: 14px 26px 16px;
}

@media (max-width: 520px) {
  html.is-membership-checkout-embed .membership-embedded-checkout {
    gap: 20px;
    padding: 28px 22px 24px;
  }

  html.is-membership-checkout-embed .membership-embedded-checkout h1 {
    font-size: 25px;
  }

  html.is-membership-checkout-embed .membership-embedded-plan > div strong {
    font-size: 18px;
  }

  html.is-membership-checkout-embed .membership-embedded-plan > div span,
  html.is-membership-checkout-embed .membership-embedded-consent label,
  html.is-membership-checkout-embed .membership-embedded-consent button,
  html.is-membership-checkout-embed .membership-embedded-note {
    font-size: 13px;
  }

  html.is-membership-checkout-embed body[data-active-screen="recharge"] .membership-embedded-submit {
    font-size: 16px;
  }

  html.is-membership-checkout-embed .membership-agreement-dialog > header {
    padding: 17px 17px 13px;
  }

  html.is-membership-checkout-embed .membership-agreement-dialog-body {
    padding: 2px 17px 16px;
  }

  html.is-membership-checkout-embed .membership-agreement-dialog > footer {
    padding: 11px 17px 13px;
  }
}

@media (max-width: 960px) {
  body[data-active-screen="start"] {
    padding-bottom: 0;
  }

  .home-week-card header button {
    min-width: 72px;
    min-height: 44px;
    padding-inline: 12px;
  }

  .home-mobile-nav button {
    min-width: 44px;
    min-height: 44px;
  }

  body[data-auth-overlay-open="true"] .login-stage {
    padding: 16px;
  }

  body[data-auth-overlay-open="true"] .login-shell {
    width: min(500px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 26px 24px 28px;
  }

  body[data-auth-overlay-open="true"] .login-shell:has(.login-mode-tabs) {
    height: min(754px, calc(100dvh - 32px));
  }

  body[data-auth-overlay-open="true"] .login-modal-close {
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
  }

  body[data-auth-overlay-open="true"] .login-header {
    padding-bottom: 14px;
  }

  body[data-auth-overlay-open="true"] .login-mode-tab {
    height: 44px;
  }

  body[data-auth-overlay-open="true"] .login-identity-picker label,
  body[data-auth-overlay-open="true"] .login-identity-picker label:has(input:checked) {
    min-height: 44px;
  }

  body[data-auth-overlay-open="true"] .password-input-shell > button {
    right: 1px;
    width: 44px;
    height: 44px;
  }

  body[data-auth-overlay-open="true"] .login-form-links {
    min-height: 44px;
  }

  body[data-auth-overlay-open="true"] .login-form-links button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }

  html.is-membership-checkout-embed .membership-embedded-checkout > header {
    padding-right: 44px;
  }

  html.is-membership-checkout-embed body[data-active-screen="recharge"] .membership-embedded-consent {
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  html.is-membership-checkout-embed body[data-active-screen="recharge"] .membership-embedded-consent input {
    width: 19px;
    height: 19px;
    margin-top: 3px;
  }

  html.is-membership-checkout-embed .membership-embedded-consent > span {
    display: block;
    min-width: 0;
    overflow-wrap: break-word;
  }

  html.is-membership-checkout-embed .membership-embedded-consent label,
  html.is-membership-checkout-embed .membership-embedded-consent button {
    display: inline;
    min-height: 0;
    vertical-align: baseline;
  }

  html.is-membership-checkout-embed .membership-agreement-dialog > header button,
  html.is-membership-checkout-embed .membership-agreement-dialog-actions > button,
  html.is-membership-checkout-embed #app-notice-dialog .exam-confirm-dialog-close {
    min-height: 44px;
  }

  html.is-membership-checkout-embed .membership-agreement-dialog > header button,
  html.is-membership-checkout-embed #app-notice-dialog .exam-confirm-dialog-close {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 640px) {
  body[data-active-screen="start"] .start-shell.home-shell {
    min-height: calc(100dvh - 45px);
  }

  body[data-active-screen="start"] .home-mobile-sitebar {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 8px 7px 10px;
    border: 1px solid rgba(224, 230, 244, .92);
    border-radius: 19px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 9px 26px rgba(50, 72, 125, .07);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  body[data-active-screen="start"] .home-mobile-sitebar [hidden] {
    display: none !important;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-mark {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background:
      radial-gradient(circle at 72% 24%, rgba(255, 255, 255, .48), transparent 26%),
      linear-gradient(145deg, #58d6eb, #315df6 68%);
    box-shadow: 0 7px 15px rgba(49, 93, 246, .2);
    font-size: 15px;
    font-weight: 900;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-name {
    display: grid;
    min-width: 0;
    gap: 1px;
    line-height: 1.15;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-name strong {
    color: #17233d;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-name small {
    color: #76829b;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .025em;
    white-space: nowrap;
    user-select: text;
    -webkit-user-select: text;
  }

  body[data-active-screen="start"] :is(.home-mobile-sitebar-guest, .home-mobile-sitebar-account) {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar button {
    min-height: 36px;
    padding: 0 10px;
    color: #69758d;
    border: 0;
    border-radius: 12px;
    background: transparent;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
  }

  body[data-active-screen="start"] .home-mobile-sitebar button.is-primary {
    padding-inline: 13px;
    color: #fff;
    background: #315df6;
    box-shadow: 0 7px 16px rgba(49, 93, 246, .2);
  }

  body[data-active-screen="start"] .home-mobile-sitebar-account button {
    display: grid;
    justify-items: end;
    gap: 1px;
    padding-inline: 12px;
    color: #17233d;
    background: #eef3ff;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-account button > span {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-account button > small {
    color: #315df6;
    font-size: 8px;
  }

  body[data-active-screen="start"] .start-shell.home-shell > .home-public-company {
    margin-top: auto;
  }
}

/* Mobile home: a focused, lesson-first app layout. Desktop remains frozen. */
@media (max-width: 960px) {
  body[data-active-screen="start"] .home-welcome-mobile-title,
  body[data-active-screen="start"] .home-welcome-mobile-tagline,
  body[data-active-screen="start"] .home-welcome-mobile-line {
    display: block;
  }

  body[data-active-screen="start"] .home-welcome-mobile-title {
    margin-left: 0;
  }

  body[data-active-screen="start"] .home-welcome-mobile-title strong {
    color: var(--xiyue-blue-600);
    font: inherit;
  }

  body[data-active-screen="start"] .home-welcome-mobile-line span {
    display: inline;
    margin-left: .12em;
  }

  body[data-active-screen="start"],
  body[data-active-screen="start"] .mock-app {
    background:
      radial-gradient(circle at 88% 2%, rgba(96, 165, 250, .13), transparent 22rem),
      #f5f7fc;
  }

  body[data-active-screen="start"] .start-stage {
    min-height: 100dvh;
    padding:
      max(16px, env(safe-area-inset-top))
      max(15px, env(safe-area-inset-right))
      calc(106px + env(safe-area-inset-bottom))
      max(15px, env(safe-area-inset-left));
  }

  body[data-active-screen="start"] .start-shell.home-shell {
    width: min(620px, 100%);
    min-height: 0;
    margin-inline: auto;
    gap: 17px;
  }

  body[data-active-screen="start"] .home-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
  }

  body[data-active-screen="start"] .home-main,
  body[data-active-screen="start"] .home-side {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  body[data-active-screen="start"] .home-welcome-card {
    min-height: 170px;
    height: auto;
    padding: 25px 42% 24px 22px;
    border: 1px solid rgba(255, 255, 255, .94);
    border-radius: 27px;
    background:
      radial-gradient(circle at 93% 12%, rgba(132, 196, 255, .3), transparent 12rem),
      linear-gradient(135deg, #fff 0%, #f6f9ff 100%);
    box-shadow: 0 13px 34px rgba(50, 72, 125, .08);
  }

  body[data-active-screen="start"] .home-welcome-card::before {
    right: -116px;
    bottom: -178px;
    width: 350px;
    height: 350px;
    background: linear-gradient(145deg, rgba(86, 154, 255, .18), rgba(94, 102, 246, .08));
  }

  body[data-active-screen="start"] .home-welcome-copy {
    max-width: none;
  }

  body[data-active-screen="start"] .home-eyebrow {
    margin-bottom: 7px;
    font-size: 9px;
    letter-spacing: .16em;
  }

  body[data-active-screen="start"] .home-welcome-copy h1 {
    font-size: clamp(25px, 7vw, 31px);
    line-height: 1.13;
  }

  body[data-active-screen="start"] .home-welcome-copy p {
    max-width: 215px;
    margin-top: 9px;
    font-size: 11px;
    line-height: 1.5;
  }

  body[data-active-screen="start"] .home-welcome-art {
    right: -2px;
    bottom: -4px;
    width: 43%;
    max-width: 178px;
    height: 150px;
  }

  body[data-active-screen="start"] .home-welcome-art img {
    right: -5px;
    bottom: -22px;
    width: 150px;
    height: 150px;
  }

  body[data-active-screen="start"] .home-note-one {
    top: 8px;
    right: 8px;
    left: auto;
  }

  body[data-active-screen="start"] .home-note-two {
    top: 31px;
    right: auto;
    left: 0;
  }

  body[data-active-screen="start"] .home-note-three {
    top: 0;
    right: auto;
    left: 48px;
  }

  body[data-active-screen="start"] .home-main > .home-welcome-card {
    order: 1;
  }

  body[data-active-screen="start"] .home-main > .home-learning {
    order: 2;
  }

  body[data-active-screen="start"] .home-main > .home-stats {
    order: 3;
  }

  body[data-active-screen="start"] .home-shell .home-learning {
    display: none;
  }

  body[data-active-screen="start"] .home-desktop-feature-heading {
    display: grid;
    gap: 4px;
    padding: 4px 4px 0;
  }

  body[data-active-screen="start"] .home-desktop-feature-heading small {
    color: #315df6;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .14em;
  }

  body[data-active-screen="start"] .home-desktop-feature-heading h2 {
    margin: 0;
    color: var(--home-ink);
    font-size: 21px;
    line-height: 1.25;
    letter-spacing: -.025em;
  }

  body[data-active-screen="start"] .home-desktop-feature-heading p {
    margin: 0;
    color: var(--home-muted);
    font-size: 10px;
    line-height: 1.55;
  }

  body[data-active-screen="start"] .home-section-heading,
  body[data-active-screen="start"] .home-mobile-materials,
  body[data-active-screen="start"] .home-mobile-redundant-practice,
  body[data-active-screen="start"] .home-desktop-wrong {
    display: none !important;
  }

  body[data-active-screen="start"] .home-learning-grid,
  body[data-active-screen="start"] .home-learning-grid .start-card-group {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  body[data-active-screen="start"] .home-learning-grid .start-card-group,
  body[data-active-screen="start"] .home-exam-menu-grid > .home-feature-preview {
    grid-column: auto;
  }

  body[data-active-screen="start"] .home-learning-grid .start-card.home-feature-card {
    min-height: 106px;
    gap: 14px;
    padding: 18px;
    border-radius: 23px;
  }

  body[data-active-screen="start"] .home-learning-grid .start-card.home-feature-primary {
    min-height: 142px;
    padding-right: 16px;
    border-radius: 25px;
    background:
      radial-gradient(circle at 92% 16%, rgba(135, 206, 255, .36), transparent 11rem),
      linear-gradient(135deg, #386cfb 0%, #2853e5 62%, #2245c9 100%);
    box-shadow: 0 16px 34px rgba(49, 93, 246, .2);
  }

  body[data-active-screen="start"] .home-learning-grid .start-card.home-feature-preview {
    min-height: 102px;
    border: 1px solid #e5eafb;
    background: #fff;
    box-shadow: 0 10px 27px rgba(50, 72, 125, .07);
  }

  body[data-active-screen="start"] .home-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  body[data-active-screen="start"] .home-feature-copy {
    gap: 4px;
  }

  body[data-active-screen="start"] .home-feature-copy strong {
    font-size: 18px;
  }

  body[data-active-screen="start"] .home-feature-copy > span {
    display: -webkit-box;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-active-screen="start"] .home-feature-lock {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  body[data-active-screen="start"] .start-dashboard.home-stats {
    gap: 8px;
  }

  body[data-active-screen="start"] .home-stat {
    min-height: 72px;
    border: 1px solid rgba(255, 255, 255, .96);
    border-radius: 19px;
    box-shadow: 0 9px 24px rgba(50, 72, 125, .06);
  }

  body[data-active-screen="start"] .home-side-card.home-week-card {
    padding: 21px 20px;
    border-radius: 25px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(50, 72, 125, .07);
  }

  body[data-active-screen="start"] .home-public-company {
    margin-top: 4px;
    border-top-color: transparent;
    background: transparent;
  }

}

@media (max-width: 390px) {
  body[data-active-screen="start"] .home-welcome-card {
    min-height: 164px;
    padding-right: 39%;
  }

  body[data-active-screen="start"] .home-welcome-copy h1 {
    font-size: 25px;
  }

  body[data-active-screen="start"] .home-learning-grid .start-card.home-feature-primary {
    min-height: 136px;
  }

  body[data-active-screen="start"] .home-learning-grid .start-card.home-feature-card {
    padding: 16px;
  }

  body[data-active-screen="start"] .home-side-card.home-week-card {
    padding-right: 17px;
    padding-left: 17px;
  }
}

/* Mobile guest account preview: the page can be explored before sign-in. */
@media (max-width: 960px) {
  body[data-active-screen="login"]:has(.account-ui-guest-preview),
  body[data-active-screen="login"]:has(.account-ui-guest-preview) .mock-app,
  body[data-active-screen="login"] .login-stage:has(.account-ui-guest-preview),
  body[data-active-screen="login"] .login-panel:has(.account-ui-guest-preview) {
    background:
      radial-gradient(circle at 88% 1%, rgba(96, 165, 250, .12), transparent 20rem),
      #f5f7fc;
  }

  body[data-active-screen="login"] .login-stage:has(.account-ui-guest-preview) {
    min-height: 100dvh;
    padding: 0 0 calc(104px + env(safe-area-inset-bottom));
  }

  body[data-active-screen="login"] .login-shell:has(.account-ui-guest-preview) {
    width: 100%;
  }

  body[data-active-screen="login"] .login-shell:has(.account-ui-guest-preview) .login-header,
  body[data-active-screen="login"] .login-shell:has(.account-ui-guest-preview) .login-modal-close {
    display: none;
  }

  body[data-active-screen="login"] .account-ui-guest-preview {
    width: min(620px, 100%);
    margin-inline: auto;
  }

  body[data-active-screen="login"] .account-ui-guest-preview .account-ui-overview-heading {
    position: sticky;
    z-index: 3;
    top: 0;
    height: 61px;
    min-height: 61px;
    padding: max(10px, env(safe-area-inset-top)) 15px 10px;
    border-bottom: 1px solid rgba(225, 230, 241, .9);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(16px);
  }

  body[data-active-screen="login"] .account-ui-guest-preview .account-ui-overview-heading h1 {
    font-size: 20px;
  }

  body[data-active-screen="login"] .account-ui-guest-preview .account-ui-overview-heading > button {
    min-width: 56px;
    min-height: 40px;
    color: #315df6;
    border-radius: 13px;
    background: #edf2ff;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-guest-preview) .account-ui-guest-hero {
    width: calc(100% - 30px);
    min-height: 124px;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 13px;
    margin: 16px 15px 0;
    padding: 20px 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 25px;
    background:
      radial-gradient(circle at 94% 3%, rgba(108, 184, 255, .24), transparent 11rem),
      linear-gradient(135deg, #fff, #f5f8ff);
    box-shadow: 0 12px 31px rgba(50, 72, 125, .08);
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-guest-preview) .account-ui-guest-hero .account-ui-mascot {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-guest-preview) .account-ui-guest-hero .account-ui-mascot img {
    width: 66px;
    height: 66px;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-guest-preview) .account-ui-identity strong {
    font-size: 22px;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-guest-preview) .account-ui-vip {
    min-width: 56px;
    padding-left: 12px;
  }

  body[data-active-screen="login"] .account-ui-guest-auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin: 14px 15px 0;
    padding: 19px 18px;
    color: #fff;
    border-radius: 24px;
    background:
      radial-gradient(circle at 94% 8%, rgba(132, 206, 255, .34), transparent 9rem),
      linear-gradient(135deg, #386cfb, #2853e5 64%, #2245c9);
    box-shadow: 0 14px 32px rgba(49, 93, 246, .2);
  }

  body[data-active-screen="login"] .account-ui-guest-auth > div:first-child {
    display: grid;
    gap: 4px;
  }

  body[data-active-screen="login"] .account-ui-guest-auth small {
    color: rgba(255, 255, 255, .72);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .14em;
  }

  body[data-active-screen="login"] .account-ui-guest-auth strong {
    font-size: 18px;
  }

  body[data-active-screen="login"] .account-ui-guest-auth p {
    margin: 0;
    color: rgba(255, 255, 255, .76);
    font-size: 9px;
    line-height: 1.5;
  }

  body[data-active-screen="login"] .account-ui-guest-auth-actions {
    display: flex;
    gap: 7px;
  }

  body[data-active-screen="login"] .account-ui-guest-auth-actions button {
    min-width: 62px;
    min-height: 44px;
    padding: 0 12px;
    color: #315df6;
    border: 1px solid rgba(255, 255, 255, .76);
    border-radius: 14px;
    background: #fff;
    font-size: 11px;
    font-weight: 800;
  }

  body[data-active-screen="login"] .account-ui-guest-auth-actions button + button {
    color: #fff;
    background: rgba(255, 255, 255, .14);
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-guest-preview) .account-ui-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
    padding: 14px 15px 0;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-guest-preview) .account-ui-card,
  body[data-active-screen="login"] .login-panel:has(.account-ui-guest-preview) .account-ui-card + .account-ui-card {
    margin: 0;
    padding: 19px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .96);
    border-radius: 23px;
    background: #fff;
    box-shadow: 0 10px 27px rgba(50, 72, 125, .07);
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-guest-preview) .account-ui-card header {
    height: 38px;
    align-items: flex-start;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-guest-preview) .account-ui-card button {
    min-height: 66px;
    padding: 12px 2px;
  }

}

@media (max-width: 390px) {
  body[data-active-screen="login"] .account-ui-guest-auth {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  body[data-active-screen="login"] .account-ui-guest-auth-actions button {
    flex: 1 1 0;
  }
}

/* Mobile exam entry illustrations; retain the shared SVGs and desktop styling. */
@media (max-width: 960px) {
  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon {
    position: relative;
    isolation: isolate;
    color: #fff;
    border-radius: 0;
    background: transparent;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon::before,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon::after {
    position: absolute;
    content: "";
    border-radius: 9px;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon::before {
    inset: 5px 3px 2px 10px;
    z-index: -2;
    background: #ffdfb7;
    transform: rotate(12deg);
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon::after {
    inset: 2px 8px 3px 3px;
    z-index: -1;
    background: linear-gradient(145deg, #ffcb52, #ff9575 55%, #f36fac);
    box-shadow: 0 3px 5px rgba(166, 94, 76, .18);
    transform: rotate(-7deg);
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon-preview::before {
    background: #dfcfff;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon-preview::after {
    background: linear-gradient(145deg, #b28cf4, #8760dc);
    box-shadow: 0 3px 5px rgba(116, 77, 174, .18);
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon > svg {
    position: relative;
    width: 25px;
    height: 25px;
    transform: translateX(-2px) rotate(-7deg);
  }
}

/* Touch browsers can retain :hover after a tap or scroll; keyboard focus stays visible. */
@media (max-width: 960px) and (hover: none) {
  body[data-active-screen="single-practice"] .single-practice-card:not(:focus-visible) {
    transition: none;
  }

  body[data-active-screen="single-practice"] .single-practice-card:is(:hover, :active):not(:focus-visible) {
    padding-left: 2px;
    background: transparent;
    box-shadow: none;
    transform: none;
  }
}

/* Mobile library illustrations match the exam entry cards without changing their markup. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-materials-card-icon {
    --library-icon-front: linear-gradient(145deg, #ffcb52, #ff9575 55%, #f36fac);
    --library-icon-back: #ffdfb7;
    --library-icon-shadow: rgba(166, 94, 76, .18);
    position: relative;
    isolation: isolate;
    width: 49px;
    height: 49px;
    padding-right: 4px;
    color: #fff;
    border-radius: 0;
    background: transparent;
    font-size: 20px;
    transform: rotate(-7deg);
  }

  body[data-active-screen="learning-materials"] [data-category="signs"] .learning-materials-card-icon {
    --library-icon-front: linear-gradient(145deg, #b28cf4, #8760dc);
    --library-icon-back: #dfcfff;
    --library-icon-shadow: rgba(116, 77, 174, .18);
  }

  body[data-active-screen="learning-materials"] [data-category="music-library"] .learning-materials-card-icon {
    --library-icon-front: linear-gradient(145deg, #5edacb, #299fbd 55%, #4a88f3);
    --library-icon-back: #bdeee9;
    --library-icon-shadow: rgba(46, 133, 157, .18);
  }

  body[data-active-screen="learning-materials"] .learning-materials-card-icon::before,
  body[data-active-screen="learning-materials"] .learning-materials-card-icon::after {
    position: absolute;
    content: "";
    border-radius: 9px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-card-icon::before {
    inset: 5px 3px 2px 10px;
    z-index: -2;
    background: var(--library-icon-back);
    transform: rotate(19deg);
  }

  body[data-active-screen="learning-materials"] .learning-materials-card-icon::after {
    inset: 2px 8px 3px 3px;
    z-index: -1;
    background: var(--library-icon-front);
    box-shadow: 0 3px 5px var(--library-icon-shadow);
  }

  body[data-active-screen="learning-materials"] .learning-materials-card-icon > svg {
    width: 25px;
    height: 25px;
  }
}

/* Restore the original phone score/audio cards; the desktop reader is unchanged. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail {
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    background: radial-gradient(circle at 8% 0, #e5effd, transparent 34rem), #f3f4fa;
  }

  body[data-active-screen="learning-materials"] .is-music-detail .learning-materials-titlebar {
    display: flex !important; /* Override the shared entry-titlebar suppression on phones only. */
    align-items: center;
    gap: 14px;
    min-height: 46px;
    margin-bottom: 16px;
  }

  body[data-active-screen="learning-materials"] .is-music-detail .learning-materials-titlebar > button {
    display: grid;
    flex: 0 0 46px;
    place-items: center;
    width: 46px;
    height: 46px;
    min-height: 44px;
    padding: 0;
    color: #315df6;
    border: 1px solid #edf0f7;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(42, 67, 118, .06);
  }

  body[data-active-screen="learning-materials"] .is-music-detail .learning-materials-titlebar > button > span:first-child {
    font-size: 27px;
    line-height: 1;
  }

  body[data-active-screen="learning-materials"] .is-music-detail .learning-materials-titlebar > button > span:last-child {
    display: none;
  }

  body[data-active-screen="learning-materials"] .is-music-detail .learning-materials-titlebar > div { min-width: 0; }
  body[data-active-screen="learning-materials"] .is-music-detail .learning-materials-titlebar small {
    color: #98a0b3;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
  }

  body[data-active-screen="learning-materials"] .is-music-detail .learning-materials-titlebar h1 {
    margin: 7px 0 0;
    font-size: 23px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  body[data-active-screen="learning-materials"] .is-music-detail .learning-music-detail { gap: 12px; }
  body[data-active-screen="learning-materials"] .is-music-detail .learning-music-detail-audio {
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 10px 26px rgba(45, 67, 128, .08);
  }

  body[data-active-screen="learning-materials"] .is-music-detail .learning-music-detail-audio-copy > strong { font-size: 14px; }
  body[data-active-screen="learning-materials"] .is-music-detail .learning-music-audio-player { grid-template-columns: 44px auto minmax(0, 1fr) auto; }
  body[data-active-screen="learning-materials"] .is-music-detail .learning-music-audio-toggle { width: 44px; height: 44px; }
  body[data-active-screen="learning-materials"] .is-music-detail .learning-music-audio-seek { height: 44px; }
  body[data-active-screen="learning-materials"] .learning-music-mobile-score { border-radius: 20px; }
  body[data-active-screen="learning-materials"] .learning-music-mobile-score header { padding: 14px; }
  body[data-active-screen="learning-materials"] .learning-music-mobile-score header > span { width: 100%; }
  body[data-active-screen="learning-materials"] .is-music-detail .learning-music-detail-actions button { min-height: 44px; font-size: 10px; }
  body[data-active-screen="learning-materials"] .learning-music-mobile-score-pages { display: block; background: #fff; }
  body[data-active-screen="learning-materials"] .learning-music-mobile-score-page { width: 100%; height: auto; margin: 0; }
  body[data-active-screen="learning-materials"] .learning-music-mobile-score-page figcaption {
    padding: 10px 14px;
    color: #768196;
    border-bottom: 1px solid #e7ebf3;
    background: #f8f9fd;
    font-size: 10px;
    font-weight: 800;
  }

  body[data-active-screen="learning-materials"] .learning-music-mobile-score-page img {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    border: 0;
    box-shadow: none;
    transform: none;
  }
}

/* Mobile instrument hub: reuse the existing back action without changing desktop DOM. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-instrument-hub { padding-top: max(20px, env(safe-area-inset-top, 0px)); }
  body[data-active-screen="learning-materials"] .is-music-instrument-hub .learning-materials-shell { position: relative; }
  body[data-active-screen="learning-materials"] .is-music-instrument-hub .learning-materials-titlebar {
    display: block !important; position: absolute; top: 0; left: 1px; margin: 0; padding: 0; z-index: 1;
  }
  body[data-active-screen="learning-materials"] .is-music-instrument-hub .learning-materials-titlebar > div { display: none; }
  body[data-active-screen="learning-materials"] .is-music-instrument-hub .learning-materials-titlebar > button {
    display: grid; place-items: center; width: 46px; height: 46px; min-width: 46px; padding: 0;
    border: 1px solid #e8ecf4; border-radius: 16px; background: #fff;
    color: #315df6; font-size: 27px; box-shadow: 0 5px 14px rgba(42,67,118,.06);
  }
  body[data-active-screen="learning-materials"] .is-music-instrument-hub .learning-music-instrument-heading {
    min-height: 66px; padding: 3px 1px 20px 61px; border-bottom: 0;
  }
}

/* Approved catalogue-wide phone reader paint; desktop rules remain unchanged. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) {
    background: #fff;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-materials-titlebar > button {
    border-color: #e7ebf3;
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) :is(.learning-materials-titlebar small, .learning-music-detail-audio-meta small, .learning-music-mobile-score header small) {
    color: #315df6;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) :is(.learning-music-detail-audio, .learning-music-mobile-score) {
    border-color: #e7ebf3;
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) :is(.learning-materials-titlebar h1, .learning-music-detail-audio-copy > strong, .learning-music-detail-notice) {
    color: #172033;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-music-detail-audio-copy > em {
    color: #707c92;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-music-detail-audio-code {
    color: #315df6;
    background: #eef2ff;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-music-detail-audio-code + .learning-music-detail-audio-code {
    color: #7454cb;
    background: #f2edfc;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) :is(.learning-music-audio-player, .learning-violin-segmented) {
    border-radius: 12px;
    background: #f5f7fc;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-music-audio-toggle {
    background: #315df6;
    box-shadow: none;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-music-audio-seek::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #315df6 0 var(--audio-progress), #dce3f0 var(--audio-progress) 100%);
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-music-audio-seek::-webkit-slider-thumb {
    box-shadow: none;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-music-audio-seek::-moz-range-track {
    background: #dce3f0;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-music-audio-seek::-moz-range-thumb {
    box-shadow: none;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-violin-segmented button {
    color: #707c92;
    border-color: transparent;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-violin-segmented button.is-active {
    color: #315df6;
    border-color: #dce5ff;
    background: #eaf0ff;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) :is(.learning-music-mobile-score header, .learning-violin-score-selector) {
    border-color: #e7ebf3;
    background: #fff;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-music-detail-navigation button {
    color: #315df6;
    border-color: #e4eafa;
    border-radius: 10px;
    background: #f2f5ff;
    box-shadow: none;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-music-share-button {
    border-radius: 10px;
    background: #315df6;
    box-shadow: none;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has(
    .learning-mobile-reader-pilot
  ) .learning-music-mobile-score-page figcaption {
    color: #707c92;
    border-color: #e7ebf3;
    background: #f7f9fd;
  }
}

/* Phone readers put the composer/title above the audio card.
   The marker is removed when leaving the mobile detail view. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has([data-mobile-music-kicker]) .learning-materials-titlebar {
    align-items: flex-start;
    margin-top: 11px; /* Match the catalogue's existing .learning-music-library offset. */
    padding-inline: 1px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has([data-mobile-music-kicker]) .learning-materials-titlebar > button {
    border-color: #e8ecf4;
    border-radius: 16px;
    box-shadow: 0 5px 14px rgba(42, 67, 118, .06);
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has([data-mobile-music-kicker]) .learning-materials-titlebar small {
    font-size: 10px;
    letter-spacing: .02em;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has([data-mobile-music-kicker]) .learning-materials-titlebar h1 {
    margin-top: 5px;
    font-size: 16px;
    line-height: 1.4;
    text-wrap: pretty;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail:has([data-mobile-music-kicker]) .learning-music-detail-audio-copy > :is(em, strong) {
    display: none;
  }
}

/* Mobile reference and catalogue headers share an inline back/title arrangement. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-materials-stage:is(.is-term-detail, .is-sign-detail, .is-music-browser) {
    padding-top: max(20px, env(safe-area-inset-top, 0px));
  }

  body[data-active-screen="learning-materials"] :is(.is-term-detail, .is-sign-detail, .is-music-browser) :is(.learning-materials-term-browser-back, .learning-music-switch-instrument) {
    position: static;
    display: flex;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 46px;
    height: 46px;
    min-height: 44px;
    min-width: 44px;
    padding: 0;
    border: 1px solid #e8ecf4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(42, 67, 118, .06);
    font-size: 0;
  }

  body[data-active-screen="learning-materials"] :is(.is-term-detail, .is-sign-detail) .learning-materials-term-browser-back span {
    font-size: 27px;
    line-height: 1;
  }

  body[data-active-screen="learning-materials"] :is(.is-term-detail, .is-sign-detail, .is-music-browser) :is(.learning-materials-term-browser-heading, .learning-music-browser-heading) {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    padding-bottom: 20px;
  }

  body[data-active-screen="learning-materials"] :is(.is-term-detail, .is-sign-detail, .is-music-browser) :is(.learning-materials-term-browser-heading, .learning-music-browser-heading) > div {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  body[data-active-screen="learning-materials"] :is(.is-term-detail, .is-sign-detail, .is-music-browser) :is(.learning-materials-term-browser-heading, .learning-music-browser-heading) h2 {
    font-size: 23px;
  }

  body[data-active-screen="learning-materials"] :is(.is-term-detail, .is-sign-detail) .learning-materials-grade-switcher button {
    min-height: 44px;
    height: 44px;
  }

  body[data-active-screen="learning-materials"] .is-music-browser .learning-music-switch-instrument > svg {
    display: none;
  }

  /* Keep the existing accessible name and back action, with an arrow-only mobile face. */
  body[data-active-screen="learning-materials"] .is-music-browser .learning-music-switch-instrument > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body[data-active-screen="learning-materials"] .is-music-browser .learning-music-switch-instrument::before {
    content: "‹";
    font-size: 27px;
    line-height: 1;
  }

  body[data-active-screen="learning-materials"] .learning-materials-term-browser .learning-materials-term-card {
    grid-template-columns: minmax(0, 1fr) 96px;
    grid-template-rows: auto auto;
    align-content: center;
    gap: 4px 14px;
    padding: 12px 1px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-term-browser .learning-materials-term-heading {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
  }

  body[data-active-screen="learning-materials"] .learning-materials-term-browser .learning-materials-term-card strong {
    font-size: 18px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  body[data-active-screen="learning-materials"] .learning-materials-term-browser .learning-materials-term-card > p {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    font-size: 13px;
    line-height: 1.6;
  }

  body[data-active-screen="learning-materials"] .learning-materials-term-browser .learning-materials-term-actions {
    display: flex;
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 0;
  }

  body[data-active-screen="learning-materials"] .learning-materials-term-browser .learning-materials-pronunciation-row {
    display: flex;
    flex: 0 0 44px;
    flex-direction: column;
    min-width: 0;
    align-items: center;
    gap: 2px;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  body[data-active-screen="learning-materials"] .learning-materials-term-browser .learning-materials-language-badge {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 44px;
    min-width: 0;
    min-height: 24px;
    padding: 0;
    background: transparent;
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
  }

  body[data-active-screen="learning-materials"] .learning-materials-term-browser .learning-materials-pronunciation-button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    box-shadow: none;
    transform: none;
  }
}

@media (max-width: 960px) and (hover: none) {
  body[data-active-screen="learning-materials"] .learning-materials-term-browser .learning-materials-pronunciation-button:hover:not(.is-speaking) {
    box-shadow: none;
    transform: none;
  }
}

/* Size mobile sign examples from their real content, never an empty second grid row. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card,
  body[data-active-screen="learning-materials"] .learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card.is-comparison.is-inline-comparison {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    gap: 8px;
    padding: 16px 1px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-term-browser.is-sign-browser .learning-materials-symbol-card .learning-materials-symbol-copy {
    height: auto;
    min-height: 0;
    align-content: start;
  }

  body[data-active-screen="learning-materials"] .learning-materials-term-browser.is-sign-browser .learning-materials-symbol-examples,
  body[data-active-screen="learning-materials"] .learning-materials-term-browser.is-sign-browser .learning-materials-symbol-examples:is(.is-single, .is-three, .is-four) {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: auto;
    align-content: start;
    gap: 10px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-term-browser.is-sign-browser .learning-materials-symbol-example {
    grid-template-rows: auto auto;
    align-content: start;
    gap: 6px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-term-browser.is-sign-browser .learning-materials-symbol-example.is-standalone .learning-materials-symbol-mark {
    min-height: 148px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-term-browser.is-sign-browser .learning-materials-symbol-example.is-wide-symbol .learning-materials-symbol-mark {
    min-height: 112px;
  }
}

/* Match the mobile materials introduction to the single-practice heading rhythm. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-materials-hero {
    height: auto;
    min-height: 180px;
    padding: 24px 2px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-hero h2 {
    margin: 7px 0 0;
    font-size: 28px;
    line-height: 1.2;
  }

  body[data-active-screen="learning-materials"] .learning-materials-hero p {
    max-width: 780px;
    margin: 10px 0 0;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.65;
  }

  body[data-active-screen="learning-materials"] .learning-materials-mobile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-mobile-tags span {
    padding: 6px 9px;
    color: var(--xiyue-blue-600);
    border-radius: 7px;
    background: var(--xiyue-blue-050);
    font-size: 8px;
    font-weight: 800;
    line-height: 1.4;
  }
}

/* Mobile-only layered category icons; keep the existing row DOM, actions and hit areas. */
@media (max-width: 960px) {
  body[data-active-screen="single-practice"] .single-practice-grid .single-practice-card::before {
    width: 46px;
    height: 46px;
    border-radius: 0;
    background: transparent var(--practice-icon) center / contain no-repeat;
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="rhythm"] {
    --practice-icon: url("./assets/mobile-practice-icons/rhythm.svg");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="pitch"] {
    --practice-icon: url("./assets/mobile-practice-icons/pitch.svg");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="intervals"] {
    --practice-icon: url("./assets/mobile-practice-icons/intervals.svg");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="key-signatures"] {
    --practice-icon: url("./assets/mobile-practice-icons/key-signatures.svg");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="tonality"] {
    --practice-icon: url("./assets/mobile-practice-icons/tonality.svg");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="major-minor-scales"] {
    --practice-icon: url("./assets/mobile-practice-icons/major-minor-scales.svg");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="chromatic-scales"] {
    --practice-icon: url("./assets/mobile-practice-icons/chromatic-scales.svg");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="scale-degrees"] {
    --practice-icon: url("./assets/mobile-practice-icons/scale-degrees.svg");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="chords"] {
    --practice-icon: url("./assets/mobile-practice-icons/chords.svg");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="cadences"] {
    --practice-icon: url("./assets/mobile-practice-icons/cadences.svg");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="terms"] {
    --practice-icon: url("./assets/mobile-practice-icons/terms.svg");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="signs"] {
    --practice-icon: url("./assets/mobile-practice-icons/signs.svg");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="instruments"] {
    --practice-icon: url("./assets/mobile-practice-icons/instruments.svg");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="music-context"] {
    --practice-icon: url("./assets/mobile-practice-icons/music-context.svg");
  }
}

/* Three approved music-detail samples only; never present in desktop DOM. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-music-instrument-card .learning-music-piano-icon {
    background: url("./assets/mobile-practice-icons/piano.svg") center / contain no-repeat;
    border-radius: 0;
  }
  body[data-active-screen="learning-materials"] .learning-music-instrument-card .learning-music-instrument-icon.is-violin {
    background: url("./assets/mobile-practice-icons/violin.svg") center / contain no-repeat;
    border-radius: 0;
  }
  body[data-active-screen="learning-materials"] .learning-music-instrument-card .learning-music-piano-icon > span,
  body[data-active-screen="learning-materials"] .learning-music-instrument-card .learning-music-instrument-icon.is-violin > span { visibility: hidden; }
}


/* Mobile exam colours mirror desktop tokens; geometry and authored notation are untouched. */
@media (max-width: 960px) {
  body:is([data-active-screen="instructions"][data-activity-mode="exam"], [data-active-screen="exam"][data-activity-mode="exam"]) {
    --selection-blue: var(--exam-chrome-accent); background: var(--test-surface) !important;
  }
  body:is([data-active-screen="instructions"][data-activity-mode="exam"], [data-active-screen="exam"][data-activity-mode="exam"]) :is(.mock-app, .wide-stage, .wide-shell, .exam-toolbar, .exam-main, .exam-bottom-row, .paper-nav, .info-main-card-frame, .info-action-card-frame, .info-main-card-content, .info-action-card-body) {
    background: var(--test-surface) !important;
  }
  body:is([data-active-screen="instructions"][data-activity-mode="exam"], [data-active-screen="exam"][data-activity-mode="exam"]) .exam-toolbar .toolbar-brand {
    color: var(--exam-chrome-ink) !important;
  }
  body:is([data-active-screen="instructions"][data-activity-mode="exam"], [data-active-screen="exam"][data-activity-mode="exam"]) .exam-toolbar .toolbar-button {
    color: var(--exam-chrome-accent) !important; background: transparent !important; border-color: var(--exam-chrome-line) !important; box-shadow: none !important;
  }
  body:is([data-active-screen="instructions"][data-activity-mode="exam"], [data-active-screen="exam"][data-activity-mode="exam"]) .exam-toolbar :is([data-action="open-nav"], .end-button, .timer-pill) {
    color: var(--exam-chrome-accent) !important; background: var(--exam-chrome-tint) !important; border-color: var(--exam-chrome-line) !important; box-shadow: none !important;
  }
  body:is([data-active-screen="instructions"][data-activity-mode="exam"], [data-active-screen="exam"][data-activity-mode="exam"]) :is(.answer-submit, .q1-answer-button, [data-action="submit-current-page"], .info-main-continue, [data-action="continue-section"]) {
    color: #fff !important; background: var(--exam-chrome-accent) !important; border-color: transparent !important; box-shadow: 0 7px 16px var(--exam-chrome-shadow) !important;
  }
  body:is([data-active-screen="instructions"][data-activity-mode="exam"], [data-active-screen="exam"][data-activity-mode="exam"]) .wide-stage .exam-bottom-row .bottom-action {
    color: var(--exam-chrome-accent) !important; background: var(--exam-chrome-tint) !important; border-color: var(--exam-chrome-line) !important; box-shadow: none !important;
  }
  body:is([data-active-screen="instructions"][data-activity-mode="exam"], [data-active-screen="exam"][data-activity-mode="exam"]) :is(.paper-item, .paper-nav-arrow) {
    color: var(--exam-chrome-muted) !important; background: var(--test-surface) !important; border-color: var(--exam-chrome-line) !important;
  }
  body:is([data-active-screen="instructions"][data-activity-mode="exam"], [data-active-screen="exam"][data-activity-mode="exam"]) .paper-item.completed:not(.current):not(.active) {
    color: var(--exam-chrome-accent-strong) !important; background: var(--exam-chrome-tint) !important;
  }
  body:is([data-active-screen="instructions"][data-activity-mode="exam"], [data-active-screen="exam"][data-activity-mode="exam"]) .paper-item:is(.current, .active) {
    color: #fff !important; background: var(--exam-chrome-accent) !important; border-color: transparent !important;
  }
}

/* Phone toolbar paint only: match wrong-review without changing controls or layout. */
@media (max-width: 960px) {
  body:is([data-active-screen="instructions"], [data-active-screen="exam"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"]) .exam-toolbar .toolbar-button {
    color: var(--exam-chrome-accent) !important;
    border-color: transparent !important;
    border-radius: 13px !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"]) .exam-toolbar .toolbar-right .toolbar-button {
    border-radius: 9px !important;
    background: linear-gradient(180deg, #fefefe 0%, #ededed 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75) !important;
  }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"]) .exam-toolbar .toolbar-button:is(:disabled, .is-disabled) {
    background: #f1f5ff !important;
    box-shadow: none !important;
  }
  @media (hover: hover) {
    body:is([data-active-screen="instructions"], [data-active-screen="exam"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"]) .exam-toolbar .toolbar-button:hover:not(:disabled):not(.is-disabled) {
      background: var(--exam-chrome-tint) !important;
    }
  }
}

/* Mobile exam overlay and results palette; no authored question selectors. */
@media (max-width: 960px) {
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.exam-navigation-summary > span, .exam-navigation-table, .exam-navigation-list, .exam-navigation-row:not(.is-current)) { background: var(--test-surface) !important; border-color: var(--exam-chrome-line) !important; box-shadow: none !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) .exam-navigation-summary strong { color: var(--exam-chrome-ink) !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.exam-navigation-summary small, .exam-navigation-legend, .exam-navigation-item-status) { color: var(--exam-chrome-muted) !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) .exam-navigation-legend .is-current { background: var(--exam-chrome-accent) !important; }
  body[data-activity-mode]:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) .exam-toolbar .toolbar-button.toolbar-button { -webkit-appearance: none !important; appearance: none !important; background-clip: border-box !important; box-shadow: none !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.exam-navigation-dialog, .exam-confirm-dialog, .end-test-dialog, .exam-time-up-dialog) { color: var(--exam-chrome-ink) !important; background: var(--test-surface) !important; border-color: var(--exam-chrome-line) !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.exam-navigation-dialog, .exam-confirm-dialog, .end-test-dialog, .exam-time-up-dialog) :is(header, footer) { background: transparent !important; border-color: var(--exam-chrome-line) !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.exam-navigation-dialog, .exam-confirm-dialog, .end-test-dialog, .exam-time-up-dialog) h2 { color: var(--exam-chrome-ink) !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.exam-navigation-dialog, .exam-confirm-dialog, .end-test-dialog, .exam-time-up-dialog) p { color: var(--exam-chrome-muted) !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.exam-navigation-dialog-close, .exam-confirm-dialog-close, .end-test-dialog-close, .exam-confirm-dialog-cancel, .end-test-cancel-button, .exam-confirm-dialog-icon, .exam-navigation-table-head, .exam-navigation-row.is-current) { color: var(--exam-chrome-accent) !important; background: var(--exam-chrome-tint) !important; border-color: var(--exam-chrome-line) !important; box-shadow: none !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.exam-navigation-dialog-done, .exam-confirm-dialog-primary, .exam-time-up-dialog button) { color: #fff !important; background: var(--exam-chrome-accent) !important; border-color: transparent !important; box-shadow: none !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.exam-navigation-row, .exam-navigation-table, .exam-navigation-list) { border-color: var(--exam-chrome-line) !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.exam-navigation-row-main, .exam-navigation-item-copy, .exam-navigation-item-number) { color: var(--exam-chrome-ink) !important; background: transparent !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.exam-navigation-dialog-eyebrow, .exam-navigation-current-indicator, .exam-navigation-mark-button.is-active) { color: var(--exam-chrome-accent) !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) .exam-navigation-mark-button { background: transparent !important; border-color: var(--exam-chrome-line) !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.end-test-unanswered-alert, .end-test-dialog-state-icon) { color: #b52e42 !important; background: color-mix(in srgb, var(--test-surface) 85%, #ef5367) !important; border-color: color-mix(in srgb, var(--exam-chrome-line) 65%, #ef5367) !important; }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) .end-test-confirm-button { color: #fff !important; background: #c8344b !important; border-color: transparent !important; box-shadow: none !important; }
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) { color: var(--exam-chrome-ink) !important; background: var(--test-surface) !important; }
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(.mock-app, .results-stage, .results-header, .results-summary-grid, .results-category-section, .results-practice-guide, .results-answer-section, .results-answer-table-wrap) { background: var(--test-surface) !important; border-color: var(--exam-chrome-line) !important; box-shadow: none !important; }
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(.results-summary-copy article, .results-home-button, .results-section-score, .results-answer-table th, .results-answer-section-heading td) { background: var(--exam-chrome-tint) !important; border-color: var(--exam-chrome-line) !important; color: var(--exam-chrome-accent) !important; }
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(.results-header h1, .results-meta dd, .results-summary-copy strong, .results-section-heading h2, .results-category-section h2, .results-answer-section h2, .results-section-name, .results-score-text, .results-practice-guide h2, .results-practice-card strong) { color: var(--exam-chrome-ink) !important; }
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(.results-saved-message, .results-meta dt, .results-summary-copy span, .results-practice-guide-message, .results-practice-card-score) { color: var(--exam-chrome-muted) !important; }
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(.results-eyebrow, .results-section-heading > p, .results-practice-card-kicker, .results-practice-card-action) { color: var(--exam-chrome-accent) !important; }
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-score-panel { background: linear-gradient(135deg, var(--exam-chrome-accent), var(--exam-chrome-accent-strong)) !important; }
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(.results-score-label, .results-score-number strong, .results-score-number span) { color: #fff !important; }
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-achievement { color: var(--exam-chrome-accent-strong) !important; background: var(--test-surface) !important; }
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-score-panel .results-score-fill { background: #fff !important; }
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) .results-section-score .results-score-fill { background: var(--exam-chrome-accent) !important; }
  body[data-active-screen="results"]:where([data-results-layout="desktop"]) :is(.results-section-row, .results-practice-card, .results-answer-row, .results-meta div) { background: transparent !important; border-color: var(--exam-chrome-line) !important; }
}

/* Mobile activity controls and submission transition. */
@media (max-width: 960px) {
  body[data-activity-mode]:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-toolbar .toolbar-right .toolbar-button {
    -webkit-appearance: none !important; appearance: none !important;
    color: var(--exam-chrome-accent) !important; background: transparent !important;
    border-color: transparent !important; border-radius: 13px !important; box-shadow: none !important;
  }
  body[data-activity-mode]:is([data-active-screen="instructions"], [data-active-screen="exam"]) .exam-toolbar .toolbar-right .toolbar-button:disabled {
    background: var(--exam-chrome-tint) !important;
  }
  body[data-active-screen="exam"]:is([data-activity-mode="single-practice"], [data-activity-mode="wrong-review"]) :is(.answer-submit, .q1-answer-button, [data-action="submit-current-page"]) {
    color: #fff !important; background: var(--exam-chrome-accent) !important;
    border-color: transparent !important; box-shadow: 0 7px 16px var(--exam-chrome-shadow) !important;
  }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.end-test-dialog[data-save-state="saving"], .results-score-reveal-dialog) {
    background: var(--test-surface) !important; border-color: var(--exam-chrome-line) !important;
    color: var(--exam-chrome-ink) !important;
  }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .end-test-dialog[data-save-state="saving"] .end-test-dialog-state-icon {
    background: transparent !important; border-color: transparent !important; box-shadow: none !important;
  }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"]) .end-test-dialog[data-save-state="saving"] :is(.end-test-dialog-state-note, .end-test-dialog-state-spark) {
    color: var(--exam-chrome-accent) !important;
  }
  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"]) :is(.results-score-reveal-dialog, .results-score-reveal-art, .results-score-reveal-art img, .end-test-dialog-state-mascot) {
    opacity: 1 !important; mix-blend-mode: normal !important;
  }
  body:is([data-active-screen="exam"], [data-active-screen="results"]) :is(.results-score-reveal-dialog, .results-score-reveal-art img) {
    animation: none !important;
  }
}

/* Reserve equal copy space across library locales without clipping long text. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-materials-hero { min-height: 196px; }
}
@media (max-width: 760px) {
  body[data-active-screen="learning-materials"] .learning-materials-hero { min-height: 228px; }
  body[data-active-screen="learning-materials"] :is(.learning-materials-term-browser-heading, .learning-music-instrument-heading) p { min-height: 33px !important; }
}

/* Phone-only preview/review hubs only. No question selectors. */
@media (max-width: 960px) {
  body[data-active-screen="exam-preview"] .exam-preview-stage,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-stage {
    padding: 31px 16px 110px;
  }
  body[data-active-screen="exam-preview"] .exam-preview-shell,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-shell {
    width: 100%; gap: 0;
  }
  body[data-active-screen="exam-preview"] .exam-preview-titlebar,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar {
    display: grid !important; grid-template-columns: 46px minmax(0, 1fr);
    align-items: start; gap: 14px; min-height: 46px;
    margin: 0; padding: 0 0 22px; border: 0;
  }
  body[data-active-screen="exam-preview"] .exam-preview-titlebar > div,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar > div { min-width: 0; padding-top: 8px; }
  body[data-active-screen="exam-preview"] .exam-preview-titlebar small,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar small {
    display: block; color: #315df6; font-size: 10px; line-height: 1.4; font-weight: 800; letter-spacing: .12em;
  }
  body[data-active-screen="exam-preview"] .exam-preview-titlebar h1,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar h1 {
    margin: 9px 0 0; color: #19243b; font-size: 23px; line-height: 1.4;
  }
  body[data-active-screen="exam-preview"] .exam-preview-titlebar > button,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar > button {
    position: relative !important; display: grid !important; place-items: center !important; flex: 0 0 46px !important;
    width: 46px !important; height: 46px !important; min-width: 46px !important; min-height: 46px !important;
    padding: 0 !important; color: #315df6 !important; border: 1px solid #e8ecf4 !important; border-radius: 16px !important;
    background: #fff !important; box-shadow: 0 5px 14px rgba(42,67,118,.06) !important;
    font-size: 0 !important; font-weight: 400 !important; line-height: 1 !important;
  }
  body[data-active-screen="exam-preview"] .exam-preview-titlebar > button::before,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar > button::before {
    content: "‹" !important; position: absolute !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important;
    width: 27px !important; height: 27px !important; font: 400 27px/27px Arial, sans-serif !important; text-align: center !important;
  }
  body[data-active-screen="exam-preview"] .exam-preview-summary { height: auto; min-height: 140px; padding: 0 0 22px; }
  body[data-active-screen="exam-preview"] .exam-preview-summary .home-exam-guide-copy > small { display: none; }
  body[data-active-screen="exam-preview"] .exam-preview-summary h2 { font-size: 20px; line-height: 1.45; margin: 0 0 10px; }
  body[data-active-screen="exam-preview"] .exam-preview-summary p { max-width: none; font-size: 13px; line-height: 1.7; margin: 0; }
  body[data-active-screen="exam-preview"] .home-exam-guide-tags { margin-top: 14px; }
  body[data-active-screen="exam-preview"] .exam-preview-paper-card { min-height: 88px; padding: 18px 2px; }
  body[data-active-screen="exam-preview"] .exam-preview-paper-title { font-size: 17px; line-height: 1.5; }
  body[data-active-screen="exam-preview"] .exam-preview-paper-eyebrow { font-size: 11px; }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary { min-height: 194px; padding: 0 0 22px; gap: 16px; }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary h2 { font-size: 28px; margin: 8px 0; }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary p { font-size: 13px; line-height: 1.7; }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary > button { width: 100%; min-height: 44px; border-radius: 14px; font-size: 13px; }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-copy strong { font-size: 16px; }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-copy small { font-size: 12px; line-height: 1.6; }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories { padding-top: 22px; }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header small { display: none; }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header h2 { font-size: 20px; }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button { min-height: 78px; padding: 14px 2px; }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-count {
    width: 44px; height: 44px; border-radius: 14px; background: #f2f5ff; color: #315df6; font-size: 16px;
  }
}

@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .is-music-detail .learning-mobile-reader-pilot { gap: 10px; }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-mobile-reader-actions {
    padding: 0 6px;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-mobile-reader-actions .learning-music-detail-notice {
    margin: 8px 0 0;
    color: #768196;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.5;
  }
  body[data-active-screen="learning-materials"] .is-music-detail .learning-mobile-reader-pilot .learning-music-detail-audio {
    padding: 10px;
    gap: 6px;
    overflow: visible;
  }
  body[data-active-screen="learning-materials"] .is-music-detail .learning-mobile-reader-pilot .learning-music-audio-player {
    grid-template-columns: 44px auto minmax(0, 1fr) auto 44px;
    gap: 6px;
    padding: 4px;
    overflow: visible;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-music-volume-control {
    display: inline-flex;
    width: 44px;
    height: 44px;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-music-volume-toggle {
    width: 44px;
    height: 44px;
    color: #315df6;
    border: 0;
    background: transparent;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-music-volume-panel {
    width: 210px;
    max-width: calc(100vw - 70px);
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-music-audio-volume {
    height: 44px;
    touch-action: none;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-music-audio-volume::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    margin-top: -9px;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-music-audio-volume::-moz-range-thumb {
    width: 16px;
    height: 16px;
  }

  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-mobile-page-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 0 8px;
    border-bottom: 1px solid #e7ebf3;
    background: #f8f9fd;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-mobile-page-controls button {
    width: 44px;
    height: 44px;
    padding: 0;
    color: #315df6;
    border: 0;
    background: transparent;
    font-size: 24px;
    touch-action: manipulation;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-mobile-page-controls button:disabled { opacity: .3; }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-mobile-page-controls output {
    min-width: 60px;
    color: #768196;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-mobile-score-fullscreen-close {
    display: none;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-mobile-swipe-pages {
    display: flex;
    position: relative;
    width: 100%;
    height: var(--mobile-score-height, 360px);
    min-height: 0;
    padding: 0;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    touch-action: manipulation;
    scrollbar-width: none;
    background: #fff;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-mobile-swipe-pages::-webkit-scrollbar { display: none; }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-mobile-swipe-pages figure {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-mobile-swipe-pages img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot .learning-mobile-swipe-pages:focus-visible {
    outline: 2px solid #315df6;
    outline-offset: -2px;
  }

  body[data-active-screen="learning-materials"] .learning-mobile-swipe-viewer.is-app-fullscreen {
    position: fixed;
    z-index: 2300;
    inset: 0;
    display: flex;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    margin: 0;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #10141d;
    box-shadow: none;
    contain: layout paint;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-swipe-viewer.is-app-fullscreen > .learning-violin-score-selector {
    display: none;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-swipe-viewer.is-app-fullscreen .learning-mobile-page-controls {
    position: relative;
    display: flex;
    flex: 0 0 52px;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: env(safe-area-inset-top, 0) 64px 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.12);
    background: #10141d;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-swipe-viewer.is-app-fullscreen .learning-mobile-page-controls button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 24px;
    touch-action: manipulation;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-swipe-viewer.is-app-fullscreen .learning-mobile-page-controls button:disabled {
    opacity: .3;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-swipe-viewer.is-app-fullscreen .learning-mobile-page-controls output {
    min-width: 60px;
    color: rgba(255,255,255,.82);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-swipe-viewer.is-app-fullscreen .learning-mobile-page-controls > button:not(.learning-mobile-score-fullscreen-close) {
    color: #fff;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-swipe-viewer.is-app-fullscreen .learning-mobile-score-fullscreen-close {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) / 2 + 4px);
    right: max(8px, env(safe-area-inset-right, 0px));
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    font-size: 25px;
    line-height: 1;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-swipe-viewer.is-app-fullscreen .learning-mobile-swipe-pages {
    display: flex;
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    padding: 0;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    touch-action: manipulation;
    scrollbar-width: none;
    background: #10141d;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-swipe-viewer.is-app-fullscreen .learning-mobile-swipe-pages::-webkit-scrollbar {
    display: none;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-swipe-viewer.is-app-fullscreen .learning-mobile-swipe-pages figure {
    display: grid;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    place-items: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #10141d;
  }
  body[data-active-screen="learning-materials"] .learning-mobile-swipe-viewer.is-app-fullscreen .learning-mobile-swipe-pages img {
    position: static;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border: 0;
    background: #fff;
    box-shadow: none;
    object-fit: contain;
    transform: none;
  }
}

/* One phone-only back-button face and header rhythm across the materials hierarchy.
   Preserve original DOM, accessible labels, actions and all desktop rules. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] :is(
    .learning-materials-term-browser-back,
    .learning-music-switch-instrument,
    .is-music-instrument-hub .learning-materials-titlebar > button,
    .is-music-detail .learning-materials-titlebar > button
  ) {
    position: relative; display: grid; place-items: center; flex: 0 0 46px;
    width: 46px; height: 46px; min-width: 46px; min-height: 46px;
    padding: 0; gap: 0; color: #315df6;
    border: 1px solid #e8ecf4; border-radius: 16px;
    background: #fff; box-shadow: 0 5px 14px rgba(42,67,118,.06);
    font-size: 0; font-weight: 400; line-height: 1;
  }
  body[data-active-screen="learning-materials"] :is(
    .learning-materials-term-browser-back,
    .learning-music-switch-instrument,
    .is-music-instrument-hub .learning-materials-titlebar > button,
    .is-music-detail .learning-materials-titlebar > button
  )::before {
    content: "‹"; display: block; position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%); width: 27px; height: 27px;
    font-family: Arial, sans-serif; font-size: 27px; font-weight: 400;
    line-height: 27px; text-align: center;
  }
  body[data-active-screen="learning-materials"] :is(
    .learning-materials-term-browser-back,
    .is-music-detail .learning-materials-titlebar > button
  ) > span:first-child { display: none; }

  body[data-active-screen="learning-materials"] :is(.is-term-detail, .is-sign-detail) .learning-materials-term-browser { margin-top: 11px; }
  body[data-active-screen="learning-materials"] :is(.learning-materials-term-browser-heading, .learning-music-browser-heading) { padding: 0 1px 20px; }
  body[data-active-screen="learning-materials"] :is(.learning-materials-term-browser-heading, .learning-music-browser-heading) > div { padding-top: 9px; }
  body[data-active-screen="learning-materials"] .is-music-instrument-hub .learning-music-instrument-heading { padding-top: 9px; }
  body[data-active-screen="learning-materials"] :is(.learning-materials-term-browser-heading, .learning-music-browser-heading, .learning-music-instrument-heading) small {
    display: block; font-size: 9px; line-height: 11px; letter-spacing: .14em;
  }
  body[data-active-screen="learning-materials"] :is(.learning-materials-term-browser-heading, .learning-music-browser-heading, .learning-music-instrument-heading) h2 {
    margin: 6px 0; font-size: 23px; line-height: 1.25;
  }
  body[data-active-screen="learning-materials"] :is(.learning-materials-term-browser-heading, .learning-music-browser-heading, .learning-music-instrument-heading) p {
    min-height: 0; margin: 0; font-size: 10px; line-height: 1.65;
  }
  body[data-active-screen="learning-materials"] .is-music-detail .learning-materials-titlebar > div { padding-top: 9px; }
  body[data-active-screen="learning-materials"] .is-music-detail .learning-materials-titlebar small { display: block; line-height: 11px; }
}

/* Phone calendar: restore card grouping, retain current visual palette. */
@media (max-width: 960px) {
  body[data-active-screen="learning-calendar"] .learning-calendar-stage { padding: 31px 16px 110px; }
  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar { min-height: 0; border: 0; background: transparent; }
  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar-inner { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 14px; padding: 0 0 22px; min-height: 46px; }
  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar h1 { grid-column: 2; grid-row: 1; font-size: 23px; line-height: 1.4; padding-top: 8px; }
  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar h1::before { content: "LEARNING CALENDAR"; display: block; margin-bottom: 9px; color: #315df6; font-size: 10px; line-height: 1.4; letter-spacing: .12em; font-weight: 800; }
  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar button { position: relative; grid-column: 1; grid-row: 1; align-self: start; width: 46px; height: 46px; padding: 0; border: 1px solid #e8ecf4; border-radius: 16px; background: #fff; box-shadow: 0 5px 14px rgba(42,67,118,.06); font-size: 0; }
  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar button::before { content: "‹"; position: absolute; inset: 0; display: grid; place-items: center; font: 400 27px/27px Arial,sans-serif; }
  body[data-active-screen="learning-calendar"] .learning-calendar-shell { padding: 0; gap: 17px; }
  body[data-active-screen="learning-calendar"] .learning-calendar-summary { grid-template-columns: 1fr; grid-template-rows: auto auto; align-items: stretch; gap: 12px; min-height: 198px; padding: 18px 16px 15px; margin: 0; border: 1px solid var(--xiyue-line); border-radius: 24px; }
  body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy { max-width: none; }
  body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy h2 { margin-top: 5px; font-size: 19px; line-height: 1.4; white-space: normal; }
  body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy p { margin-top: 6px; font-size: 11px; line-height: 1.6; }
  body[data-active-screen="learning-calendar"] .learning-calendar-summary-stats { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
  body[data-active-screen="learning-calendar"] .learning-calendar-summary article { min-height: 55px; grid-template-columns: 1fr; justify-items: center; gap: 0; padding: 8px 3px; border: 0; border-radius: 13px; background: #f4f6ff; text-align: center; }
  body[data-active-screen="learning-calendar"] .learning-calendar-summary article > span:last-child { justify-items: center; }
  body[data-active-screen="learning-calendar"] .learning-calendar-stat-icon { display: none; }
  body[data-active-screen="learning-calendar"] .learning-calendar-summary strong { font-size: 17px; }
  body[data-active-screen="learning-calendar"] .learning-calendar-summary article small { font-size: 9px; line-height: 1.5; }
  body[data-active-screen="learning-calendar"] .learning-calendar-layout { grid-template-columns: 1fr; gap: 17px; padding: 0; }
  body[data-active-screen="learning-calendar"] :is(.learning-calendar-card,.learning-day-detail) { height: auto !important; min-height: 0 !important; max-height: none !important; margin: 0; padding: 16px 12px; border: 1px solid var(--xiyue-line); border-radius: 22px; background: #fff; overflow: visible !important; }
  body[data-active-screen="learning-calendar"] .learning-calendar-card > header { flex-direction: column; align-items: stretch; gap: 10px; }
  body[data-active-screen="learning-calendar"] .learning-calendar-month-navigation { width: 100%; grid-template-columns: 38px 1fr 38px; gap: 7px; }
  body[data-active-screen="learning-calendar"] .learning-calendar-card > header button { width: 38px; height: 38px; border-radius: 11px; background: #edf2ff; }
  body[data-active-screen="learning-calendar"] .learning-calendar-card h2 { font-size: 17px; }
  body[data-active-screen="learning-calendar"] .learning-calendar-legend { justify-content: center; font-size: 9px; }
  body[data-active-screen="learning-calendar"] .learning-calendar-day { border-radius: 10px; }
}

/* Phone account surfaces only; desktop and account actions stay unchanged. */
@media (max-width: 960px) {
  body[data-active-screen="learning-calendar"] .learning-calendar-summary-copy { display: none; }
  body[data-active-screen="learning-calendar"] .learning-calendar-summary { grid-template-rows: auto; min-height: 0; padding: 15px 16px; }

  body[data-active-screen="login"]:has(.account-ui-heading),
  body[data-active-screen="recharge"],
  body[data-active-screen="feedback"] { background: #fff; }
  body[data-active-screen="login"] .login-stage:has(.account-ui-heading),
  body[data-active-screen="recharge"] .login-stage,
  body[data-active-screen="feedback"] .login-stage { display: block; padding: 31px 16px 110px; background: #fff; }
  body[data-active-screen="login"] .login-shell:has(.account-ui-heading),
  body:is([data-active-screen="recharge"],[data-active-screen="feedback"]) .account-feature-shell { display: block; width: 100%; max-width: none; margin: 0; }
  body[data-active-screen="login"] .login-panel:has(.account-ui-heading),
  body:is([data-active-screen="recharge"],[data-active-screen="feedback"]) .login-panel { width: 100%; max-width: none; padding: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }

  body[data-active-screen="login"] .account-ui-heading,
  body:is([data-active-screen="recharge"],[data-active-screen="feedback"]) .account-feature-titlebar { display: grid; grid-template-columns: 46px minmax(0,1fr); align-items: start; gap: 14px; height: auto; min-height: 83px; margin: 0 0 20px; padding: 0; border: 0; background: transparent; }
  body[data-active-screen="login"] .account-ui-heading > div,
  body:is([data-active-screen="recharge"],[data-active-screen="feedback"]) .account-feature-titlebar > div { min-width: 0; padding-top: 8px; }
  body[data-active-screen="login"] .account-ui-heading p,
  body:is([data-active-screen="recharge"],[data-active-screen="feedback"]) .account-feature-titlebar small { display: block; margin: 0 0 9px; color: #315df6; font-size: 10px; line-height: 1.4; font-weight: 800; letter-spacing: .12em; }
  body[data-active-screen="login"] .account-ui-heading h1,
  body:is([data-active-screen="recharge"],[data-active-screen="feedback"]) .account-feature-titlebar h1 { margin: 0; font-size: 23px; line-height: 1.4; overflow-wrap: anywhere; }
  body[data-active-screen="login"] .account-ui-heading > button,
  body:is([data-active-screen="recharge"],[data-active-screen="feedback"]) .account-feature-titlebar > button { position: relative; grid-column: 1; grid-row: 1; width: 46px; height: 46px; min-height: 46px; padding: 0; color: #315df6; border: 1px solid #e8ecf4; border-radius: 16px; background: #fff; box-shadow: 0 5px 14px rgba(42,67,118,.06); font-size: 0; }
  body[data-active-screen="login"] .account-ui-heading > button::before,
  body:is([data-active-screen="recharge"],[data-active-screen="feedback"]) .account-feature-titlebar > button::before { content: "‹"; position: absolute; inset: 0; display: grid; place-items: center; font: 400 27px/27px Arial,sans-serif; }
  body[data-active-screen="login"] .account-ui-overview-heading > h1 { grid-column: 2; grid-row: 1; padding-top: 8px; }
  body[data-active-screen="login"] .account-ui-overview-heading > h1::before { content: "ACCOUNT"; display: block; margin-bottom: 9px; color: #315df6; font-size: 10px; line-height: 1.4; letter-spacing: .12em; }

  body[data-active-screen="login"] .account-ui-hero { display: grid; grid-template-columns: 54px minmax(0,1fr) auto; gap: 12px; min-height: 110px; padding: 16px 12px; border: 1px solid #e5eaf3; border-radius: 20px; background: #f7f9ff; box-shadow: none; }
  body[data-active-screen="login"] .account-ui-mascot { width: 54px; height: 54px; border-radius: 15px; background: #edf2ff; }
  body[data-active-screen="login"] .account-ui-mascot img { width: 62px; height: 62px; }
  body[data-active-screen="login"] .account-ui-identity { min-width: 0; }
  body[data-active-screen="login"] .account-ui-identity strong { font-size: 19px; overflow-wrap: anywhere; }
  body[data-active-screen="login"] .account-ui-identity :is(small,span) { font-size: 10px; white-space: normal; overflow-wrap: anywhere; }
  body[data-active-screen="login"] .account-ui-vip { margin: 0; padding: 8px; border: 0; border-radius: 12px; background: #edf2ff; }
  body[data-active-screen="login"] .account-ui-grid { grid-template-columns: minmax(0,1fr); gap: 18px; margin-top: 18px; padding: 0; }
  body[data-active-screen="login"] .account-ui-card { margin: 0; padding: 16px; border: 1px solid #e5eaf3; border-radius: 20px; background: #fff; box-shadow: none; }
  body[data-active-screen="login"] .account-ui-card header { height: auto; min-height: 35px; gap: 8px; }
  body[data-active-screen="login"] .account-ui-card header small { color: #315df6; }
  body[data-active-screen="login"] .account-ui-card button { min-height: 68px; }
  body[data-active-screen="login"] .account-ui-card button small { line-height: 1.6; white-space: normal; }
  body[data-active-screen="login"] :is(.account-identity-management-card,.account-password-management-card,.account-language-settings-card,.authorized-device-summary,.authorized-device-list-panel,.teacher-student-action-card,.teacher-student-list-card,.teacher-student-calendar-card,.teacher-student-day-card,.about-us-hero,.about-us-card) { height: auto; min-width: 0; padding: 18px 16px; border: 1px solid #e5eaf3; border-radius: 20px; background: #fff; box-shadow: none; }
  body[data-active-screen="login"] :is(.account-identity-management-card,.account-password-management-card,.account-language-settings-card) { grid-template-columns: minmax(0,1fr); gap: 18px; }
  body[data-active-screen="login"] .account-language-intro { height: auto; }
  body[data-active-screen="login"] .account-language-device-note { height: auto; margin: 0; line-height: 1.6; }
  body[data-active-screen="login"] :is(.account-language-option,.account-identity-management-options button) { border-radius: 14px; background: #f7f9ff; box-shadow: none; }
  body[data-active-screen="login"] :is(.account-language-option.is-selected,.account-identity-management-options button.is-selected) { border-color: #315df6; background: #edf2ff; }
  body[data-active-screen="login"] .account-password-panel { padding: 0; border: 0; background: transparent; box-shadow: none; }
  body[data-active-screen="login"] .login-panel:has(.account-ui-heading) .login-field input,
  body[data-active-screen="feedback"] :is(.feedback-field textarea,.feedback-field input) { border: 1px solid #e5eaf3; border-radius: 12px; background: #f7f9ff; box-shadow: none; }
  body[data-active-screen="login"] .login-panel:has(.account-ui-heading) .login-button,
  body:is([data-active-screen="recharge"],[data-active-screen="feedback"]) .login-button { border-radius: 12px; background: #edf2ff; box-shadow: none; }
  body[data-active-screen="login"] .login-panel:has(.account-ui-heading) .login-button-primary,
  body:is([data-active-screen="recharge"],[data-active-screen="feedback"]) .login-button-primary { color: #fff; background: #315df6; }
  body[data-active-screen="login"] .about-us-details > div { grid-template-columns: minmax(70px,.3fr) minmax(0,1fr); gap: 12px; }
  body[data-active-screen="login"] .about-us-hero { min-height: 150px; color: var(--home-ink); background: #f7f9ff; }
  body[data-active-screen="login"] .about-us-hero small { color: #315df6; }
  body[data-active-screen="login"] .about-us-hero p { color: #75829d; }
  body[data-active-screen="login"] .about-us-hero::after { display: none; }
}

/* Compact phone back/title headers. Keep semantic composer text in score readers. */
@media (max-width: 960px) {
  body .learning-calendar-titlebar:has(> button) > div > small,
  body .account-ui-heading > div > p,
  body .learning-materials-term-browser-heading small,
  body .learning-music-browser-heading small,
  body .learning-music-instrument-heading small { display: none !important; }
  body .learning-calendar-toolbar h1::before,
  body .account-ui-overview-heading > h1::before { display: none !important; }
  body .learning-calendar-titlebar:has(> button),
  body .account-ui-heading { min-height: 46px !important; height: auto !important; align-items: center !important; margin-bottom: 18px !important; }
  body .learning-calendar-titlebar:has(> button) > div,
  body .account-ui-heading > div,
  body .account-ui-overview-heading > h1 { padding-top: 0 !important; }
  body .learning-calendar-titlebar:has(> button) h1,
  body .account-ui-heading h1 { margin: 0 !important; }
  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar-inner { align-items: center; padding-bottom: 18px; }
  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar h1 { padding-top: 0; }
  body[data-active-screen="learning-materials"] :is(.learning-materials-term-browser-heading,.learning-music-browser-heading) { align-items: start; }
  body[data-active-screen="learning-materials"] :is(.learning-materials-term-browser-heading,.learning-music-browser-heading) > div,
  body[data-active-screen="learning-materials"] .learning-music-instrument-heading { padding-top: 0 !important; }
  body[data-active-screen="learning-materials"] :is(.learning-materials-term-browser-heading,.learning-music-browser-heading,.learning-music-instrument-heading) h2 { display: flex; align-items: center; min-height: 46px; margin: 0; }
  body[data-active-screen="learning-materials"] .learning-materials-hero { min-height: 0; padding-bottom: 22px; }
  body[data-active-screen="learning-materials"] .is-music-detail .learning-materials-titlebar > div > small { display: block !important; }
}

/* Phone vertical rhythm: content determines height in every locale. */
@media (max-width: 960px) {
  /* Keep the account overview title row visible so its back control follows the
     same hierarchy and placement as every other mobile second-level page. */

  /* Keep all three navigation entry introductions on the focused-practice rhythm.
     The shared minimum keeps the Chinese cards level; longer translations may grow. */
  body[data-active-screen="exam-menu"] .home-exam-guide,
  body[data-active-screen="single-practice"] .single-practice-summary,
  body[data-active-screen="learning-materials"] .learning-materials-hero {
    height: auto !important;
    min-height: 164px !important;
    padding: 20px 2px 18px !important;
  }
  body[data-active-screen="exam-menu"] .home-exam-guide h2,
  body[data-active-screen="single-practice"] .single-practice-summary h2,
  body[data-active-screen="learning-materials"] .learning-materials-hero h2 {
    font-size: 28px;
    line-height: 1.2;
  }
  body[data-active-screen="exam-menu"] .home-exam-guide p {
    max-width: 780px;
  }

  /* Do not reserve Chinese layouts for possible English wrapping. */
  body[data-active-screen="exam-preview"] .exam-preview-titlebar {
    margin-bottom: 14px !important;
    padding-bottom: 0 !important;
  }
  body[data-active-screen="exam-preview"] .exam-preview-summary {
    height: auto !important;
    min-height: 0 !important;
  }
  body[data-active-screen="exam-preview"] .exam-preview-summary {
    padding: 0 2px 18px;
  }
  body[data-active-screen="single-practice"] .single-practice-categories {
    padding-top: 14px;
  }
  body[data-active-screen="single-practice"] .single-practice-categories-heading {
    min-height: 50px;
    padding-bottom: 12px;
  }

  body[data-active-screen="learning-materials"] :is(.is-term-detail,.is-sign-detail) .learning-materials-term-browser {
    margin-top: 0;
  }
  body[data-active-screen="learning-materials"] :is(.learning-materials-term-browser-heading,.learning-music-browser-heading) {
    padding-bottom: 8px;
  }
  body[data-active-screen="learning-materials"] :is(.learning-materials-term-browser-heading,.learning-music-browser-heading,.learning-music-instrument-heading) p {
    min-height: 0 !important;
  }
  body[data-active-screen="learning-materials"] .learning-materials-term-tools {
    padding-top: 8px;
  }
  body[data-active-screen="learning-materials"] .learning-music-instrument-hub {
    gap: 0;
    margin-top: 0;
  }
  body[data-active-screen="learning-materials"] .is-music-instrument-hub .learning-music-instrument-heading {
    min-height: 0;
    padding: 0 1px 10px 61px !important;
  }
  body[data-active-screen="learning-materials"] .learning-music-instrument-grid {
    margin-top: 0;
  }
}

/* Phone localisation: let long English controls wrap instead of clipping. */
@media (max-width: 480px) {
  body[data-active-screen="login"] .account-language-settings-card {
    min-height: 478px;
    align-content: start;
  }
  body[data-locale="en-GB"][data-active-screen="login"] .login-code-row {
    grid-template-columns: minmax(0, 1fr);
  }
  body[data-locale="en-GB"][data-active-screen="login"] .login-code-button,
  body[data-locale="en-GB"][data-active-screen="login"] .account-password-management-card .login-code-button {
    width: 100%;
    min-width: 0;
  }
  body[data-locale="en-GB"][data-active-screen="learning-materials"] .learning-materials-search-input {
    font-size: 14px;
  }
}

/* Explicitly approved desktop icon-only update. Preserve existing layout dimensions. */
@media (min-width: 961px) {
  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon {
    position: relative;
    isolation: isolate;
    color: #fff;
    border-radius: 0;
    background: transparent;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon::before,
  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon::after {
    position: absolute;
    content: "";
    border-radius: 9px;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon::before {
    inset: 5px 3px 2px 10px;
    z-index: -2;
    background: #ffdfb7;
    transform: rotate(12deg);
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon::after {
    inset: 2px 8px 3px 3px;
    z-index: -1;
    background: linear-gradient(145deg, #ffcb52, #ff9575 55%, #f36fac);
    box-shadow: 0 3px 5px rgba(166, 94, 76, .18);
    transform: rotate(-7deg);
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon-preview::before {
    background: #dfcfff;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon-preview::after {
    background: linear-gradient(145deg, #b28cf4, #8760dc);
    box-shadow: 0 3px 5px rgba(116, 77, 174, .18);
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-icon > svg {
    position: relative;
    width: 25px;
    height: 25px;
    transform: translateX(-2px) rotate(-7deg);
  }
}

@media (min-width: 961px) {
  body[data-active-screen="learning-materials"] .learning-materials-card-icon {
    --library-icon-front: linear-gradient(145deg, #ffcb52, #ff9575 55%, #f36fac);
    --library-icon-back: #ffdfb7;
    --library-icon-shadow: rgba(166, 94, 76, .18);
    position: relative;
    isolation: isolate;
    padding-right: 4px;
    color: #fff;
    border-radius: 0;
    background: transparent;
    font-size: 20px;
    transform: rotate(-7deg);
  }

  body[data-active-screen="learning-materials"] [data-category="signs"] .learning-materials-card-icon {
    --library-icon-front: linear-gradient(145deg, #b28cf4, #8760dc);
    --library-icon-back: #dfcfff;
    --library-icon-shadow: rgba(116, 77, 174, .18);
  }

  body[data-active-screen="learning-materials"] [data-category="music-library"] .learning-materials-card-icon {
    --library-icon-front: linear-gradient(145deg, #5edacb, #299fbd 55%, #4a88f3);
    --library-icon-back: #bdeee9;
    --library-icon-shadow: rgba(46, 133, 157, .18);
  }

  body[data-active-screen="learning-materials"] .learning-materials-card-icon::before,
  body[data-active-screen="learning-materials"] .learning-materials-card-icon::after {
    position: absolute;
    content: "";
    border-radius: 9px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-card-icon::before {
    inset: 5px 3px 2px 10px;
    z-index: -2;
    background: var(--library-icon-back);
    transform: rotate(19deg);
  }

  body[data-active-screen="learning-materials"] .learning-materials-card-icon::after {
    inset: 2px 8px 3px 3px;
    z-index: -1;
    background: var(--library-icon-front);
    box-shadow: 0 3px 5px var(--library-icon-shadow);
  }

  body[data-active-screen="learning-materials"] .learning-materials-card-icon > svg {
    width: 25px;
    height: 25px;
  }
}

@media (min-width: 961px) {
  body[data-active-screen="single-practice"] .single-practice-grid .single-practice-card::before {
    border-radius: 0;
    background: transparent var(--practice-icon) center / contain no-repeat;
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="rhythm"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%23ffc44b%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%23fb9167%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23ed799d%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%23b76e59%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23ffe1b1%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M25%2018h12l7%2029H18z%22%2F%3E%3Cpath%20d%3D%22M31%2040l7-16M26%2043h10%22%2F%3E%3Ccircle%20cx%3D%2231%22%20cy%3D%2239%22%20r%3D%222%22%20fill%3D%22white%22%20stroke%3D%22none%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="pitch"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%23b397f4%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%23a27ce9%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%238159d7%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%237954a9%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23e2d4fa%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M35%2042V18c0%207%2011%207%208%2015%22%2F%3E%3Cellipse%20cx%3D%2229.5%22%20cy%3D%2243%22%20rx%3D%226.5%22%20ry%3D%224.5%22%20fill%3D%22white%22%20stroke%3D%22none%22%20transform%3D%22rotate(-17%2029.5%2043)%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="intervals"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%2360d8c7%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%2342b6bb%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23398eca%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%23428895%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23c5f0e7%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M25%2041V27m18%203V16M18%2022l-3%203%203%203m19%206%203%203-3%203%22%2F%3E%3Cpath%20d%3D%22M16%2025h14m-3%2012h12%22%20opacity%3D%22.7%22%2F%3E%3Cellipse%20cx%3D%2220%22%20cy%3D%2242%22%20rx%3D%225%22%20ry%3D%223.5%22%20fill%3D%22white%22%20stroke%3D%22none%22%2F%3E%3Cellipse%20cx%3D%2238%22%20cy%3D%2231%22%20rx%3D%225%22%20ry%3D%223.5%22%20fill%3D%22white%22%20stroke%3D%22none%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="key-signatures"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%2383bcff%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%236295ed%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23587be2%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%23586eab%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23d5e5ff%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M26%2019l-2%2027m14-27-2%2027M19%2029l25-5M18%2039l25-5%22%20stroke-width%3D%223%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="tonality"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%23ffc44b%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%23fb9167%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23ed799d%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%23b76e59%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23ffe1b1%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Ccircle%20cx%3D%2231%22%20cy%3D%2232%22%20r%3D%2214%22%20opacity%3D%22.7%22%2F%3E%3Cpath%20d%3D%22M34%2036V24l5%202%22%2F%3E%3Cellipse%20cx%3D%2229.5%22%20cy%3D%2237%22%20rx%3D%224.5%22%20ry%3D%223.5%22%20fill%3D%22white%22%20stroke%3D%22none%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="major-minor-scales"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%23b397f4%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%23a27ce9%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%238159d7%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%237954a9%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23e2d4fa%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M18%2044h8v-8h9v-8h9v-9%22%2F%3E%3Cpath%20d%3D%22M18%2031l14-14m-7%200h7v7%22%20opacity%3D%22.85%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="chromatic-scales"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%2360d8c7%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%2342b6bb%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23398eca%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%23428895%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23c5f0e7%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Crect%20x%3D%2217%22%20y%3D%2219%22%20width%3D%2228%22%20height%3D%2227%22%20rx%3D%223%22%20fill%3D%22white%22%20stroke%3D%22none%22%2F%3E%3Cg%20stroke%3D%22%233ca7b6%22%20stroke-width%3D%221.5%22%3E%3Cpath%20d%3D%22M26%2020v25m10-25v25%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22M26%2020v13m10-13v13%22%20stroke%3D%22%233199ae%22%20stroke-width%3D%224%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="scale-degrees"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%2383bcff%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%236295ed%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23587be2%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%23586eab%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23d5e5ff%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M18%2023l3-2v10m8-10h6l-4%205c6-1%206%206-1%205m16-10h-6v5c8-2%208%207%200%205%22%20stroke-width%3D%222.2%22%2F%3E%3Cpath%20d%3D%22M19%2040h4m6%200h5m6%200h5%22%20opacity%3D%22.8%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="chords"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%23ffc44b%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%23fb9167%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23ed799d%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%23b76e59%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23ffe1b1%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M17%2023h29M17%2031h29M17%2039h29%22%20opacity%3D%22.45%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M36%2016v23%22%2F%3E%3Cg%20fill%3D%22white%22%20stroke%3D%22none%22%3E%3Cellipse%20cx%3D%2230%22%20cy%3D%2224%22%20rx%3D%226%22%20ry%3D%223.4%22%2F%3E%3Cellipse%20cx%3D%2230%22%20cy%3D%2232%22%20rx%3D%226%22%20ry%3D%223.4%22%2F%3E%3Cellipse%20cx%3D%2230%22%20cy%3D%2240%22%20rx%3D%226%22%20ry%3D%223.4%22%2F%3E%3C%2Fg%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="cadences"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%23b397f4%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%23a27ce9%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%238159d7%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%237954a9%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23e2d4fa%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M26%2039V23h7m6-5v28m6-28v28%22%2F%3E%3Cellipse%20cx%3D%2221.5%22%20cy%3D%2240%22%20rx%3D%225.5%22%20ry%3D%223.5%22%20fill%3D%22white%22%20stroke%3D%22none%22%2F%3E%3Cpath%20d%3D%22M18%2028h18m-18%206h18%22%20stroke-width%3D%221.5%22%20opacity%3D%22.45%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="terms"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%23ffc44b%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%23fb9167%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23ed799d%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%23b76e59%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23ffe1b1%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M16%2041l7-20%207%2020m-11-6h8m17-1c0-7-11-7-11%200v2c0%207%2011%207%2011%200m0-7v12%22%20stroke-width%3D%222.7%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="signs"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%23b397f4%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%23a27ce9%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%238159d7%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%237954a9%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23e2d4fa%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M36%2018c-8-4-11%206-11%2016s-3%2012-7%2010m3-16h14%22%2F%3E%3Cpath%20d%3D%22M43%2034l-10%205%2010%205%22%20stroke-width%3D%222.2%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="instruments"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%2360d8c7%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%2342b6bb%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23398eca%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%23428895%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23c5f0e7%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M35%2024c-5-4-10-1-9%203%201%203-1%205-4%205-6%200-8%208-3%2013s13%203%2013-3c0-3%202-5%205-4%204%201%207-4%203-9z%22%2F%3E%3Cpath%20d%3D%22M28%2038l16-21m-4-1%206%204M24%2037l6%205M22%2042l3%202%22%2F%3E%3Cpath%20d%3D%22M40%2042l9-23%22%20opacity%3D%22.65%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }

  body[data-active-screen="single-practice"] .single-practice-card[data-practice-category="music-context"] {
    --practice-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3ClinearGradient%20id%3D%22front%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%0A%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%2383bcff%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%236295ed%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23587be2%22%2F%3E%0A%20%20%20%20%3C%2FlinearGradient%3E%0A%20%20%20%20%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%0A%20%20%20%20%20%20%3CfeDropShadow%20dx%3D%220%22%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%23586eab%22%20flood-opacity%3D%22.2%22%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23d5e5ff%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M31%2024c-5-4-10-5-16-4v24c6-1%2011%200%2016%204%205-4%2010-5%2016-4V20c-6-1-11%200-16%204v24%22%2F%3E%3Cpath%20d%3D%22M20%2028l6%202m-6%204%206%202m16%200V26%22%2F%3E%3Cellipse%20cx%3D%2238.5%22%20cy%3D%2237%22%20rx%3D%223.5%22%20ry%3D%222.5%22%20fill%3D%22white%22%20stroke%3D%22none%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
  }
}

@media (min-width: 961px) {
  body[data-active-screen="learning-materials"] .learning-music-instrument-card .learning-music-piano-icon {
    background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%3ClinearGradient%20id%3D%22front%22%20x2%3D%221%22%20y2%3D%221%22%3E%3Cstop%20stop-color%3D%22%238b9cff%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%236654d9%22%2F%3E%3C%2FlinearGradient%3E%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%3CfeDropShadow%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%236754b0%22%20flood-opacity%3D%22.2%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23ddd4ff%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2217%22%20y%3D%2220%22%20width%3D%2228%22%20height%3D%2224%22%20rx%3D%223%22%20fill%3D%22white%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M24%2021v22m7-22v22m7-22v22%22%20stroke%3D%22%238073e7%22%20stroke-width%3D%221.3%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M23.5%2021v12m7-12v12m7-12v12%22%20stroke%3D%22%237161d8%22%20stroke-width%3D%224%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%2018h26%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A") center / contain no-repeat;
    border-radius: 0;
  }
  body[data-active-screen="learning-materials"] .learning-music-instrument-card .learning-music-instrument-icon.is-violin {
    background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%20%20%3Cdefs%3E%3ClinearGradient%20id%3D%22front%22%20x2%3D%221%22%20y2%3D%221%22%3E%3Cstop%20stop-color%3D%22%23ffc44b%22%2F%3E%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%23fb9167%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23ed799d%22%2F%3E%3C%2FlinearGradient%3E%3Cfilter%20id%3D%22shadow%22%20x%3D%22-30%25%22%20y%3D%22-20%25%22%20width%3D%22160%25%22%20height%3D%22160%25%22%3E%3CfeDropShadow%20dy%3D%223%22%20stdDeviation%3D%222%22%20flood-color%3D%22%23b76e59%22%20flood-opacity%3D%22.2%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%0A%20%20%3Crect%20x%3D%2218%22%20y%3D%2213%22%20width%3D%2238%22%20height%3D%2243%22%20rx%3D%229%22%20fill%3D%22%23ffe1b1%22%20transform%3D%22rotate(14%2037%2034.5)%22%2F%3E%0A%20%20%3Cg%20transform%3D%22rotate(-7%2031%2032)%22%3E%0A%20%20%20%20%3Crect%20x%3D%229%22%20y%3D%227%22%20width%3D%2244%22%20height%3D%2249%22%20rx%3D%229%22%20fill%3D%22url(%23front)%22%20filter%3D%22url(%23shadow)%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M18%208h26a8%208%200%200%201%208%208%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-opacity%3D%22.3%22%2F%3E%0A%20%20%20%20%3Cg%20transform%3D%22rotate(27%2030%2032)%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M27%2024c-5-4-10%203-5%207%202%202%201%204-2%205-5%202-3%2011%206%2011s11-9%206-11c-3-1-4-3-2-5%205-4%200-11-5-7%22%20stroke-width%3D%222.5%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M26%2015v28m-3-27h6m-6%204h6m-6%2020h6%22%20stroke-width%3D%222%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M39%2015v34m-3-32%203-2v34l-3-2%22%20stroke-width%3D%221.8%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A") center / contain no-repeat;
    border-radius: 0;
  }
  body[data-active-screen="learning-materials"] .learning-music-instrument-card .learning-music-piano-icon > span,
  body[data-active-screen="learning-materials"] .learning-music-instrument-card .learning-music-instrument-icon.is-violin > span { visibility: hidden; }
}

/* 2026-09 phone refinement: one entrance rhythm, compact account metadata,
   consistent back rows and a calmer wrong-review overview. Desktop is frozen. */
@media (max-width: 960px) {
  /* The three main navigation destinations use the focused-practice metrics. */
  body[data-active-screen="exam-menu"] .home-exam-guide,
  body[data-active-screen="single-practice"] .single-practice-summary,
  body[data-active-screen="learning-materials"] .learning-materials-hero {
    height: auto !important;
    min-height: 164px !important;
    box-sizing: border-box;
    padding: 20px 2px 18px !important;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide-copy > small,
  body[data-active-screen="single-practice"] .single-practice-summary-copy > small,
  body[data-active-screen="learning-materials"] .learning-materials-hero > small {
    margin: 0;
    color: var(--xiyue-blue-600);
    font-size: 10px;
    font-weight: 850;
    line-height: 1.4;
    letter-spacing: .14em;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide h2,
  body[data-active-screen="single-practice"] .single-practice-summary h2,
  body[data-active-screen="learning-materials"] .learning-materials-hero h2 {
    margin: 7px 0 0;
    color: var(--xiyue-ink);
    font-size: 28px;
    font-weight: 880;
    line-height: 1.2;
    letter-spacing: -.035em;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide p,
  body[data-active-screen="single-practice"] .single-practice-summary p,
  body[data-active-screen="learning-materials"] .learning-materials-hero p {
    max-width: 780px;
    margin: 10px 0 0;
    color: var(--xiyue-muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.65;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide-tags,
  body[data-active-screen="single-practice"] .single-practice-summary-tags,
  body[data-active-screen="learning-materials"] .learning-materials-mobile-tags {
    gap: 6px;
    margin-top: 14px;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide-tags span,
  body[data-active-screen="single-practice"] .single-practice-summary-tags span,
  body[data-active-screen="learning-materials"] .learning-materials-mobile-tags span {
    padding: 6px 9px;
    color: var(--xiyue-blue-600);
    border: 0;
    border-radius: 7px;
    background: var(--xiyue-blue-050);
    font-size: 8px;
    font-weight: 800;
    line-height: 1.4;
  }

  /* The Chinese names already identify these exam choices on phones. */
  body[data-active-screen="exam-menu"] .home-exam-menu-grid .home-feature-copy > small {
    display: none !important;
  }

  /* Keep the phone profile concise; surface the account number in its section header. */
  body[data-active-screen="login"] .login-panel:has(> .account-ui-hero:not(.account-ui-guest-hero)) .account-ui-identity > span {
    display: none;
  }

  body[data-active-screen="login"] .account-ui-card header .account-ui-details-meta {
    font-size: 0 !important;
  }

  body[data-active-screen="login"] .account-ui-card header .account-ui-details-meta::after {
    content: attr(data-mobile-phone);
    color: var(--xiyue-blue-600);
    font-size: 10px;
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: .02em;
  }

  /* Match the account-detail top inset to the rest of the account hierarchy. */
  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-instrument-hub {
    padding-top: 31px;
  }

  body[data-active-screen="login"] .account-ui-heading,
  body[data-active-screen="learning-materials"] .is-music-instrument-hub .learning-music-instrument-heading {
    box-sizing: border-box;
  }

  body[data-active-screen="login"] .account-ui-heading {
    min-height: 46px !important;
    margin-bottom: 18px !important;
  }

  body[data-active-screen="learning-materials"] .is-music-instrument-hub .learning-music-instrument-heading {
    min-height: 46px;
    padding: 0 1px 0 61px !important;
  }

  body[data-active-screen="learning-materials"] .is-music-instrument-hub .learning-music-instrument-heading h2,
  body[data-active-screen="login"] .account-ui-heading h1 {
    display: flex;
    min-height: 46px;
    margin: 0 !important;
    align-items: center;
    font-size: 23px;
    line-height: 1.25;
  }

  /* The hero no longer reserves space for the removed illustration. */
  body[data-active-screen="login"] .about-us-hero > div {
    width: 100%;
    max-width: none;
  }

  body[data-active-screen="login"] .about-us-hero h2 {
    max-width: 100%;
    font-size: 23px;
    white-space: nowrap;
  }

  /* Wrong-review overview: compact cards and the same quiet hierarchy as Practice. */
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-stage {
    padding: 31px 16px 110px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-shell {
    gap: 16px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar {
    height: 46px;
    min-height: 46px;
    margin: 0 0 2px;
    padding: 0;
    border: 0;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-titlebar h1 {
    margin: 0;
    font-size: 23px;
    line-height: 1.25;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary {
    display: grid;
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 19px 18px 18px;
    overflow: hidden;
    color: var(--xiyue-ink);
    border: 1px solid #e5eaf3;
    border-radius: 20px;
    background: linear-gradient(145deg, #f8faff, #f3f6ff);
    box-shadow: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary-copy {
    max-width: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary small {
    margin-bottom: 0;
    color: var(--xiyue-blue-600);
    font-size: 10px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary h2 {
    margin: 7px 0 0;
    color: var(--xiyue-ink);
    font-size: 28px;
    line-height: 1.2;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary p {
    max-width: none;
    margin: 9px 0 0;
    color: var(--xiyue-muted);
    font-size: 11px;
    line-height: 1.65;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary > button {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    margin: 0;
    padding: 0 16px;
    color: #fff;
    border: 0;
    border-radius: 12px;
    background: var(--xiyue-blue-600);
    box-shadow: none;
    font-size: 12px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary > button:disabled {
    color: var(--xiyue-subtle);
    background: #e9edf5;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories {
    padding: 18px 16px 8px;
    border: 1px solid #e5eaf3;
    border-radius: 20px;
    background: #fff;
    box-shadow: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header {
    height: auto;
    min-height: 50px;
    margin: 0;
    padding: 0 0 12px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header h2 {
    font-size: 21px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button {
    min-height: 72px;
    padding: 9px 2px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-count {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }
}

/* 2026-09 phone refinement: align the main entries, compact calendar details,
   and let review rows reuse the focused-practice visual language. */
@media (max-width: 960px) {
  body[data-active-screen="exam-menu"] .home-exam-menu-stage,
  body[data-active-screen="single-practice"] .single-practice-stage {
    padding-top: 15px !important;
  }

  body[data-active-screen="learning-calendar"] .learning-day-detail > small:first-child,
  body[data-active-screen="learning-calendar"] .learning-day-detail > h2,
  body[data-active-screen="learning-calendar"] .learning-day-detail > p {
    display: none !important;
  }

  body[data-active-screen="learning-calendar"] .learning-day-detail .learning-day-overview {
    margin-top: 0;
  }

  body[data-active-screen="learning-calendar"] .learning-day-detail .learning-day-empty {
    min-height: 112px;
  }

  body[data-active-screen="login"] .account-ui-message--signed-in {
    display: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories {
    padding: 0 1px 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header {
    min-height: 0;
    margin-bottom: 9px;
    padding: 0 2px 15px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button {
    display: grid;
    min-height: 76px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    grid-template-rows: minmax(46px, auto);
    align-items: center;
    gap: 14px;
    padding: 10px 3px;
    border: 0;
    border-bottom: 1px solid var(--home-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button:last-child {
    border-bottom: 0;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button::before {
    content: "";
    display: block;
    width: 46px;
    height: 46px;
    grid-column: 1;
    grid-row: 1;
    background: transparent var(--wrong-review-icon) center / contain no-repeat;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-copy {
    grid-column: 2;
    grid-row: 1;
    gap: 4px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-copy strong {
    font-size: 13px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-copy small {
    font-size: 9px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-count {
    display: inline-grid;
    width: auto;
    min-width: 44px;
    height: auto;
    min-height: 30px;
    grid-column: 3;
    grid-row: 1;
    place-items: center;
    padding: 5px 9px;
    color: var(--xiyue-blue-600);
    border-radius: 10px;
    background: var(--xiyue-blue-050);
    font-size: 0;
    line-height: 1.35;
    white-space: nowrap;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-count::after {
    content: attr(data-mobile-label);
    font-size: 9px;
    font-weight: 800;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button > b {
    display: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button:disabled::before,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-list > button:disabled .wrong-review-hub-category-count {
    opacity: .42;
  }

  body[data-active-screen="wrong-review-hub"] [data-practice-category="rhythm"] { --wrong-review-icon: url("./assets/mobile-practice-icons/rhythm.svg"); }
  body[data-active-screen="wrong-review-hub"] [data-practice-category="pitch"] { --wrong-review-icon: url("./assets/mobile-practice-icons/pitch.svg"); }
  body[data-active-screen="wrong-review-hub"] [data-practice-category="intervals"] { --wrong-review-icon: url("./assets/mobile-practice-icons/intervals.svg"); }
  body[data-active-screen="wrong-review-hub"] [data-practice-category="key-signatures"] { --wrong-review-icon: url("./assets/mobile-practice-icons/key-signatures.svg"); }
  body[data-active-screen="wrong-review-hub"] [data-practice-category="tonality"] { --wrong-review-icon: url("./assets/mobile-practice-icons/tonality.svg"); }
  body[data-active-screen="wrong-review-hub"] [data-practice-category="major-minor-scales"] { --wrong-review-icon: url("./assets/mobile-practice-icons/major-minor-scales.svg"); }
  body[data-active-screen="wrong-review-hub"] [data-practice-category="chromatic-scales"] { --wrong-review-icon: url("./assets/mobile-practice-icons/chromatic-scales.svg"); }
  body[data-active-screen="wrong-review-hub"] [data-practice-category="scale-degrees"] { --wrong-review-icon: url("./assets/mobile-practice-icons/scale-degrees.svg"); }
  body[data-active-screen="wrong-review-hub"] [data-practice-category="chords"] { --wrong-review-icon: url("./assets/mobile-practice-icons/chords.svg"); }
  body[data-active-screen="wrong-review-hub"] [data-practice-category="cadences"] { --wrong-review-icon: url("./assets/mobile-practice-icons/cadences.svg"); }
  body[data-active-screen="wrong-review-hub"] [data-practice-category="terms"] { --wrong-review-icon: url("./assets/mobile-practice-icons/terms.svg"); }
  body[data-active-screen="wrong-review-hub"] [data-practice-category="signs"] { --wrong-review-icon: url("./assets/mobile-practice-icons/signs.svg"); }
  body[data-active-screen="wrong-review-hub"] [data-practice-category="instruments"] { --wrong-review-icon: url("./assets/mobile-practice-icons/instruments.svg"); }
  body[data-active-screen="wrong-review-hub"] [data-practice-category="music-context"] { --wrong-review-icon: url("./assets/mobile-practice-icons/music-context.svg"); }
}

/* Mobile review hub: keep the same information rhythm as focused practice.
   Desktop retains the existing recent-error metadata and summary layout. */
@media (max-width: 960px) {
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 14px;
    padding: 14px 2px 18px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary h2 {
    margin: 6px 0 0;
    font-size: 27px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary p {
    margin-top: 8px;
    font-size: 10px;
    line-height: 1.6;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary > button {
    width: auto;
    min-width: 126px;
    min-height: 42px;
    padding: 0 13px;
    border-radius: 12px;
    font-size: 11px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-recent {
    display: none;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-category-description {
    display: block;
    font-size: 9px;
    line-height: 1.55;
  }
}

@media (max-width: 359px) {
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary > button {
    justify-self: start;
  }
}

/* Phone-only review and confirmation cleanup. Desktop keeps its established
   overview cards and confirmation treatment. */
@media (max-width: 960px) {
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary {
    display: none !important;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories {
    margin-top: 0;
  }

  body[data-active-screen="wrong-review-hub"] [data-practice-category="all-wrong"] {
    --wrong-review-icon: url("./assets/mobile-practice-icons/all-wrong.svg");
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-all-row {
    display: grid;
  }

  .new-exam-draft-dialog .new-exam-draft-progress {
    display: none;
  }

  .new-exam-draft-dialog .new-exam-draft-end {
    color: var(--exam-chrome-accent, #315df6);
    border: 1px solid var(--exam-chrome-line, #dfe5f1);
    background: var(--exam-chrome-tint, #eef3ff);
    box-shadow: none;
  }

  .new-exam-draft-dialog .exam-confirm-dialog-cancel {
    color: #66738b;
    border-color: #e4e8f0;
    background: #f7f8fb;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
    :is(.end-test-unanswered-alert, .end-test-dialog-state-icon) {
    color: var(--exam-chrome-accent, #315df6) !important;
    border-color: var(--exam-chrome-line, #dfe5f1) !important;
    background: var(--exam-chrome-tint, #eef3ff) !important;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
    .end-test-unanswered-alert {
    border-left: 3px solid var(--exam-chrome-accent, #315df6) !important;
    color: #52617b !important;
    text-align: left;
  }

  body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
    .end-test-confirm-button {
    color: #fff !important;
    border-color: transparent !important;
    background: var(--exam-chrome-accent, #315df6) !important;
    box-shadow: none !important;
  }
}

/* Unified unfinished-exam confirmation. The same compact, calm treatment is
   used on desktop and phone; only the surrounding exam page remains
   responsive. */
.new-exam-draft-dialog {
  width: min(460px, 100%);
  padding: 32px 30px 28px;
  border-radius: 27px;
}

.new-exam-draft-dialog .new-exam-draft-progress {
  display: none;
}

.new-exam-draft-dialog .new-exam-draft-end {
  color: #315df6;
  border: 1px solid #dbe4fb;
  background: #edf2ff;
  box-shadow: none;
}

.new-exam-draft-dialog .new-exam-draft-error {
  color: #52617b !important;
  border: 1px solid #dfe6f4;
  background: #f4f7fc;
}

.new-exam-draft-dialog .exam-confirm-dialog-cancel {
  color: #66738b;
  border-color: #e4e8f0;
  background: #f7f8fb;
}

body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
  :is(.end-test-unanswered-alert, .end-test-dialog-state-icon) {
  color: var(--exam-chrome-accent, #315df6) !important;
  border-color: var(--exam-chrome-line, #dfe5f1) !important;
  background: var(--exam-chrome-tint, #eef3ff) !important;
}

body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
  .end-test-unanswered-alert {
  border-left: 3px solid var(--exam-chrome-accent, #315df6) !important;
  color: #52617b !important;
  text-align: left;
}

body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
  .end-test-confirm-button {
  color: #fff !important;
  border-color: transparent !important;
  background: var(--exam-chrome-accent, #315df6) !important;
  box-shadow: none !important;
}

/* Final phone auth contract. This overrides the older underline-tab variant,
   keeps every entry route visually identical, and uses the 16px minimum that
   prevents iOS Safari from zooming when an input receives focus. */
@media (max-width: 960px) {
  /* iOS WebKit can repeatedly re-composite a fixed blurred layer while the
     telephone keyboard edits a field.  A solid translucent scrim keeps the
     modal visually identical without the full-screen flash. */
  body[data-auth-overlay-open="true"] .login-modal-backdrop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(45, 55, 78, .7);
  }

  body[data-auth-overlay-open="true"] .login-stage {
    height: 100%;
    min-height: 100%;
  }

  body[data-auth-overlay-open="true"] .login-shell,
  body[data-auth-overlay-open="true"] .login-shell:has(.login-mode-tabs) {
    width: min(500px, calc(100vw - 24px));
    height: auto;
    /* 100vh is intentionally stable while iOS changes the keyboard's
       suggestion row; 100dvh can resize and repaint the modal per digit. */
    max-height: calc(100vh - 24px);
    padding: 24px 22px 26px;
    border-radius: 25px;
  }

  body[data-auth-overlay-open="true"] .login-header {
    gap: 5px;
    padding: 0 42px 10px;
  }

  body[data-auth-overlay-open="true"] .login-header img {
    width: 48px;
    height: 48px;
  }

  body[data-auth-overlay-open="true"] .login-copy {
    margin: 0 0 12px;
  }

  body[data-auth-overlay-open="true"] .login-copy h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body[data-auth-overlay-open="true"] .login-copy .login-hint {
    margin-top: 0;
    font-size: 11px;
  }

  body[data-auth-overlay-open="true"] .login-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin: 0 0 18px;
    padding: 5px;
    border: 0;
    border-radius: 16px;
    background: #f2f4f8;
  }

  body[data-auth-overlay-open="true"] .login-mode-tab {
    height: 44px;
    border-radius: 12px;
    font-size: 12px;
  }

  body[data-auth-overlay-open="true"] .login-mode-tab.is-active {
    color: #315df6;
    background: #fff;
    box-shadow: 0 5px 14px rgba(38, 57, 105, .08);
  }

  body[data-auth-overlay-open="true"] .login-mode-tab.is-active::after {
    display: none;
  }

  body[data-auth-overlay-open="true"] .login-field input,
  body[data-auth-overlay-open="true"] .password-input-shell > input {
    font-size: 16px !important;
  }

  body[data-auth-overlay-open="true"] input[data-mobile-auth-stable-input="true"] {
    -webkit-appearance: none;
    appearance: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    caret-color: #315df6;
  }

  body[data-auth-overlay-open="true"] input[data-mobile-auth-stable-input="true"]:focus {
    border-color: #b7c7ff;
    background: #f4f6f9;
    box-shadow: none;
  }

  /* The unauthenticated account actions live in the mascot card. */
  body[data-active-screen="login"] .login-panel:has(.account-ui-guest-preview) .account-ui-guest-hero {
    display: grid;
    min-height: 166px;
    grid-template-rows: auto auto;
  }

  body[data-active-screen="login"] .account-ui-guest-hero .account-ui-guest-auth-actions {
    display: grid;
    grid-column: 2 / 4;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  body[data-active-screen="login"] .account-ui-guest-hero .account-ui-guest-auth-actions button {
    min-width: 0;
    min-height: 42px;
    color: #fff;
    border: 1px solid #315df6;
    border-radius: 13px;
    background: #315df6;
    font-size: 11px;
    font-weight: 800;
  }

  body[data-active-screen="login"] .account-ui-guest-hero .account-ui-guest-auth-actions button + button {
    color: #315df6;
    border-color: #d5dff7;
    background: rgba(255, 255, 255, .82);
  }

  /* A teacher viewing the student's calendar already sees the student's name
     in the title bar, so the duplicate avatar/stat block is unnecessary. */
  body[data-active-screen="login"] .teacher-student-detail-hero[data-teacher-detail-tab="activity"] {
    display: none !important;
  }

  body[data-active-screen="login"] .teacher-student-heading + .teacher-student-detail-tabs,
  body[data-active-screen="login"] .teacher-student-heading + .account-ui-message + .teacher-student-detail-tabs {
    margin-top: 0;
  }
}

/* Calendar activity is communicated by a green outline, without an extra dot.
   This applies to the personal and teacher-view calendars on every viewport. */
body[data-active-screen="learning-calendar"] .learning-calendar-day.is-learned {
  border-color: #8fd8c2 !important;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day.is-learned::after {
  content: none !important;
  display: none !important;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day.is-learned.is-today:not(.is-selected) {
  border-color: #58c5a5 !important;
}

body[data-active-screen="learning-calendar"] .learning-calendar-day.is-selected:not(.is-learned) {
  border-color: var(--xiyue-blue-600, #315df6);
}

body[data-active-screen="learning-calendar"] .learning-calendar-legend span::before {
  width: 12px;
  height: 9px;
  box-sizing: border-box;
  border: 1.5px solid #58c5a5;
  border-radius: 3px;
  background: #effaf7;
}

body[data-active-screen="learning-calendar"] .learning-calendar-legend .is-today::before {
  border-color: var(--xiyue-blue-600, #315df6);
  background: var(--xiyue-blue-050, #f4f7ff);
}

.teacher-student-calendar-grid > button {
  box-sizing: border-box;
  border: 1px solid transparent;
}

.teacher-student-calendar-grid > button.has-activity {
  border-color: #8fd8c2 !important;
}

.teacher-student-calendar-grid > button.is-selected:not(.has-activity) {
  border-color: #315df6;
}

.teacher-student-calendar-grid > button i {
  display: none !important;
}

/* Mobile account overview: match the shared 46px back control and give guest
   authentication a clear primary/secondary hierarchy inside the profile card. */
@media (max-width: 960px) {
  body[data-active-screen="login"] .account-ui-guest-preview .account-ui-overview-heading,
  body[data-active-screen="login"] .login-panel:has(> .account-ui-hero:not(.account-ui-guest-hero)) > .account-ui-heading {
    position: static;
    z-index: auto;
    display: grid !important;
    height: auto;
    min-height: 46px;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  body[data-active-screen="login"] .account-ui-guest-preview .account-ui-overview-heading > h1 {
    grid-column: 2;
    grid-row: 1;
    min-height: 46px;
    padding: 0;
    font-size: 23px;
    line-height: 1.25;
  }

  body[data-active-screen="login"] .account-ui-guest-preview .account-ui-overview-heading > button,
  body[data-active-screen="login"] .login-panel:has(> .account-ui-hero:not(.account-ui-guest-hero)) > .account-ui-heading > button {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    padding: 0;
    color: #315df6;
    border: 1px solid #e8ecf4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(42, 67, 118, .06);
    font-size: 0;
  }

  body[data-active-screen="login"] .account-ui-guest-preview .account-ui-overview-heading > button::before,
  body[data-active-screen="login"] .login-panel:has(> .account-ui-hero:not(.account-ui-guest-hero)) > .account-ui-heading > button::before {
    content: "‹";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font: 400 27px/27px Arial, sans-serif;
  }

  body[data-active-screen="login"] .login-panel:has(.account-ui-guest-preview) .account-ui-guest-hero {
    min-height: 174px;
    grid-template-rows: auto auto;
    row-gap: 14px;
  }

  body[data-active-screen="login"] .account-ui-guest-hero .account-ui-guest-auth-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid rgba(219, 226, 240, .92);
  }

  body[data-active-screen="login"] .account-ui-guest-hero .account-ui-guest-auth-actions button {
    min-width: 0;
    min-height: 46px;
    padding: 0 22px;
    color: #fff;
    border: 1px solid #315df6;
    border-radius: 14px;
    background: #315df6;
    box-shadow: 0 9px 20px rgba(49, 93, 246, .18);
    font-size: 12px;
    font-weight: 800;
  }

  body[data-active-screen="login"] .account-ui-guest-hero .account-ui-guest-auth-actions button + button {
    min-width: auto;
    padding: 0 5px;
    color: #315df6;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .account-ui-guest-hero .account-ui-guest-auth-actions button + button::after {
    content: "›";
    margin-left: 5px;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    vertical-align: -1px;
  }

  body[data-active-screen="login"] .account-ui-guest-hero .account-ui-guest-auth-actions button:active {
    transform: translateY(1px);
  }
}

/* The submission illustration is a transparent asset. Keep the art stage
   transparent after the shared warning palette rules so it never renders as
   a partial tinted rectangle around the mascot. */
body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
  .end-test-dialog[data-save-state="saving"] .end-test-dialog-state-icon {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
  .end-test-dialog[data-save-state="saving"] .end-test-dialog-state-mascot {
  background: transparent !important;
  object-fit: contain;
}

.authorized-device-summary-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid #dce5fb;
  border-radius: 14px;
  background: #f5f8ff;
}

body[data-active-screen="login"] .authorized-device-summary-action > span {
  min-width: 0;
  color: #65738d;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
}

body[data-active-screen="login"] .authorized-device-summary-action .login-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 152px;
  min-height: 44px;
  margin: 0;
  padding: 0 20px;
}

@media (max-width: 760px) {
  .authorized-device-summary-action {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  body[data-active-screen="login"] .authorized-device-summary-action .login-button {
    width: 100%;
    min-width: 0;
  }

  body[data-active-screen="login"] .authorized-device-card.has-action {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 10px;
  }

  body[data-active-screen="login"] .authorized-device-remove-button {
    min-width: 54px;
    padding: 7px 10px;
  }
}

/* A device-replacement cooldown is informational: keep its device list
   read-only and separate it from the action that starts verification. */
.authorized-device-blocked-copy {
  display: grid;
  gap: 14px;
}

.authorized-device-blocked-copy .authorized-device-warning {
  margin-top: 2px;
}

.authorized-device-blocked-actions {
  margin-top: 18px;
}

.authorized-device-readonly-card {
  cursor: default;
}

.authorized-device-readonly-card > span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.authorized-device-readonly-card > span:last-child small {
  color: #64748b;
  line-height: 1.45;
}

/* The bottom navigation already identifies the phone account overview.
   Start with the profile card, matching the direct hierarchy of Practice. */
@media (max-width: 960px) {
  body[data-active-screen="login"] .account-ui-guest-preview .account-ui-overview-heading,
  body[data-active-screen="login"] .login-panel > .account-ui-main-heading {
    display: none !important;
  }

  body[data-active-screen="login"] .login-panel:has(> .account-ui-main-heading) > .account-ui-hero,
  body[data-active-screen="login"] .account-ui-guest-preview > .account-ui-hero {
    margin-top: 0;
  }

  body[data-active-screen="login"] .authorized-device-blocked-actions {
    gap: 10px;
  }
}

/* Device-limit notices contain essential account-security information. The
   compact phone login treatment may hide headings and explanatory paragraphs
   for ordinary sign-in forms, but it must never hide this state. */
@media (max-width: 960px) {
  body[data-auth-overlay-open="true"] .authorized-device-login-copy {
    display: grid !important;
    gap: 10px;
    margin: 2px 0 16px;
    text-align: left;
  }

  body[data-auth-overlay-open="true"] .authorized-device-login-copy .login-kicker {
    display: block !important;
    margin: 0;
    color: #315df6;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .14em;
  }

  body[data-auth-overlay-open="true"] .authorized-device-login-copy h1 {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    color: var(--xiyue-ink, #111a30);
    font-size: clamp(24px, 7vw, 32px);
    line-height: 1.18;
    white-space: normal;
  }

  body[data-auth-overlay-open="true"] .authorized-device-login-copy > p:not(.login-kicker):not(.login-message) {
    display: block;
    margin: 0;
    color: var(--xiyue-muted, #75829d);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.7;
  }

  body[data-auth-overlay-open="true"] .authorized-device-login-copy > .authorized-device-warning {
    margin-top: 2px;
    padding: 11px 12px;
    color: #8a5b19;
    border: 1px solid #f0d6a7;
    border-radius: 11px;
    background: #fff9ef;
    font-weight: 750;
  }
}

/* Phone account overview: use the same flat editorial hierarchy as Focused
   Practice. The bottom navigation already provides location and navigation,
   so the overview starts with content instead of another title bar/card. */
@media (max-width: 960px) {
  body[data-active-screen="login"] .login-stage:has(.account-ui-overview-heading),
  body[data-active-screen="login"] .login-stage:has(> .login-shell .account-ui-main-heading) {
    padding-top: 31px;
  }

  body[data-active-screen="login"] .login-panel .account-ui-hero {
    display: grid !important;
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: end;
    gap: 12px 16px !important;
    margin: 0 !important;
    padding: 0 0 28px !important;
    overflow: visible;
    border: 0 !important;
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body[data-active-screen="login"] .login-panel .account-ui-mascot {
    display: none !important;
  }

  body[data-active-screen="login"] .login-panel .account-ui-identity {
    display: grid;
    min-width: 0;
    grid-column: 1 / -1;
    gap: 8px;
  }

  body[data-active-screen="login"] .login-panel .account-ui-identity::before {
    content: "ACCOUNT";
    color: #315df6;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.4;
    letter-spacing: .14em;
  }

  body[data-active-screen="login"] .login-panel .account-ui-identity > small {
    display: none;
  }

  body[data-active-screen="login"] .login-panel .account-ui-identity > strong {
    color: var(--xiyue-ink, #111a30);
    font-size: clamp(32px, 9vw, 42px) !important;
    font-weight: 880;
    line-height: 1.08;
    letter-spacing: -.045em;
  }

  body[data-active-screen="login"] .login-panel .account-ui-identity > span {
    display: block !important;
    max-width: 34rem;
    color: var(--xiyue-muted, #75829d);
    font-size: 12px !important;
    font-weight: 620;
    line-height: 1.65;
    white-space: normal !important;
  }

  body[data-active-screen="login"] .login-panel .account-ui-vip {
    display: inline-flex;
    width: max-content;
    min-width: 0 !important;
    grid-column: 1;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    padding: 7px 10px !important;
    color: #315df6;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--xiyue-blue-050, #f4f7ff) !important;
  }

  body[data-active-screen="login"] .login-panel .account-ui-vip :is(strong, small) {
    color: inherit;
    font-size: 9px;
    font-weight: 800;
  }

  body[data-active-screen="login"] .account-ui-guest-hero .account-ui-guest-auth-actions {
    display: grid !important;
    min-width: 0;
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 8px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--xiyue-line, #e5eaf3);
  }

  body[data-active-screen="login"] .account-ui-guest-hero .account-ui-guest-auth-actions button {
    min-width: 0;
    min-height: 48px;
    padding: 0 22px;
    color: #fff;
    border: 1px solid #315df6;
    border-radius: 13px;
    background: #315df6;
    box-shadow: 0 9px 20px rgba(49, 93, 246, .16);
    font-size: 12px;
    font-weight: 800;
  }

  body[data-active-screen="login"] .account-ui-guest-hero .account-ui-guest-auth-actions button + button {
    width: auto;
    padding: 0 4px;
    color: #315df6;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .login-panel .account-ui-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 34px !important;
    margin: 30px 0 0 !important;
    padding: 0 !important;
  }

  body[data-active-screen="login"] .login-panel .account-ui-card,
  body[data-active-screen="login"] .login-panel .account-ui-card + .account-ui-card {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body[data-active-screen="login"] .login-panel .account-ui-card header {
    display: flex;
    min-height: 56px !important;
    align-items: flex-start;
    padding: 0 0 18px !important;
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3) !important;
  }

  body[data-active-screen="login"] .login-panel .account-ui-card header > strong {
    color: var(--xiyue-ink, #111a30);
    font-size: 23px !important;
    font-weight: 870;
    line-height: 1.25;
    letter-spacing: -.03em;
  }

  body[data-active-screen="login"] .login-panel .account-ui-card header > small {
    display: none !important;
  }

  body[data-active-screen="login"] .login-panel .account-ui-card button {
    display: grid !important;
    min-height: 82px !important;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px !important;
    width: 100%;
    padding: 15px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left;
    transform: none !important;
  }

  body[data-active-screen="login"] .login-panel .account-ui-card button::before {
    content: "";
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    border-radius: 11px;
    background-color: #ff846b;
    background-image: none;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 21px 21px;
    box-shadow: 4px 4px 0 rgba(255, 178, 86, .2);
  }

  body[data-active-screen="login"] .login-panel .account-ui-card button:nth-child(4n + 2)::before {
    background-color: #835fdf;
    box-shadow: 4px 4px 0 rgba(139, 98, 229, .18);
  }

  body[data-active-screen="login"] .login-panel .account-ui-card button:nth-child(4n + 3)::before {
    background-color: #29b5b5;
    box-shadow: 4px 4px 0 rgba(41, 181, 181, .17);
  }

  body[data-active-screen="login"] .login-panel .account-ui-card button:nth-child(4n + 4)::before {
    background-color: #4775df;
    box-shadow: 4px 4px 0 rgba(61, 104, 222, .17);
  }

  body[data-active-screen="login"] .login-panel .account-ui-card button[data-action*="identity"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
  }
  body[data-active-screen="login"] .login-panel .account-ui-card button[data-action="open-language-settings"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c3 3.3 3 14.7 0 18M12 3c-3 3.3-3 14.7 0 18'/%3E%3C/svg%3E");
  }
  body[data-active-screen="login"] .login-panel .account-ui-card button[data-action*="device"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E");
  }
  body[data-active-screen="login"] .login-panel .account-ui-card button[data-action*="password"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10' width='14' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3M12 14v3'/%3E%3C/svg%3E");
  }
  body[data-active-screen="login"] .login-panel .account-ui-card button[data-action="go-vip-recharge"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7 4 4 5-7 5 7 4-4-2 12H5L3 7Z'/%3E%3Cpath d='M7 15h10'/%3E%3C/svg%3E");
  }
  body[data-active-screen="login"] .login-panel .account-ui-card button[data-action="open-teacher-relationships"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Ccircle cx='17' cy='9' r='2'/%3E%3Cpath d='M3 20a6 6 0 0 1 12 0M15 15a5 5 0 0 1 6 5'/%3E%3C/svg%3E");
  }
  body[data-active-screen="login"] .login-panel .account-ui-card button[data-action="go-feedback"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4V5Z'/%3E%3Cpath d='M8 9h8M8 13h5'/%3E%3C/svg%3E");
  }
  body[data-active-screen="login"] .login-panel .account-ui-card button[data-action="go-about-us"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7h.01'/%3E%3C/svg%3E");
  }
  body[data-active-screen="login"] .login-panel .account-ui-card button[data-action="go-learning-calendar"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18M8 14h.01M12 14h.01M16 14h.01'/%3E%3C/svg%3E");
  }
  body[data-active-screen="login"] .login-panel .account-ui-card button[data-action="go-wrong-review"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12a8 8 0 1 0 2-5.3L4 9'/%3E%3Cpath d='M4 4v5h5M12 8v5M12 17h.01'/%3E%3C/svg%3E");
  }
  body[data-active-screen="login"] .login-panel .account-ui-card button[data-action="local-logout"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5H5v14h5M14 8l4 4-4 4M8 12h10'/%3E%3C/svg%3E");
  }

  body[data-active-screen="login"] .login-panel .account-ui-card button > span {
    display: grid;
    min-width: 0;
    gap: 5px;
  }

  body[data-active-screen="login"] .login-panel .account-ui-card button strong {
    color: var(--xiyue-ink, #111a30);
    font-size: 14px !important;
    font-weight: 820;
    line-height: 1.35;
  }

  body[data-active-screen="login"] .login-panel .account-ui-card button small {
    color: var(--xiyue-muted, #75829d);
    font-size: 10px !important;
    font-weight: 600;
    line-height: 1.55;
    white-space: normal !important;
  }

  body[data-active-screen="login"] .login-panel .account-ui-card button > b {
    margin: 0;
    color: var(--xiyue-subtle, #a1aabd);
    font-size: 20px;
    font-weight: 400;
  }

  body[data-active-screen="login"] .login-panel .account-ui-card .account-ui-logout::before {
    background-color: #e85c72;
    box-shadow: 4px 4px 0 rgba(232, 92, 114, .14);
  }

  body[data-active-screen="login"] .login-panel .account-class-management-entry {
    display: grid !important;
  }
}

/* Mobile account and browser-safe dock refinement. Keep the account intro on
   the same 164px rhythm as Focused Practice, and reserve real scroll space
   above the fixed navigation in browsers with a bottom address toolbar. */
@media (max-width: 960px) {
  /* Keep navigation outside the content scroller on every phone entry page.
     The viewport stays stationary while the page's own content scrolls. */
  html:has(> body:not([data-auth-overlay-open="true"]):is(
    [data-active-screen="start"],
    [data-active-screen="exam-menu"],
    [data-active-screen="wrong-review-hub"],
    [data-active-screen="learning-materials"],
    [data-active-screen="single-practice"],
    [data-active-screen="login"]
  )) {
    height: 100%;
    overflow: hidden;
    background: #f7f8fc;
  }

  body:not([data-auth-overlay-open="true"]):is(
    [data-active-screen="start"],
    [data-active-screen="exam-menu"],
    [data-active-screen="wrong-review-hub"],
    [data-active-screen="learning-materials"],
    [data-active-screen="single-practice"],
    [data-active-screen="login"]
  ) {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
    background: #f7f8fc;
  }

  body:not([data-auth-overlay-open="true"]):is(
    [data-active-screen="start"],
    [data-active-screen="exam-menu"],
    [data-active-screen="wrong-review-hub"],
    [data-active-screen="learning-materials"],
    [data-active-screen="single-practice"],
    [data-active-screen="login"]
  ) > .mock-app {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body[data-active-screen="start"]:not([data-auth-overlay-open="true"]) .start-stage {
    position: relative;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    padding-bottom: 0 !important;
    overflow: hidden;
  }

  body[data-active-screen="start"]:not([data-auth-overlay-open="true"]) .start-shell.home-shell {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    box-sizing: border-box;
    padding-bottom: calc(142px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-padding-bottom: calc(142px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  body[data-active-screen="exam-menu"] .home-exam-menu-stage,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-stage,
  body[data-active-screen="learning-materials"] .learning-materials-stage,
  body[data-active-screen="single-practice"] .single-practice-stage,
  body[data-active-screen="login"]:not([data-auth-overlay-open="true"]) .login-stage:has(.home-mobile-nav) {
    height: 100%;
    min-height: 0 !important;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  body[data-active-screen="login"] .login-panel .account-ui-hero {
    position: relative;
    display: grid !important;
    height: auto !important;
    min-height: 164px !important;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start;
    align-items: start;
    gap: 0 !important;
    padding: 20px 2px 18px !important;
  }

  body[data-active-screen="login"] .login-panel .account-ui-identity {
    grid-column: 1 !important;
    gap: 0;
  }

  body[data-active-screen="login"] .login-panel .account-ui-identity::before {
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: .14em;
  }

  body[data-active-screen="login"] .login-panel .account-ui-identity > strong {
    margin: 7px 0 0;
    font-size: 28px !important;
    line-height: 1.2;
    letter-spacing: -.035em;
  }

  body[data-active-screen="login"] .login-panel .account-ui-identity > span {
    margin: 10px 0 0;
    font-size: 12px !important;
    line-height: 1.65;
  }

  /* Guests have no membership state. Signed-in membership becomes a compact
     status badge and no longer consumes an extra row in the intro. */
  body[data-active-screen="login"] .login-panel .account-ui-guest-hero .account-ui-vip {
    display: none !important;
  }

  body[data-active-screen="login"] .login-panel .account-ui-hero:not(.account-ui-guest-hero) .account-ui-identity {
    padding-right: 104px;
  }

  body[data-active-screen="login"] .login-panel .account-ui-hero:not(.account-ui-guest-hero) .account-ui-vip {
    position: absolute;
    top: 19px;
    right: 2px;
    display: inline-flex;
    width: auto;
    grid-column: auto;
    align-items: center;
    gap: 5px;
    margin: 0 !important;
    padding: 6px 9px !important;
    border-radius: 7px !important;
  }

  body[data-active-screen="login"] .account-ui-guest-preview > .account-ui-guest-auth-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 18px 0 22px;
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3);
  }

  body[data-active-screen="login"] .account-ui-guest-preview > .account-ui-guest-auth-actions button {
    min-width: 0;
    min-height: 48px;
    padding: 0 22px;
    color: #fff;
    border: 1px solid #315df6;
    border-radius: 13px;
    background: #315df6;
    box-shadow: 0 9px 20px rgba(49, 93, 246, .16);
    font-size: 12px;
    font-weight: 800;
  }

  body[data-active-screen="login"] .account-ui-guest-preview > .account-ui-guest-auth-actions button + button {
    width: auto;
    padding: 0 4px;
    color: #315df6;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="login"] .login-panel .account-ui-grid {
    margin-top: 18px !important;
  }

  /* The rows describe themselves; this generic heading added no information. */
  body[data-active-screen="login"] .login-panel .account-ui-card:first-child > header {
    display: none !important;
  }

  body[data-active-screen="start"] .start-stage,
  body[data-active-screen="exam-menu"] .home-exam-menu-stage,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-stage,
  body[data-active-screen="learning-materials"] .learning-materials-stage,
  body[data-active-screen="single-practice"] .single-practice-stage,
  body[data-active-screen="login"]:not([data-auth-overlay-open="true"]) .login-stage:has(.home-mobile-nav) {
    padding-bottom: calc(142px + env(safe-area-inset-bottom)) !important;
    scroll-padding-bottom: calc(142px + env(safe-area-inset-bottom));
  }

  /* Safari moves fixed controls with the visual viewport when its bottom URL
     bar expands or collapses. Anchor the opaque continuation to the nav itself
     so page rows can never show through the browser chrome below it. */
  .home-mobile-nav {
    box-shadow:
      0 170px 0 164px #f7f8fc,
      0 14px 42px rgba(28, 44, 90, .17);
  }

  /* Single Practice used to keep its fixed dock inside the element that now
     scrolls. Mobile Safari clips fixed descendants of a momentum scroller,
     which made the entire dock disappear. The stage is now the stationary
     viewport, its shell owns scrolling, and the dock is a stage-level layer. */
  body[data-active-screen="single-practice"] .single-practice-stage {
    position: relative;
    padding-bottom: 0 !important;
    overflow: hidden;
  }

  body[data-active-screen="single-practice"] .single-practice-shell {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    box-sizing: border-box;
    padding-bottom: calc(142px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-padding-bottom: calc(142px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  body[data-active-screen="single-practice"] .single-practice-stage > .home-mobile-nav {
    position: fixed;
  }
}

/* Device-limit flow: use the same flat, editorial hierarchy as the current
   mobile pages. The product mark in the shared auth header is replaced by the
   mascot inside this flow, and each state says only what the user needs next. */
body[data-auth-overlay-open="true"] .login-shell:has(.authorized-device-login-copy) {
  width: min(470px, calc(100vw - 32px));
  padding: 30px 30px 28px;
}

body[data-auth-overlay-open="true"] .login-shell:has(.authorized-device-login-copy) .login-header {
  display: none !important;
}

body[data-auth-overlay-open="true"] .login-shell:has(.authorized-device-login-copy) .login-panel {
  min-width: 0;
}

body[data-auth-overlay-open="true"] .login-shell:has(.authorized-device-login-copy) .login-modal-close {
  top: 14px;
  right: 14px;
}

body[data-auth-overlay-open="true"] .authorized-device-login-copy {
  display: grid !important;
  grid-template-columns: 68px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 7px;
  margin: 0 0 19px;
  padding: 1px 1px 19px;
  border-bottom: 1px solid #e4e9f2;
  text-align: left;
}

body[data-auth-overlay-open="true"] .authorized-device-mascot {
  display: grid;
  width: 68px;
  height: 68px;
  grid-column: 1;
  grid-row: 1 / 3;
  place-items: center;
  align-self: start;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(145deg, #ecf5ff, #eef0ff);
}

body[data-auth-overlay-open="true"] .authorized-device-mascot img {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: contain;
  transform: translateY(4px);
}

body[data-auth-overlay-open="true"] .authorized-device-login-copy .login-kicker {
  display: block !important;
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin: 0;
  color: #315df6;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: .15em;
}

body[data-auth-overlay-open="true"] .authorized-device-login-copy h1 {
  position: static;
  width: auto;
  height: auto;
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  color: #111a30;
  font-size: 29px;
  font-weight: 850;
  line-height: 1.16;
  letter-spacing: -.04em;
  white-space: normal;
}

body[data-auth-overlay-open="true"] .authorized-device-login-copy > p:not(.login-kicker):not(.login-message) {
  display: block;
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #75829d;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.7;
}

body[data-auth-overlay-open="true"] .authorized-device-login-copy > .authorized-device-warning {
  margin-top: 7px;
  padding: 13px 15px;
  color: #78603b;
  border: 1px solid #ecd6aa;
  border-radius: 13px;
  background: #fff9ef;
  font-weight: 750;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-list {
  gap: 0;
  border-top: 0;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-card {
  min-height: 70px;
  gap: 12px;
  padding: 11px 2px;
  border: 0;
  border-bottom: 1px solid #e4e9f2;
  border-radius: 0;
  background: transparent;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-card.has-action {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #f16958;
  background: #fff0eb;
  font-size: 20px;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-card:nth-child(4n + 2) .authorized-device-icon {
  color: #7b5de3;
  background: #f1ebff;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-card:nth-child(4n + 3) .authorized-device-icon {
  color: #1d9c95;
  background: #e5f8f5;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-card:nth-child(4n + 4) .authorized-device-icon {
  color: #3974db;
  background: #e9f0ff;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-card strong {
  color: #172037;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-card small {
  color: #7e8aa1;
  font-size: 10px;
  line-height: 1.5;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-card > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-remove-button {
  min-width: 56px;
  min-height: 36px;
  padding: 0 12px;
  color: #db634f;
  border: 1px solid #f1d4ce;
  border-radius: 11px;
  background: #fff8f6;
  font-size: 11px;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-actions {
  display: grid;
  gap: 8px;
  margin-top: 17px;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-actions .login-button {
  width: 100%;
  min-height: 48px;
  margin: 0;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-actions .login-button-primary {
  color: #fff;
  border-color: #315df6;
  background: #315df6;
  box-shadow: 0 10px 24px rgba(49, 93, 246, .18);
}

body[data-auth-overlay-open="true"] .authorized-device-limit-actions .login-button:not(.login-button-primary) {
  min-height: 38px;
  color: #75819a;
  border-color: transparent;
  background: transparent;
}

@media (max-width: 960px) {
  body[data-auth-overlay-open="true"] .login-shell:has(.authorized-device-login-copy),
  body[data-auth-overlay-open="true"] .login-shell:has(.login-mode-tabs):has(.authorized-device-login-copy) {
    width: calc(100vw - 28px);
    max-height: calc(100dvh - 28px);
    padding: 25px 23px 24px;
    border-radius: 26px;
  }

  body[data-auth-overlay-open="true"] .authorized-device-login-copy {
    grid-template-columns: 62px minmax(0, 1fr);
    column-gap: 13px;
    row-gap: 6px;
    margin: 0 0 14px;
    padding: 1px 0 15px;
  }

  body[data-auth-overlay-open="true"] .authorized-device-mascot {
    width: 62px;
    height: 62px;
    border-radius: 20px;
  }

  body[data-auth-overlay-open="true"] .authorized-device-mascot img {
    width: 70px;
    height: 70px;
  }

  body[data-auth-overlay-open="true"] .authorized-device-login-copy h1 {
    font-size: clamp(25px, 7vw, 30px);
  }

  body[data-auth-overlay-open="true"] .authorized-device-login-copy > p:not(.login-kicker):not(.login-message) {
    font-size: 11px;
  }

  body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-card,
  body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-card.has-action {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    min-height: 65px;
    gap: 10px;
    padding: 9px 1px;
  }

  body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-card:not(.has-action) {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  body[data-auth-overlay-open="true"] .authorized-device-limit-list .authorized-device-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }
}

/* Mobile account overview refinement: the bottom dock is already the page
   navigation, so the duplicate back/title strip is unnecessary. Keep the
   signed-in identity summary compact and place the feature list nearby. */
@media (max-width: 960px) {
  body[data-active-screen="login"] .account-ui-guest-preview > .account-ui-overview-heading,
  body[data-active-screen="login"] .login-panel:has(> .account-ui-hero:not(.account-ui-guest-hero)) > .account-ui-main-heading {
    display: none !important;
  }

  body[data-active-screen="login"] .login-panel:has(> .account-ui-hero:not(.account-ui-guest-hero)) > .account-ui-grid {
    margin-top: 6px !important;
  }

  /* The guest account intro starts on the same 15px page rhythm as Focused
     Practice. The signed-in summary keeps its deliberately compact spacing. */
  body[data-active-screen="login"] .login-stage:has(.account-ui-guest-preview) {
    padding-top: 15px !important;
  }
}

/* The account overview mode is also written onto <body> by JavaScript. These
   direct selectors keep the phone layout deterministic in embedded Safari
   versions whose dynamic :has() invalidation can lag behind a login render. */
@media (max-width: 960px) {
  body[data-active-screen="login"][data-account-overview-mode] .login-stage {
    height: 100%;
    min-height: 0 !important;
    max-height: 100%;
    padding-bottom: calc(142px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-padding-bottom: calc(142px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  body[data-active-screen="login"][data-account-overview-mode="guest"] .login-stage {
    padding-top: 15px !important;
  }

  body[data-active-screen="login"][data-account-overview-mode="guest"] .account-ui-overview-heading,
  body[data-active-screen="login"][data-account-overview-mode="signed-in"] .account-ui-main-heading {
    display: none !important;
  }

  body[data-active-screen="login"][data-account-overview-mode="guest"] .account-ui-guest-hero {
    height: auto !important;
    min-height: 164px !important;
    box-sizing: border-box;
    padding: 20px 2px 18px !important;
  }
}

/* v86 mobile Safari stabilization. JavaScript writes these direct state
   markers so layout does not depend on dynamic :has() invalidation. */
@media (max-width: 960px) {
  html[data-mobile-app-scroll="true"] {
    height: 100%;
    overflow: hidden;
    background: #f7f8fc;
  }

  body[data-active-screen="login"][data-account-overview-mode="guest"] .account-ui-guest-kicker,
  body[data-active-screen="single-practice"] .single-practice-summary-copy > small {
    display: block !important;
    margin: 0 !important;
    color: var(--xiyue-blue-600, #315df6) !important;
    font-size: 10px !important;
    font-weight: 850 !important;
    line-height: 1.4 !important;
    letter-spacing: .14em !important;
  }

  body[data-active-screen="login"][data-account-overview-mode="guest"] .account-ui-identity::before {
    display: none !important;
    content: none !important;
  }

  body[data-active-screen="login"][data-account-overview-mode="guest"] .account-ui-identity {
    gap: 0 !important;
  }

  body[data-active-screen="login"][data-account-overview-mode="guest"] .account-ui-identity > strong,
  body[data-active-screen="single-practice"] .single-practice-summary h2 {
    margin: 7px 0 0 !important;
    font-size: 28px !important;
    font-weight: 880 !important;
    line-height: 1.2 !important;
    letter-spacing: -.035em !important;
  }

  body[data-active-screen="login"][data-account-overview-mode="guest"] .account-ui-identity > span,
  body[data-active-screen="single-practice"] .single-practice-summary p {
    margin: 10px 0 0 !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1.65 !important;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-mobile-code-heading-pilot .learning-materials-titlebar {
    display: grid !important;
    grid-template-columns: 46px auto minmax(0, 1fr);
    align-items: start;
    column-gap: 10px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-mobile-code-heading-pilot .learning-materials-titlebar > button {
    grid-column: 1;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-mobile-code-heading-pilot .learning-music-titlebar-code {
    display: flex;
    grid-column: 2;
    align-items: center;
    gap: 4px;
    min-height: 46px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-mobile-code-heading-pilot .learning-music-titlebar-code > :is(b, em) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 0 9px;
    color: #315df6;
    border-radius: 8px;
    background: #f2f5ff;
    font-size: 11px;
    font-style: normal;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-mobile-code-heading-pilot .learning-music-titlebar-code > em {
    padding-inline: 7px;
    font-size: 9px;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage.is-mobile-code-heading-pilot .learning-materials-titlebar > div {
    grid-column: 3;
    min-width: 0;
    padding-top: 3px !important;
  }

  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot.is-code-heading-pilot .learning-music-detail-audio {
    gap: 0;
  }

  /* Do not let the tapped catalogue card become Safari's anchor when the
     result list is replaced by a score whose image height resolves later. */
  body[data-active-screen="learning-materials"] .learning-materials-stage,
  body[data-active-screen="learning-materials"] .learning-materials-shell,
  body[data-active-screen="learning-materials"] .learning-music-detail {
    overflow-anchor: none;
    scroll-behavior: auto !important;
  }
}

/* v88 phone layout contract. These state/class selectors are the final mobile
   authority: overview introductions use one box model, every materials
   subpage uses one header component, and no rule depends on dynamic :has(). */
@media (max-width: 960px) {
  body[data-active-screen="login"][data-account-overview-mode] .login-stage,
  body[data-active-screen="single-practice"] .single-practice-stage,
  body[data-active-screen="learning-materials"] .learning-materials-stage:not(.is-term-detail):not(.is-sign-detail):not(.is-music-browser):not(.is-music-instrument-hub):not(.is-music-detail) {
    padding-top: 15px !important;
  }

  body[data-active-screen="login"][data-account-overview-mode] .login-panel .account-ui-hero,
  body[data-active-screen="single-practice"] .single-practice-summary,
  body[data-active-screen="learning-materials"] .learning-materials-hero {
    height: 164px !important;
    min-height: 164px !important;
    box-sizing: border-box !important;
    padding: 20px 2px 18px !important;
  }

  body[data-active-screen="login"][data-account-overview-mode] .account-ui-identity::before {
    display: none !important;
    content: none !important;
  }

  body[data-active-screen="login"][data-account-overview-mode] .account-ui-identity > .account-ui-mobile-kicker,
  body[data-active-screen="login"][data-account-overview-mode="guest"] .account-ui-guest-kicker,
  body[data-active-screen="single-practice"] .single-practice-summary-copy > small,
  body[data-active-screen="learning-materials"] .learning-materials-hero > small {
    display: block !important;
    margin: 0 !important;
    color: var(--xiyue-blue-600, #315df6) !important;
    font-size: 10px !important;
    font-weight: 850 !important;
    line-height: 1.4 !important;
    letter-spacing: .14em !important;
  }

  body[data-active-screen="login"][data-account-overview-mode] .account-ui-identity > .account-ui-account-context {
    display: none !important;
  }

  body[data-active-screen="login"][data-account-overview-mode] .account-ui-identity > strong,
  body[data-active-screen="single-practice"] .single-practice-summary h2,
  body[data-active-screen="learning-materials"] .learning-materials-hero h2 {
    margin: 7px 0 0 !important;
    color: var(--xiyue-ink, #111a30) !important;
    font-size: 28px !important;
    font-weight: 880 !important;
    line-height: 1.2 !important;
    letter-spacing: -.035em !important;
  }

  body[data-active-screen="login"][data-account-overview-mode] .account-ui-identity > span,
  body[data-active-screen="single-practice"] .single-practice-summary p,
  body[data-active-screen="learning-materials"] .learning-materials-hero p {
    margin: 10px 0 0 !important;
    color: var(--xiyue-muted, #75829d) !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1.65 !important;
  }

  body[data-active-screen="learning-materials"] .learning-materials-stage:is(.is-term-detail, .is-sign-detail, .is-music-browser, .is-music-instrument-hub) {
    padding-top: max(31px, env(safe-area-inset-top, 0px)) !important;
  }

  body[data-active-screen="learning-materials"] .is-music-instrument-hub .learning-materials-titlebar {
    display: none !important;
  }

  body[data-active-screen="learning-materials"] .learning-materials-subpage-heading,
  body[data-active-screen="learning-materials"] .is-music-instrument-hub .learning-materials-subpage-heading {
    display: grid !important;
    width: 100%;
    min-height: 64px !important;
    box-sizing: border-box;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 0 1px 12px !important;
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3) !important;
  }

  body[data-active-screen="learning-materials"] .learning-materials-subpage-heading > div {
    min-width: 0;
    grid-column: 2 !important;
    grid-row: 1 !important;
    padding: 0 !important;
  }

  body[data-active-screen="learning-materials"] .learning-materials-subpage-heading small {
    display: none !important;
  }

  body[data-active-screen="learning-materials"] .learning-materials-subpage-heading h2 {
    display: block !important;
    min-height: 0 !important;
    margin: 0 !important;
    color: var(--xiyue-ink, #111a30) !important;
    font-size: 23px !important;
    font-weight: 870 !important;
    line-height: 1.25 !important;
    letter-spacing: -.03em !important;
  }

  body[data-active-screen="learning-materials"] .learning-materials-subpage-heading p {
    min-height: 33px !important;
    margin: 6px 0 0 !important;
    color: var(--xiyue-muted, #75829d) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.65 !important;
  }

  body[data-active-screen="learning-materials"] .learning-materials-subpage-heading > .learning-materials-subpage-back {
    position: relative !important;
    display: grid !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    place-items: center;
    align-self: start;
    margin: 0 !important;
    padding: 0 !important;
    color: #315df6 !important;
    border: 1px solid #e8ecf4 !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 5px 14px rgba(42, 67, 118, .06) !important;
    font-size: 0 !important;
  }

  body[data-active-screen="learning-materials"] .learning-materials-subpage-heading > .learning-materials-subpage-back > * {
    display: none !important;
  }

  body[data-active-screen="learning-materials"] .learning-materials-subpage-heading > .learning-materials-subpage-back::before {
    content: "‹" !important;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: auto;
    height: auto;
    transform: none;
    font: 400 27px/27px Arial, sans-serif;
  }

  body[data-active-screen="learning-materials"] :is(.is-term-detail, .is-sign-detail) .learning-materials-term-browser {
    margin-top: 0 !important;
  }

  body[data-active-screen="learning-materials"] .is-music-browser .learning-music-library,
  body[data-active-screen="learning-materials"] .is-music-instrument-hub .learning-music-instrument-hub {
    margin-top: 0 !important;
  }
}

/* v89 final phone cascade guard. Keep the signed-in account description in
   the same overview text slot used by the other three primary destinations. */
@media (max-width: 960px) {
  body[data-active-screen="login"][data-account-overview-mode] .login-stage {
    padding-right: 15px !important;
    padding-left: 15px !important;
  }

  body[data-active-screen="login"][data-account-overview-mode="signed-in"] .account-ui-identity > span {
    display: block !important;
  }
}

/* v89: one explicit phone contract for all primary overview panels and every
   account-origin subpage. The body data attributes are written by JavaScript,
   so iPhone WebKit does not need to invalidate a dynamic :has() selector. */
@media (max-width: 960px) {
  body[data-active-screen="exam-menu"] .home-exam-menu-stage {
    padding-top: 15px !important;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide {
    display: block !important;
    width: 100% !important;
    height: 164px !important;
    min-height: 164px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 20px 2px 18px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide::after,
  body[data-active-screen="exam-menu"] .home-exam-guide-art {
    display: none !important;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide-copy {
    position: static !important;
    width: 100% !important;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide-copy > small {
    display: block !important;
    margin: 0 !important;
    color: var(--xiyue-blue-600, #315df6) !important;
    font-size: 10px !important;
    font-weight: 850 !important;
    line-height: 1.4 !important;
    letter-spacing: .14em !important;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide h2 {
    margin: 7px 0 0 !important;
    color: var(--xiyue-ink, #111a30) !important;
    font-size: 28px !important;
    font-weight: 880 !important;
    line-height: 1.2 !important;
    letter-spacing: -.035em !important;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide p {
    max-width: none !important;
    margin: 10px 0 0 !important;
    color: var(--xiyue-muted, #75829d) !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1.65 !important;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide-tags {
    display: flex !important;
    gap: 6px !important;
    margin-top: 14px !important;
  }

  body[data-active-screen="exam-menu"] .home-exam-guide-tags span {
    padding: 6px 9px !important;
    color: var(--xiyue-blue-600, #315df6) !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: var(--xiyue-blue-050, #f2f5ff) !important;
    font-size: 8px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
  }

  body[data-active-screen="login"][data-account-subpage-mode],
  body:is([data-active-screen="recharge"], [data-active-screen="feedback"], [data-active-screen="wrong-review-hub"], [data-active-screen="learning-calendar"]) {
    background: #fff !important;
  }

  body[data-active-screen="login"][data-account-subpage-mode] .login-stage,
  body[data-active-screen="recharge"] .recharge-stage,
  body[data-active-screen="feedback"] .feedback-stage,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-stage,
  body[data-active-screen="learning-calendar"] .learning-calendar-stage {
    display: block !important;
    box-sizing: border-box !important;
    padding: max(31px, env(safe-area-inset-top, 0px)) 15px calc(110px + env(safe-area-inset-bottom, 0px)) !important;
    background: #fff !important;
  }

  body[data-active-screen="login"][data-account-subpage-mode] .login-shell,
  body:is([data-active-screen="recharge"], [data-active-screen="feedback"]) .account-feature-shell,
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-shell,
  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar,
  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar-inner {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  body[data-active-screen="login"][data-account-subpage-mode] .login-header,
  body[data-active-screen="login"][data-account-subpage-mode] .login-modal-close,
  body[data-active-screen="login"][data-account-subpage-mode] .login-modal-backdrop {
    display: none !important;
  }

  body[data-active-screen="login"][data-account-subpage-mode] .login-panel,
  body:is([data-active-screen="recharge"], [data-active-screen="feedback"]) .login-panel {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar {
    min-height: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  body .account-ui-subpage-heading {
    display: grid !important;
    width: 100% !important;
    height: auto !important;
    min-height: 64px !important;
    box-sizing: border-box !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 0 1px 12px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3) !important;
    background: transparent !important;
  }

  body .account-ui-subpage-heading > div {
    min-width: 0 !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    padding: 0 !important;
  }

  body .account-ui-subpage-heading > div > .account-ui-subpage-kicker {
    display: none !important;
  }

  body .account-ui-subpage-heading :is(h1, h2) {
    display: block !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--xiyue-ink, #111a30) !important;
    font-size: 23px !important;
    font-weight: 870 !important;
    line-height: 1.25 !important;
    letter-spacing: -.03em !important;
    overflow-wrap: anywhere;
  }

  body .account-ui-subpage-heading > div > .account-ui-subpage-copy {
    display: block !important;
    min-height: 33px !important;
    margin: 6px 0 0 !important;
    color: var(--xiyue-muted, #75829d) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.65 !important;
    letter-spacing: 0 !important;
  }

  body .account-ui-subpage-heading > .account-ui-subpage-back {
    position: relative !important;
    display: grid !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    place-items: center !important;
    align-self: start !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #315df6 !important;
    border: 1px solid #e8ecf4 !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 5px 14px rgba(42, 67, 118, .06) !important;
    font-size: 0 !important;
  }

  body .account-ui-subpage-heading > .account-ui-subpage-back::before {
    content: "‹" !important;
    position: absolute !important;
    inset: 0 !important;
    display: grid !important;
    place-items: center !important;
    transform: none !important;
    font: 400 27px/27px Arial, sans-serif !important;
  }

  body[data-active-screen="login"][data-account-subpage-mode] .account-ui-subpage-heading + *,
  body:is([data-active-screen="recharge"], [data-active-screen="feedback"]) .account-ui-subpage-heading + *,
  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar + .learning-calendar-shell {
    margin-top: 14px !important;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-shell {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }
}

@media (min-width: 961px) {
  body .account-ui-subpage-heading > div > .account-ui-subpage-kicker {
    display: block;
    margin: 0 0 2px;
    color: #98a0b2;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
  }

  body .account-ui-subpage-heading > div > .account-ui-subpage-copy {
    display: none;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar-inner > div {
    order: 1;
  }

  body[data-active-screen="learning-calendar"] .learning-calendar-toolbar-inner > button {
    order: 2;
  }
}

/* v105: both account summaries contain only three short text lines. Keep the
   guest login actions and the signed-in feature list close to that content. */
@media (max-width: 960px) {
  body[data-active-screen="login"][data-account-overview-mode] .login-panel .account-ui-hero {
    height: 132px !important;
    min-height: 132px !important;
  }
}

/* v105: payment is shown inside a full-viewport transparent iframe on phones.
   The dialog itself must size to its content instead of stretching with that
   iframe, otherwise loading/errors become a nearly full-screen white panel and
   the single action button expands into a giant block. */
@media (max-width: 520px) {
  html.is-membership-checkout-embed .membership-payment-dialog {
    width: min(350px, 100%);
    max-width: 350px;
    height: auto;
    max-height: calc(100dvh - 20px);
    align-content: start;
    padding: 27px 22px 22px;
    border-radius: 24px;
  }

  html.is-membership-checkout-embed .membership-payment-dialog-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 25px;
  }

  html.is-membership-checkout-embed .membership-payment-dialog[data-phase]:not([data-phase="qr"]) {
    width: min(330px, 100%);
    padding: 26px 22px 22px;
  }

  html.is-membership-checkout-embed .membership-payment-dialog[data-phase]:not([data-phase="qr"]) h2 {
    margin-top: 14px;
    padding: 0 34px;
    font-size: 22px;
  }

  html.is-membership-checkout-embed .membership-payment-dialog[data-phase]:not([data-phase="qr"]) .membership-payment-result {
    min-height: 150px;
    gap: 8px;
  }

  html.is-membership-checkout-embed .membership-payment-dialog[data-phase]:not([data-phase="qr"]) .membership-payment-result-icon {
    width: 62px;
    height: 62px;
  }

  html.is-membership-checkout-embed .membership-payment-dialog[data-phase]:not([data-phase="qr"]) .membership-payment-result.is-confirming .membership-payment-result-icon::before {
    width: 36px;
    height: 36px;
    border-width: 4px;
  }

  html.is-membership-checkout-embed .membership-payment-dialog[data-phase]:not([data-phase="qr"]) .membership-payment-status {
    min-height: 0;
    margin: 8px 0 13px;
  }

  html.is-membership-checkout-embed .membership-payment-check-button {
    min-height: 46px;
    padding-inline: 16px;
    border-radius: 14px;
    font-size: 13px;
  }
}

/* v106: the saving dialog belongs to the themed exam surface on every
   viewport. The desktop completion rules previously forced it back to white. */
body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
  .end-test-dialog[data-save-state="saving"] {
  color: var(--exam-chrome-ink) !important;
  border: 1px solid var(--exam-chrome-line) !important;
  background: var(--test-surface) !important;
}

body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
  .end-test-dialog[data-save-state="saving"] .end-test-dialog-header h2 {
  color: var(--exam-chrome-ink) !important;
}

body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
  .end-test-dialog[data-save-state="saving"] .end-test-dialog-copy {
  color: var(--exam-chrome-muted) !important;
}

/* The phone login form is deliberately task-focused. Language and company
   information remain available from the signed-in account page. */
@media (max-width: 960px) {
  body[data-active-screen="login"] .login-panel > .account-language-entry {
    display: none !important;
  }
}

/* Login errors use the same calm, centered language as the account and payment
   dialogs.  The legacy alert used oversized paragraph text and strong dividers,
   which made a normal credential error look like a system failure on phones. */
#auth-login-error-dialog.auth-dialog-overlay {
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 29, 52, .6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

#auth-login-error-dialog.auth-dialog-overlay.hidden {
  display: none;
}

#auth-login-error-dialog .auth-dialog {
  position: relative;
  width: min(430px, 100%);
  padding: 30px 26px 24px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 26px;
  background: rgba(255, 255, 255, .99);
  box-shadow: 0 30px 80px rgba(16, 29, 59, .3);
  text-align: center;
}

#auth-login-error-dialog .auth-dialog-header {
  display: grid;
  min-height: 0;
  justify-items: center;
  gap: 13px;
  padding: 0;
  border: 0;
}

#auth-login-error-dialog .auth-dialog-status-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #315df6;
  border-radius: 18px;
  background: linear-gradient(145deg, #eef4ff, #dfeaff);
  font-size: 29px;
  font-weight: 850;
}

#auth-login-error-dialog .auth-dialog-header h2 {
  color: var(--xiyue-ink);
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -.03em;
}

#auth-login-error-dialog .auth-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #8792a6;
  border-radius: 50%;
  background: #f2f5fb;
  font-size: 26px;
}

#auth-login-error-dialog .auth-dialog-body {
  padding: 17px 2px 4px;
  color: #3f4b62;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.7;
}

#auth-login-error-dialog .auth-dialog-body p {
  margin: 0;
}

#auth-login-error-dialog .auth-dialog-body p + p {
  margin-top: 5px;
  color: #78849a;
  font-size: 13px;
  font-weight: 550;
}

#auth-login-error-dialog .auth-dialog-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 22px 0 0;
  border: 0;
  background: transparent;
}

#auth-login-error-dialog .auth-dialog-footer .login-button {
  width: 100%;
  min-width: 0;
  height: 48px;
  border-radius: 14px;
  font-size: 13px;
}

@media (max-width: 520px) {
  #auth-login-error-dialog .auth-dialog {
    padding: 28px 20px 20px;
    border-radius: 24px;
  }

  #auth-login-error-dialog .auth-dialog-header h2 {
    font-size: 23px;
  }

  #auth-login-error-dialog .auth-dialog-body {
    padding-top: 15px;
    font-size: 13px;
  }
}

/* v141: keep high-frequency dialogs on one visual system.  Earlier desktop
   exam rules intentionally flattened the end-test confirmation while device
   security and login errors each kept their own heading geometry.  These
   final, state-scoped rules restore the shared centered card, icon, copy and
   action hierarchy without changing any dialog behavior. */
.end-test-dialog {
  width: 440px !important;
  min-width: 0 !important;
  max-width: calc(100vw - 64px) !important;
  max-height: calc(100dvh - 36px) !important;
  padding: 32px 30px 28px !important;
  border: 1px solid var(--exam-chrome-line, rgba(255, 255, 255, .9)) !important;
  border-radius: 28px !important;
  background: var(--test-surface, rgba(255, 255, 255, .99)) !important;
  box-shadow: 0 30px 80px rgba(16, 29, 59, .3) !important;
  text-align: center !important;
}

body[data-locale="en-GB"] .end-test-dialog {
  min-width: 0 !important;
}

.end-test-dialog .end-test-dialog-header {
  position: static !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  min-height: 0 !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.end-test-dialog .end-test-dialog-state-icon {
  position: relative;
  display: grid !important;
  width: 64px !important;
  height: 64px !important;
  margin: 0 auto 18px !important;
  place-items: center;
  color: var(--exam-chrome-accent, #315df6) !important;
  border: 1px solid var(--exam-chrome-line, #e1e8f5) !important;
  border-radius: 20px !important;
  background: var(--exam-chrome-tint, #edf2ff) !important;
  box-shadow: none !important;
  font-size: 30px !important;
}

.end-test-dialog .end-test-dialog-header h2 {
  margin: 0 !important;
  color: var(--exam-chrome-ink, #16213d) !important;
  font-size: 26px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  letter-spacing: -.035em !important;
  text-align: center !important;
}

.end-test-dialog .end-test-dialog-close:not(.hidden) {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  display: grid !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  place-items: center !important;
  color: var(--exam-chrome-accent, #315df6) !important;
  border: 1px solid transparent !important;
  border-radius: 50% !important;
  background: var(--exam-chrome-tint, #f2f5fb) !important;
  box-shadow: none !important;
  font-size: 26px !important;
  line-height: 1 !important;
}

.end-test-dialog .end-test-dialog-body {
  padding: 0 !important;
}

.end-test-dialog .end-test-dialog-copy {
  margin: 14px 0 0 !important;
  color: var(--exam-chrome-muted, #76839e) !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 1.7 !important;
  text-align: center !important;
}

.end-test-dialog .end-test-unanswered-alert {
  margin: 18px 0 0 !important;
  padding: 13px 15px !important;
  color: var(--exam-chrome-accent-strong, #2447d8) !important;
  border: 1px solid var(--exam-chrome-line, #dfe6f4) !important;
  border-radius: 14px !important;
  background: var(--exam-chrome-tint, #edf2ff) !important;
  text-align: center !important;
}

.end-test-dialog .end-test-dialog-footer:not(.hidden) {
  min-height: 0 !important;
  margin-top: 24px !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
  border: 0 !important;
  background: transparent !important;
}

body[data-active-screen][data-activity-mode] .end-test-dialog .end-test-confirm-button,
body[data-active-screen][data-activity-mode] .end-test-dialog .end-test-cancel-button,
.end-test-dialog .end-test-confirm-button,
.end-test-dialog .end-test-cancel-button {
  width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

body[data-active-screen][data-activity-mode] .end-test-dialog .end-test-confirm-button,
.end-test-dialog .end-test-confirm-button {
  order: 2 !important;
  color: #fff !important;
  border: 1px solid transparent !important;
  background: var(--exam-chrome-accent, #315df6) !important;
  box-shadow: 0 10px 22px var(--exam-chrome-shadow, rgba(49, 93, 246, .18)) !important;
}

body[data-active-screen][data-activity-mode] .end-test-dialog .end-test-cancel-button,
.end-test-dialog .end-test-cancel-button {
  order: 1 !important;
  color: var(--exam-chrome-accent, #315df6) !important;
  border: 1px solid var(--exam-chrome-line, #dfe6f4) !important;
  background: var(--exam-chrome-tint, #edf2ff) !important;
  box-shadow: none !important;
}

/* Preserve the mascot treatment while a result is being saved. */
.end-test-dialog[data-save-state="saving"] .end-test-dialog-state-icon {
  width: 174px !important;
  height: 126px !important;
  margin: -6px auto 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

/* The time-up action remains semantically urgent, but its colour now follows
   the paper chosen by the learner instead of forcing red on every theme. */
body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
  .exam-time-up-dialog {
  color: var(--exam-chrome-ink) !important;
  border-color: var(--exam-chrome-line) !important;
  background: var(--test-surface) !important;
}

body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
  .exam-time-up-dialog h2 {
  color: var(--exam-chrome-ink) !important;
}

body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
  .exam-time-up-dialog :is(.exam-time-up-dialog-note, .exam-time-up-dialog-spark) {
  color: var(--exam-chrome-accent) !important;
}

body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
  .exam-time-up-dialog .exam-time-up-continue-button {
  color: var(--exam-chrome-accent) !important;
  border-color: var(--exam-chrome-line) !important;
  background: var(--exam-chrome-tint) !important;
  box-shadow: none !important;
}

body:is([data-active-screen="instructions"], [data-active-screen="exam"], [data-active-screen="results"])
  .exam-time-up-dialog .exam-time-up-end-button {
  color: #fff !important;
  border-color: transparent !important;
  background: var(--exam-chrome-accent) !important;
  box-shadow: 0 10px 22px var(--exam-chrome-shadow) !important;
}

/* Device security adopts the same centered state heading and paired actions
   as the rest of the product dialogs. */
body[data-auth-overlay-open="true"] .login-shell:has(.authorized-device-login-copy) {
  width: min(440px, calc(100vw - 32px)) !important;
  padding: 30px 26px 24px !important;
  border: 1px solid rgba(255, 255, 255, .9) !important;
  border-radius: 28px !important;
  background: rgba(255, 255, 255, .99) !important;
  box-shadow: 0 30px 80px rgba(16, 29, 59, .3) !important;
}

body[data-auth-overlay-open="true"] .login-shell:has(.authorized-device-login-copy) .login-modal-close {
  top: 14px !important;
  right: 14px !important;
  display: grid !important;
  width: 40px !important;
  height: 40px !important;
  place-items: center !important;
  color: #8792a6 !important;
  border-radius: 50% !important;
  background: #f2f5fb !important;
  font-size: 26px !important;
}

body[data-auth-overlay-open="true"] .authorized-device-login-copy {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
  text-align: center !important;
}

body[data-auth-overlay-open="true"] .authorized-device-mascot {
  display: grid !important;
  width: 64px !important;
  height: 64px !important;
  margin: 0 auto 12px !important;
  place-items: center !important;
  border: 1px solid #e1e8f5 !important;
  border-radius: 20px !important;
  background: #edf2ff !important;
}

body[data-auth-overlay-open="true"] .authorized-device-mascot img {
  width: 70px !important;
  height: 70px !important;
  transform: translateY(3px) !important;
}

body[data-auth-overlay-open="true"] .authorized-device-login-copy .login-kicker {
  margin: 0 0 7px !important;
  align-self: center !important;
  color: #315df6 !important;
  text-align: center !important;
}

body[data-auth-overlay-open="true"] .authorized-device-login-copy h1 {
  margin: 0 !important;
  color: #16213d !important;
  font-size: 26px !important;
  line-height: 1.25 !important;
  text-align: center !important;
}

body[data-auth-overlay-open="true"] .authorized-device-login-copy > p:not(.login-kicker):not(.login-message) {
  width: 100%;
  margin: 13px 0 0 !important;
  color: #76839e !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
  text-align: center !important;
}

body[data-auth-overlay-open="true"] .authorized-device-login-copy > .authorized-device-warning {
  margin-top: 16px !important;
  padding: 12px 14px !important;
  color: #52617b !important;
  border: 1px solid #dfe6f4 !important;
  border-radius: 14px !important;
  background: #f3f6fc !important;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-actions .login-button {
  height: 48px !important;
  min-height: 48px !important;
  border-radius: 14px !important;
  font-size: 13px !important;
}

body[data-auth-overlay-open="true"] .authorized-device-limit-actions .login-button:not(.login-button-primary) {
  color: #315df6 !important;
  border: 1px solid #dfe6f4 !important;
  background: #edf2ff !important;
}

body[data-auth-overlay-open="true"] .authorized-device-blocked-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-auth-overlay-open="true"] .authorized-device-blocked-actions .login-button-primary {
  order: 2;
}

body[data-auth-overlay-open="true"] .authorized-device-blocked-actions .login-button:not(.login-button-primary) {
  order: 1;
}

/* Login errors use the exact same centered anatomy and action hierarchy. */
#auth-login-error-dialog .auth-dialog-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 13px !important;
  text-align: center !important;
}

#auth-login-error-dialog .auth-dialog-status-icon {
  width: 64px !important;
  height: 64px !important;
  border: 1px solid #e1e8f5 !important;
  border-radius: 20px !important;
  background: #edf2ff !important;
  box-shadow: none !important;
}

#auth-login-error-dialog .auth-dialog-header h2,
#auth-login-error-dialog .auth-dialog-body {
  width: 100%;
  margin-inline: auto !important;
  text-align: center !important;
}

#auth-login-error-dialog .auth-dialog-close {
  border: 0 !important;
}

#auth-login-error-dialog .auth-dialog-footer .login-button:not(.login-button-primary) {
  color: #315df6 !important;
  border: 1px solid #dfe6f4 !important;
  background: #edf2ff !important;
  box-shadow: none !important;
}

#auth-login-error-dialog .auth-dialog-footer .login-button-primary {
  color: #fff !important;
  border: 1px solid transparent !important;
  background: #315df6 !important;
  box-shadow: 0 10px 22px rgba(49, 93, 246, .18) !important;
}

@media (max-width: 520px) {
  .end-test-dialog {
    width: calc(100vw - 64px) !important;
    max-width: 440px !important;
    padding: 30px 20px 22px !important;
    border-radius: 26px !important;
  }

  .end-test-dialog .end-test-dialog-header h2 {
    font-size: 24px !important;
  }

  body[data-auth-overlay-open="true"] .login-shell:has(.authorized-device-login-copy) {
    width: calc(100vw - 28px) !important;
    padding: 28px 20px 20px !important;
    border-radius: 26px !important;
  }

  body[data-auth-overlay-open="true"] .authorized-device-login-copy h1 {
    font-size: 24px !important;
  }
}

/* v142: remove the blurred "second card" impression behind the time-up
   prompt, and keep the end-test information panel neutral on every theme. */
#exam-time-up-dialog.exam-time-up-dialog-overlay {
  background: rgba(24, 34, 54, .88) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body[data-active-screen][data-activity-mode]
  .end-test-dialog .end-test-unanswered-alert {
  border: 1px solid var(--exam-chrome-line, #dfe6f4) !important;
  border-left-width: 1px !important;
  border-left-style: solid !important;
  border-left-color: var(--exam-chrome-line, #dfe6f4) !important;
  background: var(--exam-chrome-tint, #edf2ff) !important;
  box-shadow: none !important;
  text-align: center !important;
}

body[data-auth-overlay-open="true"] .authorized-device-mascot {
  width: 76px !important;
  height: 76px !important;
  margin-bottom: 10px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body[data-auth-overlay-open="true"] .authorized-device-mascot img {
  width: 82px !important;
  height: 82px !important;
  transform: translateY(2px) !important;
}

body[data-auth-overlay-open="true"]
  .authorized-device-blocked-copy > p:not(.login-kicker):not(.login-message):not(.authorized-device-warning) {
  white-space: nowrap;
}

/* v156: phone home borrows Linear's flat editorial rhythm without copying its
   dark palette. Content is grouped by whitespace and rules; only actions keep
   pill treatment. Desktop and every non-home phone screen remain unchanged. */
@media (max-width: 960px) {
  body[data-active-screen="start"],
  body[data-active-screen="start"] .mock-app {
    background:
      radial-gradient(circle at 92% 1%, rgba(96, 165, 250, .11), transparent 20rem),
      #fbfcff;
  }

  body[data-active-screen="start"] .start-stage {
    padding-top: 0;
    padding-right: max(19px, env(safe-area-inset-right));
    padding-left: max(19px, env(safe-area-inset-left));
  }

  body[data-active-screen="start"] .start-shell.home-shell,
  body[data-active-screen="start"] .home-layout,
  body[data-active-screen="start"] :is(.home-main, .home-side) {
    gap: 0;
  }

  body[data-active-screen="start"] .home-mobile-sitebar {
    display: flex;
    min-height: 68px;
    margin-inline: -4px;
    align-items: center;
    padding: max(9px, env(safe-area-inset-top)) 4px 9px;
    border: 0;
    border-bottom: 1px solid #e6eaf2;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-mark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: none;
    font-size: 14px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-name strong {
    font-size: 14px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-name small {
    font-size: 9px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar button {
    min-height: 40px;
    border-radius: 999px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar button.is-primary {
    padding-inline: 16px;
    box-shadow: none;
  }

  body[data-active-screen="start"] .home-welcome-card {
    min-height: 206px;
    padding: 36px 41% 34px 4px;
    overflow: hidden;
    border: 0;
    border-bottom: 1px solid #e6eaf2;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="start"] .home-welcome-card::before {
    right: -126px;
    bottom: -185px;
    width: 365px;
    height: 365px;
    background: linear-gradient(145deg, rgba(88, 170, 255, .17), rgba(92, 104, 246, .06));
  }

  body[data-active-screen="start"] .home-welcome-copy h1 {
    font-size: clamp(28px, 7.8vw, 34px);
  }

  body[data-active-screen="start"] .home-welcome-copy p {
    margin-top: 13px;
    font-size: 11px;
  }

  body[data-active-screen="start"] .home-welcome-art {
    right: -3px;
    bottom: 3px;
    width: 43%;
    max-width: 184px;
    height: 158px;
  }

  body[data-active-screen="start"] .home-welcome-art img {
    right: -4px;
    bottom: -19px;
    width: 158px;
    height: 158px;
  }

  body[data-active-screen="start"] .start-dashboard.home-stats {
    min-height: 88px;
    gap: 0;
    padding: 17px 0;
    border-bottom: 1px solid #e6eaf2;
  }

  body[data-active-screen="start"] .home-stat,
  body[data-active-screen="start"] :is(.home-stat-purple, .home-stat-mint, .home-stat-sky) {
    min-height: 54px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="start"] .home-stat + .home-stat {
    border-left: 1px solid #e6eaf2;
  }

  body[data-active-screen="start"] .home-stat strong {
    font-size: 25px;
  }

  body[data-active-screen="start"] .home-stat span {
    font-size: 10px;
  }

  body[data-active-screen="start"] .home-side-card.home-week-card {
    padding: 31px 4px 30px;
    border: 0;
    border-bottom: 1px solid #e6eaf2;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="start"] .home-week-card h2 {
    font-size: 24px;
  }

  body[data-active-screen="start"] .home-week-card header button {
    min-width: 78px;
    border-radius: 999px;
  }

  body[data-active-screen="start"] .home-week-row {
    margin: 29px 0;
  }

  body[data-active-screen="start"] .home-streak > strong {
    background: transparent;
    outline: 1px solid #dfe6f4;
    outline-offset: -1px;
  }

  body[data-active-screen="start"] .home-public-company {
    padding-top: 28px;
    border: 0;
  }

  body[data-active-screen="start"] .home-mobile-nav {
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 76px;
    padding: 9px max(12px, env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border: 0;
    border-top: 1px solid rgba(222, 227, 237, .94);
    border-radius: 0;
    background: rgba(255, 255, 255, .96);
    box-shadow:
      0 170px 0 164px #f7f8fc,
      0 -10px 30px rgba(28, 44, 90, .06);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  body[data-active-screen="start"] .home-mobile-nav-main > span {
    width: auto;
    height: auto;
    margin-top: 0;
    color: inherit;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="start"] .home-mobile-nav-main > span svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 390px) {
  body[data-active-screen="start"] .home-welcome-card {
    min-height: 198px;
    padding-right: 39%;
  }
}

/* v157: full-bleed phone home, production logo, baseline-correct account
   status, and the requested raised primary exam action. */
@media (max-width: 960px) {
  body[data-active-screen="start"] .start-stage {
    padding-right: 0;
    padding-left: 0;
  }

  body[data-active-screen="start"] .start-shell.home-shell {
    width: min(620px, 100%);
    max-width: none;
  }

  body[data-active-screen="start"] .home-mobile-sitebar {
    width: 100%;
    margin-inline: 0;
    padding-right: 20px;
    padding-left: 20px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-mark {
    display: block;
    width: 42px;
    height: 36px;
    flex: 0 0 42px;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-brand {
    gap: 8px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-name,
  body[data-active-screen="start"] .home-mobile-sitebar-account button {
    align-content: center;
    line-height: 1;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-name {
    grid-template-rows: 17px 11px;
    gap: 2px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-name strong,
  body[data-active-screen="start"] .home-mobile-sitebar-account button > span {
    font-size: 14px;
    line-height: 17px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-name small,
  body[data-active-screen="start"] .home-mobile-sitebar-account button > small {
    font-size: 9px;
    line-height: 11px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-account button {
    min-height: 40px;
    grid-template-rows: 17px 11px;
    gap: 2px;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  body[data-active-screen="start"] .home-welcome-card {
    padding-left: 23px;
  }

  body[data-active-screen="start"] .home-welcome-card,
  body[data-active-screen="start"] .start-dashboard.home-stats,
  body[data-active-screen="start"] .home-side-card.home-week-card {
    width: 100%;
  }

  body[data-active-screen="start"] .home-side-card.home-week-card {
    padding-right: 23px;
    padding-left: 23px;
  }

  body[data-active-screen="start"] .home-public-company {
    padding-right: 23px;
    padding-left: 23px;
  }

  body[data-active-screen="start"] .home-mobile-nav-main > span {
    display: grid;
    width: 54px;
    height: 54px;
    margin-top: -34px;
    place-items: center;
    color: #fff;
    border: 6px solid #fbfcff;
    border-radius: 50%;
    background: #315df6;
    box-shadow: 0 10px 22px rgba(49, 93, 246, .25);
  }

  body[data-active-screen="start"] .home-mobile-nav-main > span svg {
    width: 22px;
    height: 22px;
  }
}

/* v158: keep the phone home identity/auth bar visible while the document
   scrolls. It participates in layout, so no compensating spacer is needed. */
@media (max-width: 960px) {
  body[data-active-screen="start"] .home-mobile-sitebar {
    position: fixed;
    z-index: 45;
    top: 0;
    right: auto;
    left: 50%;
    width: min(620px, 100%);
    transform: translateX(-50%);
    background: rgba(251, 252, 255, .96);
    box-shadow: 0 8px 22px rgba(28, 44, 90, .035);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  body[data-active-screen="start"] .home-mobile-sitebar-mark {
    width: 46px;
    height: 38px;
    flex-basis: 46px;
  }

  body[data-active-screen="start"] .start-shell.home-shell {
    padding-top: 68px;
  }
}

/* v160: make the wrong-answer count read as the one actionable statistic and
   unify every phone tab bar that is present. The live test itself intentionally
   has no tab bar, preventing accidental navigation during an answer session. */
@media (max-width: 960px) {
  body[data-active-screen="start"] .home-stat-action {
    position: relative;
    min-height: 58px;
    margin: -2px 9px 2px;
    color: #c84e24;
    border: 1px solid #ffd8c1;
    border-radius: 16px;
    background:
      radial-gradient(circle at 82% 12%, rgba(255, 255, 255, .72), transparent 2.8rem),
      linear-gradient(145deg, #fff6ee, #ffe5d2);
    box-shadow:
      0 5px 0 #efc5ac,
      0 10px 20px rgba(190, 91, 43, .12);
    transform: translateY(-3px);
    transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
  }

  body[data-active-screen="start"] .home-stat-action strong {
    color: #d95628;
  }

  body[data-active-screen="start"] .home-stat-action span {
    color: #a95332;
    font-weight: 750;
  }

  body[data-active-screen="start"] .home-stat-action span::after {
    content: "  ›";
    font-size: 13px;
    font-weight: 900;
  }

  body[data-active-screen="start"] .home-stat-action:hover,
  body[data-active-screen="start"] .home-stat-action:focus-visible {
    filter: saturate(1.05);
    transform: translateY(-4px);
    box-shadow:
      0 6px 0 #efc5ac,
      0 12px 22px rgba(190, 91, 43, .15);
  }

  body[data-active-screen="start"] .home-stat-action:active {
    transform: translateY(1px);
    box-shadow:
      0 1px 0 #efc5ac,
      0 4px 9px rgba(190, 91, 43, .1);
  }

  .home-mobile-nav {
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 76px;
    padding: 9px max(12px, env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border: 0;
    border-top: 1px solid rgba(222, 227, 237, .94);
    border-radius: 0;
    background: rgba(255, 255, 255, .96);
    box-shadow:
      0 170px 0 164px #f7f8fc,
      0 -10px 30px rgba(28, 44, 90, .06);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  .home-mobile-nav-main > span {
    display: grid;
    width: 54px;
    height: 54px;
    margin-top: -34px;
    place-items: center;
    color: #fff;
    border: 6px solid #f7f8fc;
    border-radius: 50%;
    background: #315df6;
    box-shadow: 0 10px 22px rgba(49, 93, 246, .25);
  }

  .home-mobile-nav-main > span svg {
    width: 22px;
    height: 22px;
  }
}

/* v161: restrained wrong-review affordance. Hierarchy and a small chevron
   communicate interaction; decoration stays subordinate to the statistics. */
@media (max-width: 960px) {
  body[data-active-screen="start"] .home-stat-action {
    box-sizing: border-box;
    height: 54px;
    min-height: 54px;
    margin: 0 8px;
    color: #a95332;
    border: 1px solid #f0ddd3;
    border-radius: 14px;
    background: linear-gradient(180deg, #fffaf7, #fff6f1);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .9),
      0 4px 13px rgba(146, 72, 40, .065);
    filter: none;
    transform: none;
  }

  body[data-active-screen="start"] .home-stat-action strong {
    color: #bd5832;
  }

  body[data-active-screen="start"] .home-stat-action span {
    color: #8f604a;
    font-weight: 700;
  }

  body[data-active-screen="start"] .home-stat-action span::after {
    content: "›";
    display: inline-grid;
    width: 14px;
    height: 14px;
    margin-left: 3px;
    place-items: center;
    color: #a95332;
    border-radius: 50%;
    background: #f5e2d8;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    vertical-align: -2px;
  }

  body[data-active-screen="start"] .home-stat-action:hover,
  body[data-active-screen="start"] .home-stat-action:focus-visible {
    filter: none;
    transform: translateY(-1px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .9),
      0 6px 16px rgba(146, 72, 40, .09);
  }

  body[data-active-screen="start"] .home-stat-action:active {
    background: #fff2eb;
    box-shadow: inset 0 1px 3px rgba(146, 72, 40, .08);
    transform: translateY(0);
  }
}

/* v162: keep all three statistics in one visual system. The review count is
   actionable through typography and a quiet directional cue, not a nested card.
   The guest actions form one compact control so the header balances the brand. */
@media (max-width: 960px) {
  body[data-active-screen="start"] .home-stat-action {
    height: auto;
    min-height: 54px;
    margin: 0;
    color: inherit;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter: none;
    transform: none;
    transition: background-color .14s ease, opacity .14s ease;
  }

  body[data-active-screen="start"] .home-stat-action strong {
    color: #315df6;
  }

  body[data-active-screen="start"] .home-stat-action span {
    color: #66738d;
    font-weight: 650;
  }

  body[data-active-screen="start"] .home-stat-action span::after {
    content: "›";
    display: inline;
    width: auto;
    height: auto;
    margin-left: 3px;
    color: #315df6;
    border-radius: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 850;
    line-height: inherit;
    vertical-align: 0;
  }

  body[data-active-screen="start"] .home-stat-action:hover,
  body[data-active-screen="start"] .home-stat-action:focus-visible {
    background: rgba(49, 93, 246, .035);
    box-shadow: none;
    filter: none;
    transform: none;
  }

  body[data-active-screen="start"] .home-stat-action:active {
    background: rgba(49, 93, 246, .07);
    box-shadow: none;
    transform: none;
  }

  body[data-active-screen="start"] .home-mobile-sitebar {
    min-height: 68px;
    padding-right: 16px;
    padding-left: 18px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-guest {
    min-height: 36px;
    gap: 0;
    padding: 3px;
    border: 1px solid #e5e9f2;
    border-radius: 999px;
    background: #f2f5fa;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-guest button {
    min-height: 30px;
    padding: 0 11px;
    color: #5f6d86;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-guest button.is-primary {
    min-height: 30px;
    padding-inline: 13px;
    color: #315df6;
    background: #fff;
    box-shadow: 0 1px 4px rgba(35, 55, 104, .1);
  }

  body[data-active-screen="start"] .home-mobile-sitebar-account button {
    min-height: 36px;
    padding: 4px 12px;
    border: 1px solid #e5e9f2;
    border-radius: 999px;
    background: #f2f5fa;
  }
}

/* v163: the calendar, preview, membership and feedback subpages use the same
   phone dock without letting it cover their last row of content. */
@media (max-width: 960px) {
  body[data-active-screen="learning-calendar"] .learning-calendar-stage,
  body[data-active-screen="exam-preview"] .exam-preview-stage,
  body[data-active-screen="recharge"] .recharge-stage,
  body[data-active-screen="feedback"] .feedback-stage {
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
  }
}

/* v164: signed-in identity stays on one quiet line. The user name is the
   primary label; membership is a compact status badge rather than a card. */
@media (max-width: 960px) {
  body[data-active-screen="start"] .home-mobile-sitebar-account {
    min-width: 0;
    max-width: 148px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-account button {
    display: flex;
    min-width: 0;
    min-height: 40px;
    max-width: 148px;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    padding: 0 2px 0 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-account button > span {
    min-width: 0;
    max-width: 102px;
    overflow: hidden;
    color: #17233d;
    font-size: 12px;
    font-weight: 800;
    line-height: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-account button > small {
    display: inline-flex;
    min-width: 28px;
    height: 18px;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    color: #315df6;
    border-radius: 999px;
    background: #edf2ff;
    font-size: 8px;
    font-weight: 850;
    line-height: 18px;
  }

  body[data-active-screen="start"] .home-mobile-sitebar-account button:active {
    background: rgba(49, 93, 246, .055);
  }
}

/* v165: the divider already separates the introduction from its category
   list. Keep the following heading visually connected instead of adding a
   second, oversized band of empty space. */
@media (max-width: 960px) {
  body[data-active-screen="single-practice"] .single-practice-categories {
    padding-top: 4px;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-shell {
    gap: 4px;
  }
}

/* v169: the public home may paint before the large question banks finish
   parsing. Keep that fast first paint, but make the short hydration window
   explicit so a tap never feels ignored. */
.home-early-readiness {
  display: none;
}

@media (max-width: 960px) {
  body.is-app-booting.is-home-early-visible[data-active-screen="start"] .home-early-readiness {
    position: fixed;
    z-index: 1200;
    right: 50%;
    bottom: calc(92px + env(safe-area-inset-bottom));
    display: inline-flex;
    min-height: 30px;
    max-width: calc(100vw - 40px);
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    color: #5d6b83;
    border: 1px solid rgba(202, 212, 231, .86);
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 24px rgba(33, 55, 104, .12);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    transform: translateX(50%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  body.is-app-booting.is-home-early-visible[data-home-early-interaction="queued"] .home-early-readiness {
    color: #234ccf;
    border-color: rgba(49, 93, 246, .24);
    background: rgba(244, 247, 255, .97);
  }

  .home-early-readiness-spinner {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    border: 2px solid #d9e2ff;
    border-top-color: #315df6;
    border-radius: 50%;
    animation: home-early-readiness-spin .8s linear infinite;
  }

  body[data-home-early-interaction="queued"] .home-early-readiness-spinner {
    border: 0;
    animation: none;
  }

  body[data-home-early-interaction="queued"] .home-early-readiness-spinner::before {
    content: "✓";
    display: block;
    color: #315df6;
    font-size: 13px;
    font-weight: 900;
    line-height: 12px;
  }

  body.is-app-booting.is-home-early-visible .is-early-action-pending {
    opacity: .7;
  }
}

@keyframes home-early-readiness-spin {
  to { transform: rotate(360deg); }
}

/* v166: translated copy may wrap to an extra line. Let the materials intro
   grow so its count tags always remain inside the intro and above the divider.
   Tighten the two category bands slightly so their headings sit between the
   surrounding rules instead of drifting toward the lower list. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-materials-hero {
    height: auto !important;
    min-height: 164px !important;
  }

  body[data-active-screen="single-practice"] .single-practice-categories {
    padding-top: 0;
  }

  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-shell {
    gap: 0;
  }
}

/* v167: the feature counters on Practice and Materials are one component.
   Keep their typography, spacing and wrapping identical at the end of the
   mobile cascade so older page-specific rules cannot make them drift apart. */
@media (max-width: 960px) {
  body[data-active-screen="single-practice"] .single-practice-summary-tags,
  body[data-active-screen="learning-materials"] .learning-materials-mobile-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 14px !important;
  }

  body[data-active-screen="single-practice"] .single-practice-summary-tags span,
  body[data-active-screen="learning-materials"] .learning-materials-mobile-tags span {
    display: inline-flex !important;
    min-height: 23px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    padding: 6px 9px !important;
    color: var(--xiyue-blue-600, #315df6) !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: var(--xiyue-blue-050, #f2f5ff) !important;
    font-size: 8px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
  }
}

/* Practice grade picker: reuse the existing category rows without changing the
   surrounding desktop or mobile layout. */
body[data-active-screen="single-practice"] .single-practice-grade-card::before {
  content: attr(data-practice-grade);
  border-radius: 15px !important;
  color: #fff;
  background: linear-gradient(145deg, #708fff, #315df6) !important;
  box-shadow: 0 6px 14px rgba(49, 93, 246, .2);
  font-size: 18px;
  font-weight: 850;
}

body[data-active-screen="single-practice"] .single-practice-grade-card:nth-child(2n)::before {
  background: linear-gradient(145deg, #a58af1, #7657d8) !important;
}

body[data-active-screen="single-practice"] .single-practice-grade-back {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  margin: 0 12px 0 0;
  padding: 0;
  color: var(--xiyue-blue-600);
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

body[data-active-screen="single-practice"] .single-practice-categories-heading > div {
  display: flex;
  align-items: center;
}

body[data-active-screen="single-practice"] .single-practice-grade-back[hidden] {
  display: none;
}

@media (min-width: 961px) {
  .home-desktop-practice-back {
    border-bottom: 1px solid var(--xiyue-line) !important;
    border-radius: 0 !important;
  }
}

/* v168: English home copy keeps intentional line breaks, authorised-device
   names are locale-safe, and the phone music reader recovers cleanly after a
   pinch zoom without changing the desktop layout. */
@media (max-width: 960px) {
  body[data-active-screen="start"] .home-welcome-card,
  body[data-active-screen="start"] .home-welcome-copy {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body[data-locale="en-GB"][data-active-screen="start"] .home-welcome-card {
    padding-right: 36%;
  }

  body[data-locale="en-GB"][data-active-screen="start"] .home-welcome-copy h1 {
    font-size: clamp(24px, 6.6vw, 32px);
    line-height: 1.08;
    letter-spacing: -.045em;
  }

  body[data-locale="en-GB"][data-active-screen="start"] .home-welcome-mobile-line:first-child {
    white-space: nowrap;
  }

  body[data-active-screen="login"] .authorized-device-card > .authorized-device-copy,
  body[data-active-screen="login"] .authorized-device-removal-target > .authorized-device-copy,
  body[data-auth-overlay-open="true"] .authorized-device-card > .authorized-device-copy {
    display: grid;
    min-width: 0;
    gap: 5px;
  }

  body[data-active-screen="login"] .authorized-device-title,
  body[data-auth-overlay-open="true"] .authorized-device-title {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 7px;
  }

  body[data-active-screen="login"] .authorized-device-title strong,
  body[data-auth-overlay-open="true"] .authorized-device-title strong {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body[data-active-screen="login"] .authorized-device-title em,
  body[data-auth-overlay-open="true"] .authorized-device-title em {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
  }

  body[data-active-screen="login"] .authorized-device-copy > small,
  body[data-auth-overlay-open="true"] .authorized-device-copy > small {
    display: block;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  body[data-active-screen="learning-materials"],
  body[data-active-screen="learning-materials"] .mock-app,
  body[data-active-screen="learning-materials"] .learning-materials-stage,
  body[data-active-screen="learning-materials"] .learning-materials-shell,
  body[data-active-screen="learning-materials"] .learning-music-detail,
  body[data-active-screen="learning-materials"] .learning-mobile-reader-pilot {
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
  }

  body[data-active-screen="learning-materials"] .learning-mobile-reader-actions,
  body[data-active-screen="learning-materials"] .learning-music-detail-actions,
  body[data-active-screen="learning-materials"] .learning-music-detail-audio,
  body[data-active-screen="learning-materials"] .learning-music-pdf-viewer,
  body[data-active-screen="learning-materials"] .learning-mobile-swipe-pages {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  body[data-locale="en-GB"][data-active-screen="start"] .home-welcome-mobile-line:nth-child(2) > span {
    display: block;
    margin-left: 0;
  }

  body[data-active-screen="login"] .authorized-device-card.has-action {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 9px;
  }

  body[data-active-screen="login"] .authorized-device-remove-button {
    min-width: 52px;
    padding-inline: 9px;
    font-size: 11px;
  }
}

/* v206 final cascade: keep these practice picker rules after all legacy page
   refinements so older category-card and compact-heading styles cannot win. */
body[data-active-screen="single-practice"] .single-practice-grade-card::before,
body[data-active-screen="single-practice"] .single-practice-grade-card:nth-child(2n)::before,
body[data-active-screen="single-practice"] .single-practice-grade-card:nth-child(4n + 2)::before,
body[data-active-screen="single-practice"] .single-practice-grade-card:nth-child(4n + 3)::before,
body[data-active-screen="single-practice"] .single-practice-grade-card:nth-child(4n + 4)::before {
  box-sizing: border-box;
  color: #315df6 !important;
  border: 1px solid #dfe7ff;
  background: #edf2ff !important;
  box-shadow: 0 6px 14px rgba(49, 93, 246, .09);
}

body[data-active-screen="single-practice"] .single-practice-categories-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 12px;
}

body[data-active-screen="single-practice"] .single-practice-categories-heading > .single-practice-picker-heading-copy {
  display: grid;
  min-width: 0;
  grid-column: 1;
  gap: 0;
}

body[data-active-screen="single-practice"] .single-practice-picker-heading-copy > p {
  display: none;
  margin: 0;
}

body[data-active-screen="single-practice"] .single-practice-picker-heading-copy > h2 {
  line-height: 1.35;
}

body[data-active-screen="single-practice"] .single-practice-categories-heading > #single-practice-picker-count {
  grid-column: 2;
}

body[data-active-screen="single-practice"] .single-practice-grade-back {
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 42px;
  height: 42px;
  grid-column: 3;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0 14px;
  color: #315df6;
  border: 1px solid #dbe4f7;
  border-radius: 13px;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

body[data-active-screen="single-practice"] .single-practice-grade-back svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-active-screen="single-practice"] .single-practice-grade-back:hover {
  border-color: #bdcbf3;
  background: #f7f9ff;
  box-shadow: 0 8px 18px rgba(49, 93, 246, .09);
}

body[data-active-screen="single-practice"] .single-practice-grade-back:focus-visible {
  outline: 3px solid rgba(49, 93, 246, .22);
  outline-offset: 2px;
}

body[data-active-screen="single-practice"] .single-practice-grade-back[hidden] {
  display: none;
}

@media (min-width: 961px) {
  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-categories-heading {
    padding-bottom: 18px;
  }
}

@media (max-width: 960px) {
  body[data-active-screen="single-practice"] .single-practice-summary:has(+ .single-practice-categories.is-grade-selected) {
    display: none;
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected {
    padding-top: 20px;
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-categories-heading {
    min-height: 0;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: start;
    column-gap: 14px;
    padding: 0 0 20px;
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-grade-back {
    display: flex;
    width: 46px;
    height: 46px;
    min-width: 44px;
    min-height: 44px;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    padding: 0;
    border-color: #e8ecf4;
    border-radius: 16px;
    box-shadow: 0 5px 14px rgba(42, 67, 118, .06);
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-grade-back svg {
    width: 23px;
    height: 23px;
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-grade-back-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-picker-heading-copy {
    grid-column: 2;
    grid-row: 1;
    align-content: start;
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-picker-heading-copy h2 {
    margin: 0;
    font-size: 23px;
    line-height: 1.35;
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-picker-heading-copy > p {
    display: block;
    margin-top: 5px;
    color: #737d94;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.55;
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected #single-practice-picker-count {
    display: none;
  }
}

/* v207: desktop mirrors the learning-library header action; the category
   header keeps the square return control only on phone and tablet. */
body[data-active-screen="single-practice"] .single-practice-summary-grade-back[hidden] {
  display: none;
}

@media (min-width: 961px) {
  body[data-active-screen="single-practice"] .single-practice-summary {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
  }

  body[data-active-screen="single-practice"] .single-practice-summary-copy {
    min-width: 0;
  }

  body[data-active-screen="single-practice"] .single-practice-summary-grade-back {
    display: inline-flex;
    flex: 0 0 auto;
  }

  body[data-active-screen="single-practice"] .single-practice-categories .single-practice-grade-back {
    display: none !important;
  }
}

@media (max-width: 960px) {
  body[data-active-screen="single-practice"] .single-practice-summary-grade-back {
    display: none !important;
  }
}

/* v208: the grade/category flow already communicates scope and marking mode;
   keep the introduction concise after removing the redundant feature chips. */
@media (min-width: 961px) {
  body[data-active-screen="single-practice"] .single-practice-summary {
    height: 154px;
    min-height: 154px;
  }
}

@media (max-width: 960px) {
  body[data-active-screen="single-practice"] .single-practice-summary {
    height: auto !important;
    min-height: 145px !important;
    padding-top: 20px !important;
    padding-bottom: 18px !important;
  }
}

/* v210: align the wrong-review primary action with the bottom of the summary
   copy, matching the desktop header rhythm used by Practice and Learning. */
@media (min-width: 961px) {
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary {
    align-items: end;
  }
}

/* v212: mobile mock exams use the same editorial, two-level navigation as
   Focused Practice: choose a grade first, then choose start or resume. */
body[data-active-screen="mock-exam-picker"],
body[data-active-screen="mock-exam-picker"] .mock-app,
body[data-active-screen="mock-exam-picker"] .mock-exam-picker-stage {
  color: var(--xiyue-ink, #111a30);
  background: #fff;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-stage {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 34px clamp(24px, 3vw, 64px) 64px;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-shell {
  width: min(960px, 100%);
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-heading {
  display: grid;
  min-height: 64px;
  box-sizing: border-box;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 0 1px 12px;
  border-bottom: 1px solid var(--xiyue-line, #e5eaf3);
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-heading > div {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-kicker {
  display: block;
  margin: 0 0 7px;
  color: #315df6;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: .14em;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-heading h1 {
  margin: 0;
  color: var(--xiyue-ink, #111a30);
  font-size: 23px;
  font-weight: 870;
  line-height: 1.25;
  letter-spacing: -.03em;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-heading p {
  min-height: 33px;
  margin: 6px 0 0;
  color: var(--xiyue-muted, #75829d);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.65;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-back {
  display: grid;
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  grid-column: 1;
  grid-row: 1;
  place-items: center;
  margin: 0;
  padding: 0;
  color: #315df6;
  border: 1px solid #e8ecf4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(42, 67, 118, .06);
  font: 400 27px/27px Arial, sans-serif;
  cursor: pointer;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-list {
  display: grid;
  margin-top: 8px;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-choices {
  padding-top: 14px;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-list-heading {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 3px 10px;
  border-bottom: 1px solid var(--xiyue-line, #e5eaf3);
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-list-heading h2 {
  margin: 0;
  color: var(--xiyue-ink, #111a30);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.3;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-list-heading span {
  padding: 7px 10px;
  color: #315df6;
  border-radius: 11px;
  background: #edf2ff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-row,
body[data-active-screen="mock-exam-picker"] .mock-exam-picker-development {
  width: 100%;
  min-height: 92px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 16px;
  padding: 12px 4px;
  color: inherit;
  border: 0;
  border-bottom: 1px solid var(--xiyue-line, #e5eaf3);
  background: transparent;
  font: inherit;
  text-align: left;
}

body[data-active-screen="mock-exam-picker"] button.mock-exam-picker-page-row {
  cursor: pointer;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-index,
body[data-active-screen="mock-exam-picker"] .mock-exam-picker-action-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #315df6;
  border: 1px solid #dfe7ff;
  border-radius: 17px;
  background: #edf2ff;
  box-shadow: 0 6px 14px rgba(49, 93, 246, .09);
  font-size: 22px;
  font-weight: 850;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-action-icon {
  font-size: 18px;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-copy strong {
  color: var(--xiyue-ink, #111a30);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.3;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-copy small {
  color: var(--xiyue-muted, #75829d);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-arrow {
  color: #a0a9ba;
  font-size: 27px;
  line-height: 1;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-row:hover,
body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-row:focus-visible {
  background: var(--xiyue-blue-050, #f2f5ff);
  outline: none;
}

@media (max-width: 960px) {
  body:not([data-auth-overlay-open="true"])[data-active-screen="mock-exam-picker"] {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body[data-active-screen="mock-exam-picker"] > .mock-app {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-stage {
    position: relative;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    padding: max(31px, env(safe-area-inset-top, 0px)) 15px 0;
    overflow: hidden;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-shell {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    box-sizing: border-box;
    padding-bottom: calc(142px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-padding-bottom: calc(142px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-stage > .home-mobile-nav {
    position: fixed;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-kicker {
    display: none;
  }

  /* Match the subpage header used by 曲谱与音频 exactly. */
  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-categories-heading {
    width: 100%;
    min-height: 64px;
    box-sizing: border-box;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    margin: 0;
    padding: 0 1px 12px;
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3);
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-grade-back {
    position: relative;
    display: grid;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    place-items: center;
    padding: 0;
    color: #315df6;
    border: 1px solid #e8ecf4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(42, 67, 118, .06);
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-grade-back svg {
    display: none;
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-grade-back::before {
    content: "‹";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font: 400 27px/27px Arial, sans-serif;
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-picker-heading-copy h2 {
    margin: 0;
    font-size: 23px;
    font-weight: 870;
    line-height: 1.25;
    letter-spacing: -.03em;
  }

  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected .single-practice-picker-heading-copy > p {
    display: block;
    min-height: 33px;
    margin: 6px 0 0;
    color: var(--xiyue-muted, #75829d);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.65;
  }
}

/* v214: Mock Exam is a real second-level page on desktop as well as mobile.
   Its grade list follows the same restrained two-column rhythm as Focused
   Practice, with one explicit back control instead of nested dropdowns. */
@media (min-width: 961px) {
  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-stage {
    display: block;
    min-height: 100vh;
    padding: 0 clamp(38px, 4.4vw, 76px) 72px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-shell {
    width: min(1600px, 100%);
    margin: 0 auto;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-heading {
    min-height: 224px;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    padding: 58px 0 34px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-back {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    border-radius: 18px;
    font-size: 31px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-heading h1 {
    font-size: clamp(34px, 3vw, 48px);
    line-height: 1.16;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-heading p {
    max-width: 850px;
    min-height: 0;
    margin-top: 13px;
    font-size: 13px;
    line-height: 1.65;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-kicker {
    margin-bottom: 11px;
    font-size: 11px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-choices {
    padding-top: 28px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-list-heading {
    min-height: 64px;
    padding: 0 2px 16px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-list-heading h2 {
    font-size: 22px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-list-heading span {
    padding: 8px 11px;
    font-size: 10px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 42px;
    margin-top: 0;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-row,
  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-development {
    min-height: 78px;
    grid-template-columns: 46px minmax(0, 1fr) 16px;
    gap: 14px;
    padding: 13px 2px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-row:hover,
  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-row:focus-visible {
    padding-left: 10px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-index,
  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-action-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: 18px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-copy {
    gap: 4px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-copy strong {
    font-size: 14px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-copy small {
    font-size: 9px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-arrow {
    font-size: 23px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-stage.is-grade-selected .mock-exam-picker-page-list {
    grid-template-columns: minmax(0, 780px);
  }
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-action-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 960px) {
  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-row,
  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-development {
    min-height: 76px;
    grid-template-columns: 45px minmax(0, 1fr) 16px;
    gap: 14px;
    padding: 10px 3px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-index,
  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-action-icon {
    width: 45px;
    height: 45px;
    border-radius: 15px;
    font-size: 18px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-copy {
    gap: 4px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-copy strong {
    font-size: 13px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-copy small {
    font-size: 9px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-arrow {
    font-size: 23px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-action-icon svg {
    width: 20px;
    height: 20px;
  }
}

/* v216: keep the Exam Centre introduction on both desktop exam lists and use
   the same compact text back action as Focused Practice. */
body[data-active-screen="mock-exam-picker"] .mock-exam-picker-summary {
  display: none;
}

@media (min-width: 961px) {
  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-heading {
    display: none;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-summary,
  body[data-active-screen="exam-preview"] .exam-preview-summary {
    width: 100%;
    height: 188px;
    min-height: 188px;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 0;
    overflow: visible;
    color: var(--xiyue-ink, #111a30);
    border: 0;
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-summary::after,
  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-summary .home-exam-guide-art {
    display: none;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-summary .home-exam-guide-copy,
  body[data-active-screen="exam-preview"] .exam-preview-summary .home-exam-guide-copy {
    min-width: 0;
    max-width: 780px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-summary .home-exam-guide-copy > small {
    color: var(--xiyue-blue-600, #315df6);
    font-size: 10px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-summary h2 {
    margin: 7px 0 0;
    color: var(--xiyue-ink, #111a30);
    font-size: 30px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-summary p {
    max-width: 780px;
    margin: 10px 0 0;
    color: var(--xiyue-muted, #75829d);
    font-size: 12px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-summary .home-exam-guide-tags {
    margin-top: 14px;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-summary .home-exam-guide-tags span {
    padding: 6px 9px;
    color: var(--xiyue-blue-600, #315df6);
    border: 0;
    border-radius: 7px;
    background: var(--xiyue-blue-050, #f2f5ff);
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-summary-back,
  body[data-active-screen="exam-preview"] .exam-preview-summary-back {
    display: inline-flex;
    flex: 0 0 auto;
    align-self: flex-end;
  }

  body[data-active-screen="exam-preview"] .exam-preview-titlebar {
    display: none;
  }
}

@media (max-width: 960px) {
  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-summary-back,
  body[data-active-screen="exam-preview"] .exam-preview-summary-back {
    display: none;
  }
}

/* v217: the mock-grade list is the Exam Centre with a different option set,
   so its desktop header, canvas and content frame must be identical. */
@media (min-width: 961px) {
  body[data-active-screen="mock-exam-picker"],
  body[data-active-screen="mock-exam-picker"] .mock-app {
    color: var(--xiyue-ink, #111a30);
    background: #fff;
  }

  body[data-active-screen="mock-exam-picker"] .site-desktop-header-shell {
    position: sticky;
    z-index: 50;
    top: 0;
    display: block;
    padding: 0 clamp(24px, 3vw, 64px);
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(14px);
  }

  body[data-active-screen="mock-exam-picker"] .home-desktop-nav > [data-action="home-ui-home"].is-active {
    color: var(--xiyue-muted, #75829d);
    background: transparent;
  }

  body[data-active-screen="mock-exam-picker"] #home-desktop-exam-trigger {
    color: var(--xiyue-blue-600, #315df6);
    background: var(--xiyue-blue-050, #f2f5ff);
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-stage {
    min-height: calc(100vh - 76px);
    box-sizing: border-box;
    display: block;
    padding: 34px clamp(24px, 3vw, 64px) 64px;
    background: #fff;
  }

  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-shell {
    display: block;
    width: min(1600px, 100%);
    max-width: 1600px;
    margin: 0 auto;
  }
}

/* v218: practice keeps its grade rail visible while the selected grade's
   categories open beside it, matching the mock-exam progressive menu. */
@media (min-width: 961px) {
  #home-desktop-practice-popover.has-practice-categories {
    width: min(876px, calc(100vw - 250px));
    max-width: none;
  }

  #home-desktop-practice-popover .home-desktop-practice-grade-menu {
    width: 230px;
    flex: 0 0 230px;
  }

  #home-desktop-practice-popover .home-desktop-practice-category-menu {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 6px;
  }

  #home-desktop-practice-popover .home-desktop-practice-category-menu > button,
  #home-desktop-practice-popover .home-desktop-practice-category-menu > button > span {
    min-width: 0;
  }

  #home-desktop-practice-popover .home-desktop-practice-category-menu small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* v221: grade and exam-action entries use the same polished, layered icon
   language as Practice categories and the Learning Library. */
body[data-active-screen="single-practice"] .single-practice-grade-card::before {
  display: none !important;
  content: none !important;
}

body[data-active-screen="single-practice"] .single-practice-grade-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
}

body[data-active-screen="single-practice"] .single-practice-grade-icon img,
body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-index img,
body[data-active-screen="mock-exam-picker"] .mock-exam-picker-action-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-index,
body[data-active-screen="mock-exam-picker"] .mock-exam-picker-action-icon {
  overflow: visible;
  color: transparent;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 960px) {
  body[data-active-screen="single-practice"] .single-practice-grade-icon {
    width: 45px;
    height: 45px;
  }
}

/* Touch browsers can keep :hover on the row that replaces the tapped grade.
   An untouched exam action must remain white until the user acts on it. */
@media (hover: none) {
  body[data-active-screen="mock-exam-picker"] .mock-exam-picker-page-row:hover:not(:focus-visible) {
    background: transparent;
  }
}

/* Desktop pages reserve equal scrollbar gutters. Chromium clips fixed
   backdrops at the root gutters, even when their geometry spans 100vw.
   Release the gutters only while a modal is open so the shade can paint to
   both viewport edges; normal page centring returns when it closes. */
@media (min-width: 761px) {
  html:has(:is(
    .exam-navigation-dialog-overlay:not(.hidden),
    .exam-confirm-dialog-overlay:not(.hidden),
    .results-score-reveal-overlay:not(.hidden),
    .exam-time-up-dialog-overlay:not(.hidden),
    .end-test-dialog-overlay:not(.hidden),
    .membership-agreement-dialog-overlay:not(.hidden),
    .membership-payment-dialog-overlay:not(.hidden),
    .auth-dialog-overlay:not(.hidden),
    .learning-music-share-backdrop,
    body[data-auth-overlay-open="true"]
  )) {
    overflow-y: hidden;
    scrollbar-gutter: auto;
  }

  :is(
    .exam-navigation-dialog-overlay,
    .exam-confirm-dialog-overlay,
    .results-score-reveal-overlay,
    .exam-time-up-dialog-overlay,
    .end-test-dialog-overlay,
    .membership-agreement-dialog-overlay,
    .membership-payment-dialog-overlay,
    .auth-dialog-overlay,
    .learning-music-share-backdrop,
    body[data-auth-overlay-open="true"] .login-stage
  ) {
    left: 50%;
    right: auto;
    width: 100vw;
    transform: translateX(-50%);
  }
}

/* A brief device suggestion before phone users open a score or question. */
.phone-study-tip-overlay {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(16, 27, 50, 0.58);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.phone-study-tip-overlay.hidden {
  display: none;
}

.phone-study-tip-card {
  position: relative;
  width: min(410px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 30px 24px 24px;
  border: 1px solid #e7edfb;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(10, 26, 60, 0.24);
  color: #172340;
  text-align: left;
}

.phone-study-tip-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f1f4fb;
  color: #8290a8;
  font-size: 24px;
  line-height: 1;
}

.phone-study-tip-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-inline: auto;
  border-radius: 16px;
  background: linear-gradient(145deg, #e8f2ff, #e8ebff);
  color: #3664f5;
  font-size: 29px;
  font-weight: 800;
}

.phone-study-tip-card h2 {
  margin: 18px 0 0;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 800;
  text-align: center;
}

.phone-study-tip-card p {
  margin: 12px 0 0;
  color: #64718a;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 500;
}

.phone-study-tip-site {
  margin-top: 22px;
  padding: 15px;
  border: 1px solid #e4eafa;
  border-radius: 17px;
  background: #f6f8ff;
}

.phone-study-tip-site-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-study-tip-site-row input {
  flex: 1;
  min-width: 0;
  padding: 5px 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #315df1;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

.phone-study-tip-site-row button {
  flex: none;
  padding: 8px 10px;
  border: 1px solid #d8e2ff;
  border-radius: 9px;
  background: #fff;
  color: #315df1;
  font-size: 12px;
  font-weight: 750;
}

.phone-study-tip-continue {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 22px;
  border: 0;
  border-radius: 13px;
  background: #315ff5;
  box-shadow: 0 10px 24px rgba(49, 95, 245, 0.2);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
}

/* The page titles and rows already explain these lists on every screen size. */
body[data-active-screen="learning-calendar"] .learning-calendar-legend,
body[data-active-screen="single-practice"] .single-practice-categories:not(.is-grade-selected) > .single-practice-categories-heading,
body[data-active-screen="mock-exam-picker"] .mock-exam-picker-stage:not(.is-grade-selected) .mock-exam-picker-list-heading,
body[data-active-screen="wrong-review-hub"] .wrong-review-hub-categories > header {
  display: none;
}

/* Keep the selected grade's page title beside its return button, while
   omitting the redundant item count. Desktop has its own grade action. */
body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected > .single-practice-categories-heading > #single-practice-picker-count {
  display: none;
}

@media (min-width: 961px) {
  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected > .single-practice-categories-heading {
    display: none;
  }
}

@media (max-width: 960px) {
  /* The phone and tablet keep the back button and its page title together. */
  body[data-active-screen="single-practice"] .single-practice-categories.is-grade-selected > .single-practice-categories-heading {
    min-height: 64px;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    padding: 0 1px 12px;
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3);
  }
}

@media (max-width: 760px) {
  body[data-active-screen="learning-calendar"] .learning-calendar-card {
    height: auto;
    min-height: 0;
    padding-bottom: 22px;
  }
}

/* Music library: match existing raised instrument tiles without changing row geometry. */
body[data-active-screen="learning-materials"] .learning-music-instrument-card .learning-music-instrument-icon.is-clarinet {
  background: url("./assets/mobile-practice-icons/clarinet.svg") center / contain no-repeat;
  border-radius: 0;
}
body[data-active-screen="learning-materials"] .learning-music-instrument-card .learning-music-instrument-icon.is-flute {
  background-image: url("./assets/mobile-practice-icons/flute.svg");
}
body[data-active-screen="learning-materials"] .learning-music-instrument-card .learning-music-instrument-icon.is-drumkit {
  background: url("./assets/mobile-practice-icons/drum-kit.svg") center / contain no-repeat;
  border-radius: 0;
}
body[data-active-screen="learning-materials"] .learning-music-instrument-card .learning-music-instrument-icon.is-clarinet > svg { visibility: hidden; }
/* Reserve no visible rail for short library pages; overflowing scores remain scrollable. */
html:has(body[data-active-screen="learning-materials"]):not(:has(body.is-learning-music-app-fullscreen)) {
  overflow-y: auto;
  scrollbar-gutter: auto;
}
.learning-music-pdf-canvas > .learning-music-pdf-document:last-child { margin-bottom: 0; }
@media (min-width: 961px) {
  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-library {
    min-height: calc(100dvh - 75px);
  }
}
/* Keep score-switching and single-score desktop toolbars at the same height. */
@media (min-width: 961px) {
  .learning-music-compact-reader .learning-music-pdf-toolbar {
    height: 48px;
  }
  .learning-violin-score-selector.is-toolbar .learning-violin-segmented {
    height: 32px;
    padding: 2px;
    border-radius: 11px;
  }
  .learning-violin-score-selector.is-toolbar .learning-violin-segmented button {
    min-height: 28px;
    height: 28px;
    padding: 3px 12px;
    border-radius: 9px;
  }
}
/* Give white score pages a readable card boundary on phone screens. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-materials-stage.is-music-detail
    .learning-music-mobile-score:not(.is-app-fullscreen) {
    border-color: #cbd5e5;
    box-shadow: 0 2px 5px rgba(35, 53, 83, .07);
  }
}

/* Portrait phone exams: compact native controls and flat outer surfaces.
   Keep native parents, borders, content dimensions and drag geometry intact. */
.mobile-exam-more-toggle, .mobile-exam-tools { display: none; }
body:is([data-active-screen="exam"], [data-active-screen="instructions"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] :is([data-screen="exam"], [data-screen="instructions"]) .exam-toolbar {
  position: relative;
  z-index: 5;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  grid-template-rows: minmax(40px, auto) 40px;
  gap: 4px 6px !important;
  align-items: center;
  padding: 8px 12px !important;
  border-color: transparent !important;
  border-bottom-color: var(--exam-chrome-line, #e5eaf3) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}
body:is([data-active-screen="exam"], [data-active-screen="instructions"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] :is([data-screen="exam"], [data-screen="instructions"]) :is(.toolbar-left, .toolbar-right) { display: contents !important; }
body:is([data-active-screen="exam"], [data-active-screen="instructions"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] :is([data-screen="exam"], [data-screen="instructions"]) .toolbar-brand {
  grid-column: 1 / 6;
  grid-row: 1;
  min-width: 0;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 700;
  line-height: 1.4;
  white-space: normal;
}
body:is([data-active-screen="exam"], [data-active-screen="instructions"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] :is([data-screen="exam"], [data-screen="instructions"]) .toolbar-right > .timer-pill {
  grid-column: 3 / 5;
  grid-row: 2;
  justify-self: stretch;
  display: flex;
  width: 100%;
  min-width: 0 !important;
  height: 40px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--exam-chrome-tint, #edf2ff) !important;
  font-size: 14px !important;
  font-variant-numeric: tabular-nums;
}
body:is([data-active-screen="exam"], [data-active-screen="instructions"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] :is([data-screen="exam"], [data-screen="instructions"]) .mobile-exam-more-toggle {
  grid-column: 6;
  grid-row: 1;
  display: flex;
  width: 100%;
  min-width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--exam-chrome-accent, #315df6);
  cursor: pointer;
}
body:is([data-active-screen="exam"], [data-active-screen="instructions"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] .mobile-exam-more-toggle svg { width: 24px; height: 24px; fill: currentColor; }
body:is([data-active-screen="exam"], [data-active-screen="instructions"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] :is([data-screen="exam"], [data-screen="instructions"]) .toolbar-left > .toolbar-button {
  grid-row: 2;
  width: 100%;
  min-width: 0 !important;
  height: 40px !important;
  padding: 0 6px !important;
  border-color: transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  font-size: 14px !important;
  box-shadow: none !important;
}
body:is([data-active-screen="exam"], [data-active-screen="instructions"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] :is(#exam-prev-button, .instructions-toolbar [data-action="back-theme"]) { grid-column: 1 / 3; }
body:is([data-active-screen="exam"], [data-active-screen="instructions"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] :is(#exam-next-button, .instructions-toolbar [data-action="go-exam-start"]) { grid-column: 5 / 7; }
body:is([data-active-screen="exam"], [data-active-screen="instructions"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] :is([data-screen="exam"], [data-screen="instructions"]) :is(.single-practice-return-button, [data-action="restart-flow"]) { display: none !important; }
body:is([data-active-screen="exam"], [data-active-screen="instructions"])[data-activity-mode="exam"][data-mobile-exam-layout="mobile"] .mobile-exam-tools {
  position: absolute;
  top: 51px;
  right: 12px;
  z-index: 10;
  display: grid;
  /* INFO chrome has legacy full-width/40px child rules with !important. */
  width: 192px !important;
  height: 188px !important;
  padding: 6px !important;
  border: 1px solid var(--exam-chrome-line, #dfe7f3);
  border-radius: 14px;
  background: var(--test-surface, #fff);
  box-shadow: 0 12px 30px rgba(35, 55, 100, .14);
}
body:is([data-active-screen="exam"], [data-active-screen="instructions"])[data-activity-mode="exam"][data-mobile-exam-layout="mobile"] .mobile-exam-tools[hidden] { display: none !important; }
body:is([data-active-screen="exam"], [data-active-screen="instructions"])[data-activity-mode="exam"][data-mobile-exam-layout="mobile"] :is([data-screen="exam"], [data-screen="instructions"]) :is(.toolbar-left > [data-action="open-nav"], .toolbar-right > :is([data-action="go-theme"], [data-action="return-home-save-draft"], [data-action="end-test"])) {
  position: absolute;
  z-index: 11;
  right: 18px;
  top: 57px;
  grid-row: auto !important;
  grid-column: auto !important;
  display: none !important;
  width: 180px !important;
  min-width: 0 !important;
  height: 44px !important;
  padding: 0 12px !important;
  border-color: transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  font-size: 14px !important;
  text-align: left;
  box-shadow: none !important;
}
body:is([data-active-screen="exam"], [data-active-screen="instructions"])[data-activity-mode="exam"][data-mobile-exam-layout="mobile"][data-mobile-exam-tools-open="true"] :is([data-screen="exam"], [data-screen="instructions"]) :is(.toolbar-left > [data-action="open-nav"], .toolbar-right > :is([data-action="go-theme"], [data-action="return-home-save-draft"], [data-action="end-test"])) { display: block !important; }
body:is([data-active-screen="exam"], [data-active-screen="instructions"])[data-activity-mode="exam"][data-mobile-exam-layout="mobile"] :is([data-screen="exam"], [data-screen="instructions"]) .toolbar-right > [data-action="go-theme"] { top: 101px; }
body:is([data-active-screen="exam"], [data-active-screen="instructions"])[data-activity-mode="exam"][data-mobile-exam-layout="mobile"] :is([data-screen="exam"], [data-screen="instructions"]) .toolbar-right > [data-action="return-home-save-draft"] { top: 145px; }
body:is([data-active-screen="exam"], [data-active-screen="instructions"])[data-activity-mode="exam"][data-mobile-exam-layout="mobile"] :is([data-screen="exam"], [data-screen="instructions"]) .toolbar-right > [data-action="end-test"] {
  top: 189px;
  border-top-color: var(--exam-chrome-line, #e5eaf3) !important;
  border-radius: 0 0 8px 8px !important;
}
body:is([data-active-screen="exam"], [data-active-screen="instructions"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] .toolbar-right > .exam-content-zoom-controls { display: none !important; }
body:is([data-active-screen="exam"], [data-active-screen="instructions"])[data-activity-mode="exam"][data-mobile-exam-layout="mobile"] :is(.mobile-exam-more-toggle, :is(.toolbar-left > [data-action="open-nav"], .toolbar-right > :is([data-action="go-theme"], [data-action="return-home-save-draft"], [data-action="end-test"]))):focus-visible { outline: 2px solid var(--exam-chrome-accent, #315df6); outline-offset: 2px; }
body:is([data-active-screen="exam"], [data-active-screen="instructions"])[data-activity-mode="exam"][data-mobile-exam-layout="mobile"] :is(.mobile-exam-more-toggle, :is(.toolbar-left > [data-action="open-nav"], .toolbar-right > :is([data-action="go-theme"], [data-action="return-home-save-draft"], [data-action="end-test"]))):active { background: var(--exam-chrome-tint, #edf2ff) !important; }
body:is([data-active-screen="exam"], [data-active-screen="instructions"]):is([data-activity-mode="exam"], [data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] :is(#exam-main, .instructions-main) :is(.exam-card, .info-frame, .q1-question-card, .q1-reference-card, .q1-answer-card, .capture-page-wrap, .select-page-shell, .q1-question-card-body, .q1-reference-card-body, .q1-answer-card-body, .info-main-card-content, .info-action-card-body) {
  border-color: transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
/* Complete the three outer edges; the original inner divider stays in place.
   Painting outside the existing box preserves button and navigation geometry. */
body:is([data-active-screen="exam"], [data-active-screen="instructions"])[data-activity-mode="exam"][data-mobile-exam-layout="mobile"] :is(#exam-paper-nav, #instructions-paper-nav) .paper-nav-arrow-left {
  box-shadow: -1px 0 0 var(--exam-chrome-line, #dbdbdb), 0 -1px 0 var(--exam-chrome-line, #dbdbdb), 0 1px 0 var(--exam-chrome-line, #dbdbdb) !important;
}
body:is([data-active-screen="exam"], [data-active-screen="instructions"])[data-activity-mode="exam"][data-mobile-exam-layout="mobile"] :is(#exam-paper-nav, #instructions-paper-nav) .paper-nav-arrow-right {
  box-shadow: 1px 0 0 var(--exam-chrome-line, #dbdbdb), 0 -1px 0 var(--exam-chrome-line, #dbdbdb), 0 1px 0 var(--exam-chrome-line, #dbdbdb) !important;
}
/* Phone navigation summary and optical icon alignment. Desktop stays unchanged. */
body[data-mobile-exam-layout="mobile"] .exam-navigation-dialog-eyebrow { display: none; }
body[data-mobile-exam-layout="mobile"] .exam-navigation-dialog-close {
  display: grid;
  place-items: center;
  font-size: 0;
}
body[data-mobile-exam-layout="mobile"] .exam-navigation-dialog-close::before,
body[data-mobile-exam-layout="mobile"] .exam-navigation-dialog-close::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 2.5px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}
body[data-mobile-exam-layout="mobile"] .exam-navigation-dialog-close::after { transform: rotate(-45deg); }
body[data-mobile-exam-layout="mobile"] .exam-navigation-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
body[data-mobile-exam-layout="mobile"] .exam-navigation-summary > span {
  min-width: 0;
  min-height: 58px;
  padding: 9px 4px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  text-align: center;
}
body[data-mobile-exam-layout="mobile"] .exam-navigation-summary small {
  max-width: 100%;
  line-height: 1.25;
}
body[data-mobile-exam-layout="mobile"] .exam-navigation-current-indicator {
  display: grid;
  place-items: center;
  align-self: center;
  font-size: 0;
  line-height: 1;
}
body[data-mobile-exam-layout="mobile"] .exam-navigation-row.is-current .exam-navigation-current-indicator::before {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}
body[data-mobile-exam-layout="mobile"] .exam-navigation-item-number {
  align-self: center;
  line-height: 1;
}

/* INFO only: continue follows its copy instead of a fixed-height empty frame.
   Question card dimensions and all drag containers keep their existing rules. */
body[data-active-screen="exam"][data-mobile-exam-layout="mobile"][data-exam-fragment^="Info_"] #exam-main .info-card-stack:not(.q1-card-stack) {
  gap: 0;
}
body[data-active-screen="exam"][data-mobile-exam-layout="mobile"][data-exam-fragment^="Info_"] #exam-main .info-card-stack:not(.q1-card-stack) > :is(.info-main-card-frame, .info-action-card-frame),
body[data-active-screen="exam"][data-mobile-exam-layout="mobile"][data-exam-fragment^="Info_"] #exam-main .info-card-stack:not(.q1-card-stack) :is(.info-main-card-body, .info-action-card-body) {
  height: auto !important;
  min-height: 0 !important;
}
body[data-active-screen="exam"][data-mobile-exam-layout="mobile"][data-exam-fragment^="Info_"] #exam-main .info-card-stack:not(.q1-card-stack) .info-action-card-body {
  padding-top: 0 !important;
  padding-bottom: 8px !important;
}

/* The first INFO is the separate instructions screen. Match its continue
   spacing to the section INFO pages without changing the instruction copy. */
body[data-active-screen="instructions"][data-mobile-exam-layout="mobile"] .instructions-zoom-content {
  gap: 0;
}
body[data-active-screen="instructions"][data-mobile-exam-layout="mobile"] .instructions-main .info-main-card-body > .bullet-copy:last-child {
  margin-bottom: 0;
}
body[data-active-screen="instructions"][data-mobile-exam-layout="mobile"] .instructions-main .info-main-card-body {
  padding-bottom: 14px !important;
}
body[data-active-screen="instructions"][data-mobile-exam-layout="mobile"] .instructions-main :is(.info-main-card-frame, .info-action-card-frame, .info-action-card-body) {
  height: auto !important;
  min-height: 0 !important;
}
body[data-active-screen="instructions"][data-mobile-exam-layout="mobile"] .instructions-main .info-action-card-body {
  padding-top: 0 !important;
  padding-bottom: 8px !important;
}

/* Practice/review reuse the phone exam shell with two native menu actions.
   Keep their previous/next, feedback, question layout and drag handlers intact. */
body[data-active-screen="exam"][data-activity-mode="wrong-review"][data-mobile-exam-layout="mobile"] .wrong-review-main.is-teacher-review { display: contents; }
body[data-active-screen="exam"][data-activity-mode="wrong-review"][data-mobile-exam-layout="mobile"] .is-teacher-review > .wrong-review-overview-card { display: none; }
body[data-active-screen="exam"]:is([data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] #exam-prev-button { grid-column: 1 / 4; }
body[data-active-screen="exam"]:is([data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] #exam-next-button { grid-column: 4 / 7; }
body[data-active-screen="exam"]:is([data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] .exam-toolbar :is([data-action="open-nav"], [data-action="end-test"], .timer-pill) { display: none !important; }
body[data-active-screen="exam"]:is([data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] .mobile-exam-tools {
  position: absolute;
  top: 51px;
  right: 12px;
  z-index: 10;
  display: block !important;
  width: 192px !important;
  height: 100px !important;
  padding: 6px !important;
  border: 1px solid var(--exam-chrome-line, #dfe7f3);
  border-radius: 14px;
  background: var(--test-surface, #fff);
  box-shadow: 0 12px 30px rgba(35, 55, 100, .14);
}
body[data-active-screen="exam"]:is([data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] .mobile-exam-tools[hidden] { display: none !important; }
body[data-active-screen="exam"]:is([data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] .exam-toolbar .toolbar-right > :is(#mobile-exam-native-control-0, #mobile-exam-native-control-1) {
  position: absolute;
  z-index: 11;
  right: 18px;
  top: 57px;
  display: none !important;
  box-sizing: border-box;
  width: 180px !important;
  min-width: 0 !important;
  height: 44px !important;
  min-height: 0;
  max-height: none !important;
  margin: 0;
  padding: 0 12px !important;
  border-color: transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--exam-chrome-accent, #315df6);
  font-size: 14px !important;
  text-align: left;
  line-height: 1;
  box-shadow: none !important;
}
body[data-active-screen="exam"]:is([data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"][data-mobile-exam-tools-open="true"] .exam-toolbar .toolbar-right > :is(#mobile-exam-native-control-0, #mobile-exam-native-control-1) { display: block !important; }
body[data-active-screen="exam"]:is([data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] .exam-toolbar .toolbar-right > #mobile-exam-native-control-1 {
  top: 101px;
  border-top-color: var(--exam-chrome-line, #e5eaf3) !important;
  border-radius: 0 0 8px 8px !important;
}
body[data-active-screen="exam"]:is([data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] .exam-toolbar :is(.mobile-exam-more-toggle, [data-action="go-theme"], [data-action="return-home-save-draft"]):focus-visible { outline: 2px solid var(--exam-chrome-accent, #315df6); outline-offset: 2px; }
body[data-active-screen="exam"]:is([data-activity-mode="single-practice"], [data-activity-mode="wrong-review"])[data-mobile-exam-layout="mobile"] .exam-toolbar :is(.mobile-exam-more-toggle, [data-action="go-theme"], [data-action="return-home-save-draft"]):active { background: var(--exam-chrome-tint, #edf2ff) !important; }

/* Account information: nickname saves independently of password verification. */
body[data-active-screen="login"] .account-profile-actions { grid-template-columns: minmax(0, 1fr); }
body[data-active-screen="login"] .account-profile-actions .login-button { min-height: 46px; border-radius: 10px; }
body[data-active-screen="login"] .account-profile-name-status { margin: 0; color: #cf4058; font-size: 12px; line-height: 1.6; }
/* Class directory: flat sections and compact rows. The title/back header keeps
   its existing markup and rules; all group and relationship controls stay native. */
body[data-active-screen="login"] .login-panel:has(> .teacher-student-action-card) > :is(.teacher-student-action-card, .teacher-student-list-card) {
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 20px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body[data-active-screen="login"] .login-panel:has(> .teacher-student-action-card) > .teacher-student-action-card { border-bottom: 1px solid var(--xiyue-line, #e5eaf3); }
body[data-active-screen="login"] .teacher-student-action-card > div > small,
body[data-active-screen="login"] .teacher-student-list-card > header small { display: none; }
body[data-active-screen="login"] .teacher-student-action-card h2,
body[data-active-screen="login"] .teacher-student-list-card h2 { margin: 0; font-size: 18px; }
body[data-active-screen="login"] .teacher-student-list-card > header { height: auto; min-height: 40px; margin: 0; padding: 0 0 12px; }
body[data-active-screen="login"] .teacher-student-person-actions button { min-height: 36px; padding: 0 8px; border-radius: 6px; background: transparent; box-shadow: none; font-size: 12px; }
body[data-active-screen="login"] .teacher-student-person-actions button.is-danger { background: transparent; }
body[data-active-screen="login"] .teacher-student-person-actions button:hover { text-decoration: underline; }
@media (max-width: 760px) {
  body[data-active-screen="login"] .teacher-student-action-card { gap: 14px; }
  body[data-active-screen="login"] .teacher-student-code-entry { grid-template-columns: minmax(0, 1fr) minmax(100px, 128px); gap: 10px; }
  body[data-active-screen="login"] .teacher-student-code-entry input { width: 100%; height: 48px; padding: 0 12px; font-size: 16px; letter-spacing: .03em; }
  body[data-active-screen="login"] .teacher-student-code-entry button { width: 100%; min-height: 48px; padding: 8px; border-radius: 12px; line-height: 1.5; box-shadow: none; }
  body[data-active-screen="login"] .teacher-student-person-card { grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; row-gap: 0; min-height: 84px; padding: 10px 0; }
  body[data-active-screen="login"] .teacher-student-person-card > .teacher-student-avatar { grid-column: 1; grid-row: 1 / 3; align-self: center; width: 36px; height: 36px; border-radius: 12px; font-size: 15px; }
  body[data-active-screen="login"] .teacher-student-person-card > span:nth-child(2) { grid-column: 2; grid-row: 1; align-self: end; padding-top: 3px; }
  body[data-active-screen="login"] .teacher-student-person-card > .teacher-student-person-actions { grid-column: 2; grid-row: 2; display: flex; justify-content: flex-start; gap: 16px; width: auto; }
  body[data-active-screen="login"] .teacher-student-person-card > .teacher-student-person-actions button { flex: 0 1 auto; width: auto; min-height: 44px; padding: 0; font-size: 12px; line-height: 1.5; }
  body[data-active-screen="login"] .teacher-student-avatar > .teacher-student-mobile-avatar-group-select { inset: -4px; width: 44px; height: 44px; }
  body[data-active-screen="login"] .teacher-student-person-card > .teacher-student-group-control.is-mobile-new-group-open { grid-row: 3; }
  body[data-active-screen="login"] .teacher-student-group-directory > button { min-height: 64px; padding: 10px 0; }
  body[data-active-screen="login"] .teacher-student-group-directory-icon { width: 36px; height: 36px; border-radius: 12px; }
}
@media (max-width: 960px) {
  body[data-active-screen="login"] .account-profile-management-card {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3);
  }
}

/* Feedback attachments share one responsive gallery; legacy single-image markup is retired. */
body[data-active-screen="feedback"] .feedback-textarea-wrap { position: relative; display: block; min-width: 0; }
body[data-active-screen="feedback"] .feedback-field textarea { display: block; width: 100%; padding-bottom: 42px; }
body[data-active-screen="feedback"] .feedback-attachments { display: grid; min-width: 0; gap: 12px; }
body[data-active-screen="feedback"] .feedback-image-count { margin: 0; color: #7c879b; font-size: 12px; text-align: right; }
body[data-active-screen="feedback"] .feedback-upload-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; height: auto; box-sizing: border-box; padding: 20px 16px; text-align: center; }
body[data-active-screen="feedback"] .feedback-upload-card.is-compact { min-height: 0; padding: 10px; }
body[data-active-screen="feedback"] .feedback-upload-card p { max-width: 32em; line-height: 1.6; }
body[data-active-screen="feedback"] .feedback-file-button { width: min(220px,100%); min-height: 44px; box-sizing: border-box; }
body[data-active-screen="feedback"] .feedback-file-button:focus-within { outline: 2px solid #315df6; outline-offset: 3px; }
body[data-active-screen="feedback"] .feedback-gallery { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 12px; }
body[data-active-screen="feedback"] .feedback-gallery:has(> :only-child) { grid-template-columns: minmax(0,1fr); }
body[data-active-screen="feedback"] .feedback-preview { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 8px; min-width: 0; height: auto; min-height: 0; margin: 0; padding: 10px; }
body[data-active-screen="feedback"] .feedback-preview img { display: block; width: auto; height: auto; max-width: 100%; max-height: 220px; justify-self: center; object-fit: contain; border: 0; border-radius: 8px; }
body[data-active-screen="feedback"] .feedback-preview-copy { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
body[data-active-screen="feedback"] .feedback-preview-copy strong { min-width: 0; overflow: hidden; color: #60708a; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
body[data-active-screen="feedback"] .feedback-remove-image { flex: 0 0 auto; min-height: 44px; padding: 0; border: 0; background: transparent; color: #315df6; font-size: 12px; cursor: pointer; }
body[data-active-screen="feedback"] .feedback-success-overlay { position: fixed; z-index: 2200; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(20,31,57,.34); }
body[data-active-screen="feedback"] .feedback-success-dialog { display: grid; justify-items: center; gap: 14px; width: min(360px,100%); box-sizing: border-box; padding: 30px 24px 24px; border-radius: 24px; background: #fff; box-shadow: 0 24px 70px rgba(20,31,57,.2); text-align: center; }
body[data-active-screen="feedback"] .feedback-success-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #e9f8f2; color: #15956f; font-size: 27px; }
body[data-active-screen="feedback"] .feedback-success-dialog h2 { margin: 0; color: #182238; font-size: 22px; }
body[data-active-screen="feedback"] .feedback-success-dialog p { margin: 0 0 8px; color: #718096; font-size: 14px; }
body[data-active-screen="feedback"] .feedback-success-dialog button { width: 100%; min-height: 46px; }
body[data-active-screen="feedback"]:has(.feedback-success-overlay) { overflow: hidden; }
@media (max-width: 960px) {
  body[data-active-screen="feedback"] .feedback-form { grid-template-columns: minmax(0,1fr); }
  body[data-active-screen="feedback"] .feedback-attachments { margin-top: 0; }
  body[data-active-screen="feedback"] .feedback-actions { grid-template-columns: minmax(0,1fr); width: 100%; }
  body[data-active-screen="feedback"] .feedback-actions > button { width: 100%; box-sizing: border-box; }
  body[data-active-screen="feedback"] .feedback-preview-copy { flex-wrap: wrap; gap: 0 8px; }
  body[data-active-screen="feedback"] .feedback-preview-copy strong { flex: 1 1 80px; }
  body[data-active-screen="feedback"] .feedback-remove-image { margin-left: auto; }
}

/* Keep feedback text, screenshots and submit actions in one reading column. */
body[data-active-screen="feedback"] .feedback-attachment-message { margin: 0; color: #315df6; font-size: 12px; line-height: 1.65; outline: none; }
body[data-active-screen="feedback"] .feedback-actions > .feedback-status-message { grid-column: 1 / -1; margin: 0; min-height: 0; color: #be3144; font-size: 13px; line-height: 1.6; }
/* Desktop feedback follows a support-page layout: context on the left,
   one coherent form on the right. The phone layout remains unchanged. */
.feedback-desktop-intro { display: none; }
@media (min-width: 961px) {
  body[data-active-screen="feedback"] .feedback-stage { padding-top: clamp(72px,7vw,110px); }
  body[data-active-screen="feedback"] .account-feature-shell {
    display: grid;
    /* Preserve the intro's previous width; give the wider page to the form. */
    grid-template-columns: minmax(0,calc((min(1200px,100%) - clamp(36px,5vw,72px)) * .47)) minmax(0,1fr);
    grid-template-rows: auto 1fr auto;
    align-items: start;
    gap: 0 clamp(36px,5vw,72px);
    width: min(1600px,100%);
    max-width: 1600px;
  }
  body[data-active-screen="feedback"] .account-feature-titlebar {
    grid-column: 1;
    grid-row: 1;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }
  body[data-active-screen="feedback"] .account-feature-titlebar h1 { font-size: clamp(34px,3vw,42px); line-height: 1.25; letter-spacing: -.035em; }
  body[data-active-screen="feedback"] .feedback-panel { grid-column: 2; grid-row: 1 / 4; width: 100%; max-width: none; }
  body[data-active-screen="feedback"] .feedback-panel:has(.feedback-form) { display: contents; }
  body[data-active-screen="feedback"] .feedback-panel:has(.feedback-form) > .feedback-copy { grid-column: 1; grid-row: 2; margin: 24px 0 0; }
  body[data-active-screen="feedback"] .feedback-mobile-intro { display: none; }
  body[data-active-screen="feedback"] .feedback-desktop-intro { display: block; }
  body[data-active-screen="feedback"] .feedback-desktop-intro > p { max-width: 29em; margin: 0; color: #7b8497; font-size: 14px; line-height: 1.85; }
  body[data-active-screen="feedback"] .feedback-desktop-intro ul { display: grid; gap: 15px; margin: 26px 0 32px; padding: 0; list-style: none; }
  body[data-active-screen="feedback"] .feedback-desktop-intro li { display: flex; align-items: baseline; gap: 11px; color: #3c475d; font-size: 14px; line-height: 1.6; }
  body[data-active-screen="feedback"] .feedback-desktop-intro li::before { content: "✓"; display: inline-grid; place-items: center; flex: 0 0 17px; width: 17px; height: 17px; color: #315df6; border-radius: 50%; background: #edf2ff; font-size: 11px; font-weight: 800; line-height: 1; }
  body[data-active-screen="feedback"] .feedback-desktop-intro > .feedback-desktop-note { color: #939bad; font-size: 12px; }
  body[data-active-screen="feedback"] .feedback-form {
    grid-column: 2;
    grid-row: 1 / 3;
    grid-template-columns: minmax(0,1fr);
    gap: 20px;
    padding: 4px 0 0 clamp(28px,3.4vw,48px);
    border-left: 1px solid #e9edf4;
  }
  body[data-active-screen="feedback"] .feedback-field { grid-template-rows: auto auto; gap: 12px; }
  body[data-active-screen="feedback"] .feedback-field > span:first-child { color: #3c475d; font-size: 14px; font-weight: 600; line-height: 20px; }
  body[data-active-screen="feedback"] .feedback-field textarea { height: 210px; min-height: 210px; padding: 14px 16px 40px; border: 1px solid #e2e7f0; border-radius: 10px; background: #f9fafc; font-size: 14px; line-height: 1.7; resize: vertical; }
  body[data-active-screen="feedback"] .feedback-field textarea:focus { border-color: #9eb3ff; outline: none; box-shadow: 0 0 0 3px rgba(49,93,246,.08); }
  body[data-active-screen="feedback"] .feedback-counter { font-size: 11px; }
  body[data-active-screen="feedback"] .feedback-attachments { margin-top: 0; }
  body[data-active-screen="feedback"] .feedback-upload-card { gap: 10px; padding: 16px; border-color: #dce3ee; border-radius: 10px; background: #fcfdff; }
  body[data-active-screen="feedback"] .feedback-upload-card:not(.is-compact) { min-height: 124px; }
  body[data-active-screen="feedback"] .feedback-upload-card strong { color: #4c5870; font-size: 12px; font-weight: 600; }
  body[data-active-screen="feedback"] .feedback-upload-card p { margin-top: 5px; color: #939bad; font-size: 11px; }
  body[data-active-screen="feedback"] .feedback-upload-card.is-compact { padding: 10px; }
  body[data-active-screen="feedback"] .feedback-file-button { width: auto; max-width: 100%; min-height: 34px; padding: 6px 14px; border: 1px solid #e1e7f1; border-radius: 8px; background: #fff; font-size: 12px; font-weight: 600; box-shadow: none; }
  body[data-active-screen="feedback"] .feedback-file-button::before { content: "+"; margin-right: 7px; font-size: 17px; font-weight: 400; }
  body[data-active-screen="feedback"] .feedback-gallery,
  body[data-active-screen="feedback"] .feedback-gallery:has(> :only-child) { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  body[data-active-screen="feedback"] .feedback-preview { position: relative; grid-template-rows: 100px auto; align-items: center; gap: 8px; padding: 10px; border-color: #e6ebf3; border-radius: 9px; background: #fafbfd; }
  body[data-active-screen="feedback"] .feedback-preview img { max-height: 100px; border-radius: 5px; }
  body[data-active-screen="feedback"] .feedback-preview-copy { display: block; }
  body[data-active-screen="feedback"] .feedback-preview-copy strong { font-size: 10px; color: #8b95a7; }
  body[data-active-screen="feedback"] .feedback-remove-image { position: absolute; z-index: 1; top: 5px; right: 5px; display: grid; place-items: center; width: 24px; height: 24px; min-height: 24px; padding: 0; color: #748098; border: 1px solid #e3e8f1; border-radius: 50%; background: #fff; font-size: 0; line-height: 1; }
  body[data-active-screen="feedback"] .feedback-remove-image::before { content: "×"; font-size: 17px; font-weight: 400; }
  body[data-active-screen="feedback"] .feedback-remove-image:hover,
  body[data-active-screen="feedback"] .feedback-remove-image:focus-visible { color: #d84b64; border-color: #efcbd3; outline: none; background: #fff6f8; }
  body[data-active-screen="feedback"] .feedback-panel:has(.feedback-form) > .feedback-actions { grid-column: 2; grid-row: 3; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px 16px; justify-content: stretch; padding: 22px 0 0 clamp(28px,3.4vw,48px); border-left: 1px solid #e9edf4; }
  body[data-active-screen="feedback"] .feedback-panel:has(.feedback-form) > .feedback-actions > .login-button-primary { grid-column: 2; width: auto; min-width: 124px; min-height: 42px; padding: 0 18px; border-radius: 9px; font-size: 13px; }
}

/* Drum kit: three choices share the existing audio selector width. On phones,
   two short lines keep the click variants readable without narrowing tap targets. */
@media (max-width: 960px) {
  body[data-active-screen="learning-materials"] .learning-drumkit-audio-selector {
    gap: 4px;
    padding: 4px;
  }
  body[data-active-screen="learning-materials"] .learning-drumkit-audio-selector button {
    min-height: 48px;
    padding: 5px 3px;
    text-align: center;
  }
  body[data-active-screen="learning-materials"] .learning-drumkit-audio-full-label { display: none; }
  body[data-active-screen="learning-materials"] .learning-drumkit-audio-compact-label {
    display: grid;
    gap: 3px;
    justify-items: center;
    line-height: 1.25;
  }
  body[data-active-screen="learning-materials"] .learning-drumkit-audio-compact-label strong { font-size: 12px; }
  body[data-active-screen="learning-materials"] .learning-drumkit-audio-compact-label small {
    font-size: 10px;
    font-weight: 600;
    opacity: .85;
  }
}

/* Student detail: one identity heading with its learning totals. */
body .teacher-student-detail-heading.account-ui-subpage-heading {
  display: grid !important;
  height: auto !important;
  min-height: 64px !important;
  box-sizing: border-box;
  padding-bottom: 18px !important;
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
}
body .teacher-student-detail-heading > div { min-width: 0; }
body .teacher-student-detail-heading .account-ui-subpage-kicker {
  display: block !important;
}
body .teacher-student-detail-heading > .teacher-student-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 110px));
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  margin: 0;
  padding: 0;
}
.teacher-student-detail-stats > span {
  display: grid;
  gap: 5px;
  justify-items: center;
  min-width: 0;
  padding: 7px 12px;
  border-left: 1px solid var(--xiyue-line, #e5eaf3);
}
.teacher-student-detail-stats strong { color: var(--xiyue-ink, #172033); font-size: 18px; }
.teacher-student-detail-stats small { color: var(--xiyue-muted, #7d889f); font-size: 10px; text-align: center; }
body[data-active-screen="wrong-review-hub"][data-teacher-wrong-review="true"] .teacher-student-detail-tabs {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--xiyue-line, #e5eaf3);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body[data-active-screen="wrong-review-hub"][data-teacher-wrong-review="true"] .teacher-student-detail-tabs button {
  flex: 0 1 auto;
  min-height: 52px;
  padding: 0 5px;
  border-bottom: 3px solid transparent;
  border-radius: 0;
}
body[data-active-screen="wrong-review-hub"][data-teacher-wrong-review="true"] .teacher-student-detail-tabs button.is-active {
  color: var(--xiyue-blue-600, #315df6);
  border-bottom-color: var(--xiyue-blue-600, #315df6);
  background: transparent;
  box-shadow: none;
}
body[data-active-screen="wrong-review-hub"][data-teacher-wrong-review="true"] .teacher-student-detail-tabs button span {
  color: var(--xiyue-blue-600, #315df6);
  background: var(--xiyue-blue-050, #eef2ff);
}
body[data-active-screen="wrong-review-hub"][data-teacher-wrong-review="true"] #wrong-review-hub-summary-label {
  text-transform: none;
  overflow-wrap: anywhere;
}
@media (max-width: 960px) {
  body .teacher-student-detail-heading.account-ui-subpage-heading {
    grid-template-columns: 46px minmax(0, 1fr) !important;
  }
  body .teacher-student-detail-heading > .teacher-student-detail-stats {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    padding-top: 4px;
  }
  .teacher-student-detail-stats > span { padding: 8px 5px; }
  .teacher-student-detail-stats > span:first-child { border-left: 0; }
  .teacher-student-detail-stats strong { font-size: 17px; }
}

/* Desktop review navigation follows the existing Practice summary action.
   Phone and tablet keep their current title, back control and totals. */
.student-review-desktop-back,
.teacher-student-detail-desktop-stats { display: none !important; }
.teacher-student-detail-toolbar { display: contents; }

@media (min-width: 961px) {
  body[data-active-screen="wrong-review-hub"] #wrong-review-hub-start {
    display: none;
  }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-all-row {
    display: flex;
  }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-all-row .wrong-review-hub-category-count {
    color: #315df6;
    background: #eaf0ff;
  }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-all-row .wrong-review-hub-category-description {
    display: block;
    color: var(--xiyue-muted, #7d889f);
    font-size: 10px;
  }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary > .student-review-desktop-back,
  body[data-active-screen="login"] .teacher-student-detail-heading > .student-review-desktop-back {
    display: inline-flex !important;
    flex: 0 0 auto;
    width: auto !important;
    min-width: 0;
    min-height: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0 14px;
    color: #315df6;
    border: 1px solid #dbe4f7;
    border-radius: 13px;
    background: #fff;
    box-shadow: none;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    line-height: normal;
    white-space: nowrap;
  }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary > .student-review-desktop-back span {
    font: inherit;
  }
  body[data-active-screen="wrong-review-hub"] .wrong-review-hub-summary > .student-review-desktop-back:hover,
  body[data-active-screen="login"] .teacher-student-detail-heading > .student-review-desktop-back:hover {
    border-color: #bdcbf3;
    background: #f7f9ff;
    box-shadow: 0 8px 18px rgba(49, 93, 246, .09);
  }
  body[data-active-screen="login"] .teacher-student-detail-heading.account-ui-subpage-heading {
    display: flex !important;
    height: auto !important;
    min-height: 154px !important;
    align-items: flex-end !important;
    justify-content: space-between;
    gap: 24px !important;
    margin: 0 !important;
    padding: 28px 0 !important;
  }
  body[data-active-screen="login"] .teacher-student-detail-heading > .account-ui-subpage-back,
  body[data-active-screen="login"] .teacher-student-detail-heading > .teacher-student-detail-mobile-stats {
    display: none;
  }
  body[data-active-screen="login"] .teacher-student-detail-heading > div {
    max-width: 780px;
  }
  body[data-active-screen="login"] .teacher-student-detail-heading .account-ui-subpage-kicker {
    margin: 0;
    color: var(--xiyue-blue-600, #315df6);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .16em;
    line-height: 1.2;
  }
  body[data-active-screen="login"] .teacher-student-detail-heading h1 {
    margin: 7px 0 0;
    color: var(--xiyue-ink, #172033);
    font-size: 38px;
    line-height: 1.2;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
  }
  body[data-active-screen="login"] .teacher-student-detail-heading .account-ui-subpage-copy {
    display: block !important;
    margin: 10px 0 0;
    color: var(--xiyue-muted, #7d889f);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.65;
  }
  body[data-active-screen="login"] .teacher-student-detail-toolbar {
    display: flex;
    min-height: 74px;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3);
  }
  body[data-active-screen="login"] .teacher-student-detail-toolbar .teacher-student-detail-tabs {
    margin: 0 !important;
    border-bottom: 0 !important;
  }
  body[data-active-screen="login"] .teacher-student-detail-toolbar .teacher-student-detail-tabs button {
    min-height: 74px;
  }
  body[data-active-screen="login"] .teacher-student-detail-toolbar > .teacher-student-detail-desktop-stats {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(86px, 110px));
    align-self: center;
    margin: 0;
    padding: 0;
  }
}

/* Student activity and wrong questions share one desktop tab-row height. */
@media (min-width: 961px) {
  body[data-active-screen="wrong-review-hub"][data-teacher-wrong-review="true"] #wrong-review-student-tabs,
  body[data-active-screen="login"] .teacher-student-detail-toolbar {
    box-sizing: border-box;
    height: 74px;
    min-height: 74px;
  }
  body[data-active-screen="wrong-review-hub"][data-teacher-wrong-review="true"] #wrong-review-student-tabs button,
  body[data-active-screen="login"] .teacher-student-detail-toolbar .teacher-student-detail-tabs button {
    box-sizing: border-box;
    height: 73px;
    min-height: 73px;
  }
}

/* The student calendar uses the personal calendar's desktop presentation.
   Its additional detail labels stay hidden in the existing phone layout. */
.teacher-student-calendar-desktop-only { display: none !important; }
@media (min-width: 961px) {
  body[data-active-screen="login"] .teacher-student-calendar-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(340px, .72fr);
    gap: 0;
  }
  body[data-active-screen="login"] .teacher-student-calendar-card {
    box-sizing: border-box;
    padding: 0 36px 0 0;
    background: #fff;
  }
  body[data-active-screen="login"] .teacher-student-calendar-card > header {
    width: 330px;
    max-width: 100%;
    min-height: 40px;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 10px;
  }
  body[data-active-screen="login"] .teacher-student-calendar-card > header button {
    width: 40px;
    height: 40px;
    color: var(--xiyue-blue-600, #315df6);
    border: 0;
    border-radius: 8px;
    background: var(--xiyue-blue-050, #f4f7ff);
    box-shadow: none;
    font-size: 22px;
  }
  body[data-active-screen="login"] .teacher-student-calendar-card > header button:hover {
    background: var(--xiyue-blue-100, #eaf0ff);
    transform: translateY(-1px);
  }
  body[data-active-screen="login"] .teacher-student-calendar-card h2 {
    margin: 0;
    color: var(--xiyue-ink, #172033);
    font-size: 18px;
    font-weight: 840;
    letter-spacing: -.02em;
    text-align: center;
  }
  body[data-active-screen="login"] :is(.teacher-student-calendar-weekdays, .teacher-student-calendar-grid) {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
  }
  body[data-active-screen="login"] .teacher-student-calendar-weekdays { margin: 24px 0 8px; }
  body[data-active-screen="login"] .teacher-student-calendar-weekdays span {
    color: var(--xiyue-subtle, #98a0b2);
    font-size: 10px;
    font-weight: 750;
    line-height: 18px;
    text-align: center;
  }
  body[data-active-screen="login"] :is(.teacher-student-calendar-grid > button, .teacher-student-calendar-spacer) {
    min-height: 66px;
    aspect-ratio: auto;
  }
  body[data-active-screen="login"] .teacher-student-calendar-grid > button {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 11px;
    color: #69758d;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f7f8fb;
    box-shadow: none;
    font-size: 11px;
    font-weight: 780;
  }
  body[data-active-screen="login"] .teacher-student-calendar-grid > button:hover {
    border-color: #dfe5f0;
    background: #f2f5fb;
  }
  body[data-active-screen="login"] .teacher-student-calendar-grid > button.has-activity {
    color: #137e66;
    background: #effaf7;
  }
  body[data-active-screen="login"] .teacher-student-calendar-grid > button.is-today {
    color: var(--xiyue-blue-600, #315df6);
    border-color: #cad6ff;
    background: var(--xiyue-blue-050, #f4f7ff);
  }
  body[data-active-screen="login"] .teacher-student-calendar-grid > button.has-activity.is-today:not(.is-selected) {
    border-color: #58c5a5 !important;
  }
  body[data-active-screen="login"] .teacher-student-calendar-grid > button.is-selected {
    color: #fff;
    border-color: var(--xiyue-blue-600, #315df6);
    background: var(--xiyue-blue-600, #315df6);
  }
  body[data-active-screen="login"] :is(.teacher-student-calendar-grid > button, .teacher-student-calendar-card > header button):focus-visible {
    outline: 3px solid rgba(49, 93, 246, .22);
    outline-offset: 2px;
  }
  body[data-active-screen="login"] .teacher-student-day-card {
    box-sizing: border-box;
    min-height: 252px;
    max-height: 590px;
    background: #fff;
    padding: 0 24px 0 36px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd4e5 transparent;
  }
  body[data-active-screen="login"] .teacher-student-day-card > small {
    color: var(--xiyue-blue-600, #315df6);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
  }
  body[data-active-screen="login"] .teacher-student-day-card > h2 {
    margin: 7px 0 0;
    color: var(--xiyue-ink, #172033);
    font-size: 24px;
    font-weight: 880;
    line-height: 30px;
    letter-spacing: -.03em;
  }
  body[data-active-screen="login"] .teacher-student-day-original-date,
  body[data-active-screen="login"] .teacher-student-day-mobile-empty { display: none; }
  body[data-active-screen="login"] .teacher-student-day-card > h2 > .teacher-student-calendar-desktop-only { display: inline !important; }
  body[data-active-screen="login"] .teacher-student-day-year {
    display: block !important;
    margin: 5px 0 0;
    color: var(--xiyue-muted, #7d889f);
    font-size: 11px;
    line-height: 1.6;
  }
  body[data-active-screen="login"] .teacher-student-selected-summary {
    min-height: 70px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 20px 0 0;
    padding: 14px 0;
    border-top: 1px solid var(--xiyue-line, #e5eaf3);
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3);
  }
  body[data-active-screen="login"] .teacher-student-selected-summary > span {
    min-width: 0;
    min-height: 0;
    align-content: center;
    justify-items: center;
    gap: 3px;
    padding: 4px 8px;
    border: 0;
    border-left: 1px solid var(--xiyue-line, #e5eaf3);
    border-radius: 0;
    background: transparent;
  }
  body[data-active-screen="login"] .teacher-student-selected-summary > .teacher-student-day-record-count {
    display: grid !important;
    border-left: 0;
  }
  body[data-active-screen="login"] .teacher-student-selected-summary strong {
    color: var(--xiyue-ink, #172033);
    font-size: 20px;
    font-weight: 880;
  }
  body[data-active-screen="login"] .teacher-student-selected-summary small {
    color: var(--xiyue-muted, #7d889f);
    font-size: 9px;
    font-weight: 700;
    text-align: center;
  }
  body[data-active-screen="login"] .teacher-student-day-activities { gap: 0; }
  body[data-active-screen="login"] .teacher-student-day-activities article {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 16px 0;
    border-bottom: 1px solid var(--xiyue-line, #e5eaf3);
    border-radius: 0;
    background: transparent;
  }
  body[data-active-screen="login"] .teacher-student-day-activities header {
    min-height: 20px;
    gap: 12px;
  }
  body[data-active-screen="login"] .teacher-student-day-activities header strong {
    min-width: 0;
    color: var(--xiyue-ink, #172033);
    font-size: 12px;
    font-weight: 820;
  }
  body[data-active-screen="login"] .teacher-student-day-activities header span {
    flex: 0 0 auto;
    border-radius: 999px;
    color: var(--xiyue-blue-600, #315df6);
    font-size: 9px;
    font-weight: 780;
  }
  body[data-active-screen="login"] .teacher-student-day-activities p {
    margin: 0;
    color: var(--xiyue-muted, #7d889f);
    font-size: 10px;
    line-height: 1.6;
  }
  body[data-active-screen="login"] .teacher-student-day-empty {
    display: grid !important;
    min-height: 220px;
    place-content: center;
    justify-items: center;
    gap: 10px;
    color: #9aa4b6;
    text-align: center;
  }
  body[data-active-screen="login"] .teacher-student-day-empty span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--xiyue-blue-600, #315df6);
    border-radius: 8px;
    background: var(--xiyue-blue-050, #f4f7ff);
    font-size: 19px;
  }
  body[data-active-screen="login"] .teacher-student-day-empty p { margin: 0; font-size: 10px; line-height: 1.6; }
}
