/*
 * 方案 3：今日任务优先
 *
 * This is a release-layer draft only. It is intentionally scoped to .app-shell
 * and contains no business rules, selectors that hide product capabilities, or
 * replacement art. The existing theme variables stay in charge of the action
 * color so the user's theme setting continues to work.
 */

.app-shell {
  --o3-ink: var(--ui-text, #273238);
  --o3-muted: var(--ui-muted, #6d7a7d);
  --o3-soft: var(--ui-surface-soft, #f6f8f7);
  --o3-line: var(--ui-border, #e2e8e5);
  --o3-green: var(--ui-accent, #58c923);
  --o3-green-dark: var(--ui-accent-border, #42a51a);
  --o3-green-wash: color-mix(in srgb, var(--o3-green) 9%, #fff);
  --o3-radius: 16px;
  --o3-control: 48px;
  background: var(--ui-canvas, #fff);
  color: var(--o3-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.app-shell :where(*, *::before, *::after) { box-sizing: border-box; }
.app-shell :where(p, h1, h2, h3, h4, ul, ol) { letter-spacing: 0; }
.app-shell :where(p, small, span) { line-height: 1.55; }
.app-shell :where(button, input, select, textarea) { font: inherit; }

/* Shared surfaces and controls */
.app-shell .app-main,
.app-shell main[class*="view-"],
.app-shell main.page { background: var(--ui-surface, #fff); color: var(--o3-ink); }
.app-shell > .nav,
.app-shell .app-topbar,
.app-shell .learning-status-bar,
.app-shell .tab-bar { background: #fff; border-color: var(--o3-line); }
.app-shell .learning-status-bar { gap: 12px; padding-block: 10px; }
.app-shell .learning-status-bar > * { min-width: 0; }
.app-shell .learning-status-streak { color: #a14b26; }
.app-shell .learning-status-xp { color: #3f6970; }
.app-shell .learning-status-pill { font-weight: 700; }
.app-shell .language-control { margin-left: auto; }

.app-shell :where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--o3-green) 48%, #16707a);
  outline-offset: 3px;
}
.app-shell :where(button, a) { -webkit-tap-highlight-color: transparent; }
.app-shell button { transition: background-color .16s, border-color .16s, color .16s, transform .16s, box-shadow .16s; }
.app-shell :where(button.primary, button.sd-btn-primary, button.practice-start, button[class*="-cta"], .primary, .sd-btn-primary) {
  min-height: var(--o3-control);
  border: 1px solid var(--o3-green-dark);
  border-radius: 12px;
  background: var(--o3-green);
  color: var(--ui-on-accent, #173b00);
  box-shadow: 0 3px 0 var(--o3-green-dark);
  font-weight: 700;
}
.app-shell :where(button.primary, button.sd-btn-primary, button.practice-start, button[class*="-cta"], .primary, .sd-btn-primary):hover:not(:disabled) {
  background: color-mix(in srgb, var(--o3-green) 90%, #fff);
}
.app-shell :where(button.primary, button.sd-btn-primary, button.practice-start, button[class*="-cta"], .primary, .sd-btn-primary):active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--o3-green-dark);
}
.app-shell :where(button.primary, button.sd-btn-primary, button.practice-start, button[class*="-cta"], .primary, .sd-btn-primary):disabled {
  border-color: var(--o3-line);
  background: #edf0ef;
  color: #899391;
  box-shadow: 0 2px 0 var(--o3-line);
  opacity: 1;
}
.app-shell :where(button:not(.primary):not(.sd-btn-primary):not(.practice-start)):disabled { opacity: .62; }

.app-shell .nav-links button,
.app-shell .tab-bar button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--o3-muted);
  font-weight: 600;
}
.app-shell .nav-links button.active,
.app-shell .tab-bar button.active {
  border-color: color-mix(in srgb, var(--o3-green) 28%, #fff);
  background: color-mix(in srgb, var(--o3-green) 10%, #fff);
  color: color-mix(in srgb, var(--o3-green-dark) 72%, var(--o3-ink));
  box-shadow: none;
}
.app-shell .nav-links button.active svg,
.app-shell .tab-bar button.active svg { background: transparent; color: var(--o3-green-dark); }

.app-shell .app-main :where(.sd-panel, .set-card, .practice-action-card, .home-squad, .expedition-card) {
  border: 1px solid var(--o3-line);
  border-radius: var(--o3-radius);
  background: #fff;
  box-shadow: none;
}
.app-shell .app-main :where(.sd-panel, .set-card, .practice-action-card, .home-squad, .expedition-card) :where(h2, h3) {
  color: var(--o3-ink);
  letter-spacing: 0;
}

/* Homepage: keep DOM/focus order canonical. Do not use CSS order to put a
   later task above earlier controls; if the product wants tasks first, move
   the existing nodes in the render tree while preserving their handlers. */
.app-shell main.view-home.home-page {
  max-width: 1160px;
  padding-top: 16px;
  --home-gap: 18px;
  --home-card-padding: 20px;
}
.app-shell main.view-home.home-page .home-layout { display: flex; flex-direction: column; gap: var(--home-gap); }
.app-shell main.view-home.home-page .home-layout > * { order: initial; }
.app-shell main.view-home.home-page .home-page-greeting { padding: 0 2px 4px; }
.app-shell main.view-home.home-page .home-page-greeting b {
  display: block;
  color: var(--o3-ink);
  font-size: clamp(21px, 2.5vw, 28px);
  font-weight: 750;
  line-height: 1.35;
}
.app-shell main.view-home.home-page .home-page-greeting span { display: block; margin-top: 4px; color: var(--o3-muted); font-size: 14px; }

/* The conditional welcome stays available but becomes a short, calm row. */
.app-shell main.view-home.home-page .home-area-welcome > .p13-welcome-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--o3-line);
  border-radius: var(--o3-radius);
  background: var(--o3-soft);
  box-shadow: none;
}
.app-shell main.view-home.home-page .p13-welcome-card .p13-welcome-copy,
.app-shell main.view-home.home-page .p13-welcome-card .p13-welcome-text { min-width: 0; }
.app-shell main.view-home.home-page .p13-welcome-card .p13-welcome-text { color: var(--o3-muted); font-size: 13px; }
.app-shell main.view-home.home-page .p13-welcome-card .p13-welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.app-shell main.view-home.home-page .p13-welcome-card .p13-warmup-btn,
.app-shell main.view-home.home-page .p13-welcome-card .home-welcome-resume {
  min-height: 44px;
  border: 1px solid var(--o3-line);
  border-radius: 11px;
  background: #fff;
  color: var(--o3-ink);
  box-shadow: none;
  font-size: 13px;
  font-weight: 650;
}
.app-shell main.view-home.home-page .p13-welcome-card .sd-guide { margin: 0; border: 0; background: transparent; font-size: 13px; }

/* Compact practice hero: preserve the current piece and real start action,
   while letting the task block become the visual anchor below it. */
.app-shell main.view-home.home-page .home-layout > .sd-hero.home-practice-card.home-area-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(190px, .8fr);
  min-height: 236px;
  max-height: none;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--o3-green) 26%, var(--o3-line));
  border-radius: 20px;
  background: var(--o3-green-wash);
  box-shadow: none;
}
.app-shell main.view-home.home-page .home-practice-card > .sd-hero-copy { min-width: 0; padding: 22px; gap: 8px; }
.app-shell main.view-home.home-page .home-practice-card .sd-hero-date { color: var(--o3-muted); font-size: 12px; }
.app-shell main.view-home.home-page .home-practice-card .sd-hero-motto { color: var(--o3-ink); font-size: clamp(22px, 2.8vw, 31px); font-weight: 750; line-height: 1.24; }
.app-shell main.view-home.home-page .home-practice-card .home-hero-sub { color: var(--o3-muted); font-size: 14px; line-height: 1.55; }
.app-shell main.view-home.home-page .home-practice-card .hero-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.app-shell main.view-home.home-page .home-practice-card .hero-actions .primary { min-height: 50px; padding-inline: 20px; }
.app-shell main.view-home.home-page .home-practice-card .home-poster-shortcut { min-height: 44px; color: var(--o3-muted); }
.app-shell main.view-home.home-page .home-hero-art {
  min-width: 0;
  min-height: 0;
  margin: 12px 12px 12px 0;
  overflow: hidden;
  border: 1px solid var(--o3-line);
  border-radius: 14px;
  background: #efeafd;
}
.app-shell main.view-home.home-page .home-hero-art img { width: 100%; height: 100%; object-fit: contain; }

/* One task expression only. The duplicate lower three-step summary is left
   available by business code but made visually quiet when the selected screen
   has a task block above it. */
.app-shell main.view-home.home-page .home-area-steps > .p13-steps-card {
  padding: 18px;
  border: 1px solid var(--o3-line);
  border-radius: var(--o3-radius);
  background: #fff;
  box-shadow: none;
}
.app-shell main.view-home.home-page .home-area-steps .section-kicker { margin: 0; color: var(--o3-ink); font-size: 18px; font-weight: 750; }
.app-shell main.view-home.home-page .home-area-steps .p13-steps-list { display: flex; flex-direction: column; gap: 0; margin: 10px 0 0; padding: 0; }
.app-shell main.view-home.home-page .home-area-steps .p13-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--o3-line);
  border-radius: 0;
  background: transparent;
}
.app-shell main.view-home.home-page .home-area-steps .p13-step:last-child { border-bottom: 0; }
.app-shell main.view-home.home-page .home-area-steps .p13-step:nth-child(2) { margin-left: 0; }
.app-shell main.view-home.home-page .home-area-steps .p13-step-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #edf0ef;
  color: var(--o3-muted);
  box-shadow: none;
  font-size: 15px;
  font-weight: 750;
}
.app-shell main.view-home.home-page .home-area-steps .p13-step-mark:not(.is-done)::before { content: counter(daily-step); }
.app-shell main.view-home.home-page .home-area-steps .p13-step-mark.is-done,
.app-shell main.view-home.home-page .home-area-steps .p13-step:first-child .p13-step-mark:not(.is-done) {
  background: var(--o3-green);
  color: var(--ui-on-accent, #173b00);
}
.app-shell main.view-home.home-page .home-area-steps .p13-step-text { min-width: 0; color: var(--o3-ink); font-size: 15px; }
.app-shell main.view-home.home-page .home-area-steps .p13-step-text small { display: block; margin-top: 2px; color: var(--o3-muted); font-size: 12px; }
.app-shell main.view-home.home-page .home-area-steps .p13-step-action { min-width: 44px; min-height: 44px; border: 1px solid var(--o3-line); border-radius: 11px; background: #fff; color: color-mix(in srgb, var(--o3-green-dark) 82%, var(--o3-ink)); box-shadow: none; font-weight: 650; }
.app-shell main.view-home.home-page .home-area-steps .p13-step-action:hover:not(:disabled) { border-color: var(--o3-green); background: var(--o3-green-wash); }

.app-shell main.view-home.home-page :where(.home-area-piece, .home-area-goal, .home-area-server-stats, .home-area-streak, .home-area-week, .home-area-entries, .home-area-squad, .home-area-dialogue) { min-width: 0; }
.app-shell main.view-home.home-page :where(.home-area-piece, .home-area-goal, .home-area-server-stats, .home-area-streak, .home-area-week) > * { border-color: var(--o3-line); box-shadow: none; }
.app-shell main.view-home.home-page .home-entry { min-height: 64px; border: 1px solid var(--o3-line); border-radius: 13px; background: #fff; box-shadow: none; }
.app-shell main.view-home.home-page .home-entry:hover:not(:disabled) { border-color: var(--o3-green); background: var(--o3-green-wash); transform: none; }
.app-shell main.view-home.home-page .home-squad-char { border-color: var(--o3-line); border-radius: 13px; background: var(--o3-soft); box-shadow: none; }

/* Practice: timer and sheet remain the action hierarchy. */
.app-shell main.view-practice.page,
.app-shell main.practice-page { padding-top: 16px; }
.app-shell main.view-practice.page .practice-hero,
.app-shell main.view-practice.page .practice-hero-art,
.app-shell main.view-practice.page .practice-cheer { border-radius: var(--o3-radius); box-shadow: none; }
.app-shell main.view-practice.page .practice-now-card { border: 1px solid var(--o3-line); border-radius: var(--o3-radius); background: #fff; box-shadow: none; }
.app-shell main.view-practice.page .practice-now-head { padding: 18px 20px 10px; }
.app-shell main.view-practice.page .practice-now-heading { color: var(--o3-ink); font-size: 21px; font-weight: 750; }
.app-shell main.view-practice.page .practice-now-tools { gap: 8px; }
.app-shell main.view-practice.page .practice-now-tools > button,
.app-shell main.view-practice.page .practice-change-btn { min-height: 44px; border: 1px solid var(--o3-line); border-radius: 11px; background: #fff; color: var(--o3-ink); box-shadow: none; }
.app-shell main.view-practice.page .practice-timer-card { border: 1px solid color-mix(in srgb, var(--o3-green) 28%, var(--o3-line)); border-radius: var(--o3-radius); background: var(--o3-green-wash); box-shadow: none; }
.app-shell main.view-practice.page .practice-timer-card :where(.practice-timer-toggle, .practice-timer-stop, .practice-timer-reset) { min-height: 44px; }
.app-shell main.view-practice.page .practice-timer-toggle .practice-ctl-circle { width: 56px; height: 56px; background: var(--o3-green); color: var(--ui-on-accent, #173b00); box-shadow: 0 3px 0 var(--o3-green-dark); }
.app-shell main.view-practice.page .practice-timer-toggle .practice-ctl-label { color: var(--o3-ink); }
.app-shell main.view-practice.page :where(.practice-timer-stop, .practice-timer-reset) { border: 1px solid var(--o3-line); border-radius: 11px; background: #fff; color: var(--o3-muted); box-shadow: none; }
.app-shell main.view-practice.page :where(.practice-timer-stop, .practice-timer-reset):disabled { color: #9aa4a0; }
.app-shell main.view-practice.page .practice-action-card { min-height: 74px; border: 1px solid var(--o3-line); border-radius: 13px; box-shadow: none; }
.app-shell main.view-practice.page .practice-action-card :where(.practice-action-icon, svg) { color: var(--o3-green-dark); }
.app-shell main.view-practice.page .practice-library { border-top: 1px solid var(--o3-line); }

/* Skills: the original skill map/image is untouched; surrounding chrome is
   simplified so the illustration carries the page. */
.app-shell main.view-skills.skills-page { padding-top: 16px; }
.app-shell main.view-skills.skills-page :where(.sd-panel, .skills-entry, .skills-video-entry, .sk-practice-zone) { border-color: var(--o3-line); border-radius: var(--o3-radius); box-shadow: none; }
.app-shell main.view-skills.skills-page .current-skill-nodes { gap: 12px; }
.app-shell main.view-skills.skills-page .sd-skill-node { min-height: 76px; border: 1px solid var(--o3-line); border-radius: 13px; background: #fff; box-shadow: none; }
.app-shell main.view-skills.skills-page .sd-skill-node.is-current { border-color: var(--o3-green); background: var(--o3-green-wash); }
.app-shell main.view-skills.skills-page .sd-skill-node.is-lit { border-color: color-mix(in srgb, var(--o3-green) 34%, var(--o3-line)); }
.app-shell main.view-skills.skills-page .skills-video-entry { background: var(--o3-green); background-image: none; color: var(--ui-on-accent, #173b00); }
.app-shell main.view-skills.skills-page .skills-video-entry .primary { border-color: #fff; background: #fff; color: var(--o3-green-dark); box-shadow: none; }

/* Rewards: keep character stage and all controls, reduce the stage's first
   screen dominance and bring real progress entries closer. */
.app-shell main.view-growth.page.growth-page { padding-top: 16px; }
.app-shell main.view-growth.page.growth-page :where(.avatar-stage-panel, .sd-power-panel, .growth-daily-card, .growth-adventure-pair, .reward-entry-grid) { border-color: var(--o3-line); border-radius: var(--o3-radius); box-shadow: none; }
.app-shell main.view-growth.page.growth-page .avatar-stage-panel { padding: 12px; }
.app-shell main.view-growth.page.growth-page .gw-stage-scene,
.app-shell main.view-growth.page.growth-page .growth-stage-full-scene { min-height: 210px; max-height: 300px; border-radius: 13px; }
.app-shell main.view-growth.page.growth-page .growth-daily-card { padding: 16px; background: var(--o3-green-wash); }
.app-shell main.view-growth.page.growth-page .reward-entry-grid { gap: 10px; }
.app-shell main.view-growth.page.growth-page .reward-entry-grid > * { min-height: 72px; border: 1px solid var(--o3-line); border-radius: 13px; background: #fff; box-shadow: none; }

/* Settings: flat destination rows; disclosure contents and theme inputs remain
   real controls and keep their current values/handlers. */
.app-shell main.view-settings { padding-top: 16px; }
.app-shell main.view-settings .sd-panel.set-card { padding: 18px; border: 1px solid var(--o3-line); border-radius: var(--o3-radius); background: #fff; box-shadow: none; }
.app-shell main.view-settings :where(.set-card-poster, .set-card-collection) { padding: 14px 16px; }
.app-shell main.view-settings :where(.set-card-poster .set-entry-row, .set-card-collection .set-entry-row, .set-entry-row) { min-height: 64px; border: 0; border-bottom: 1px solid var(--o3-line); border-radius: 0; background: transparent; box-shadow: none; }
.app-shell main.view-settings .set-entry-row:last-child { border-bottom: 0; }
.app-shell main.view-settings .set-enter-btn { min-width: 44px; min-height: 44px; margin-left: auto; border: 0; border-radius: 11px; background: var(--o3-green-wash); color: var(--o3-green-dark); }
.app-shell main.view-settings .set-card-head { margin-bottom: 12px; }
.app-shell main.view-settings .set-card-titles h2 { color: var(--o3-ink); font-size: 17px; font-weight: 700; letter-spacing: 0; }
.app-shell main.view-settings .set-card-titles p,
.app-shell main.view-settings .set-card-note { color: var(--o3-muted); }
.app-shell main.view-settings :where(.set-account-action, .sd-btn, .set-theme-preview-toggle) { min-height: 44px; border-radius: 11px; box-shadow: none; }
.app-shell main.view-settings .set-account-action { border-color: var(--o3-line); background: #fff; color: var(--o3-ink); }
.app-shell main.view-settings .set-account-action[aria-expanded="true"] { border-color: var(--o3-green); background: var(--o3-green-wash); color: var(--o3-green-dark); }
.app-shell main.view-settings :where(input, textarea, select) { border-color: var(--o3-line); border-radius: 11px; background: #fff; color: var(--o3-ink); }
.app-shell main.view-settings .set-sync-panel { border-color: color-mix(in srgb, var(--o3-green) 28%, var(--o3-line)); background: var(--o3-green-wash); box-shadow: none; }

@media (max-width: 767px) {
  .app-shell .learning-status-bar { gap: 8px; padding-inline: 12px; }
  .app-shell main.view-home.home-page { padding: 12px 14px calc(80px + env(safe-area-inset-bottom, 0px)); }
  .app-shell main.view-home.home-page .home-page-greeting { padding-bottom: 0; }
  .app-shell main.view-home.home-page .home-layout > .sd-hero.home-practice-card.home-area-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .app-shell main.view-home.home-page .home-practice-card > .sd-hero-copy { padding: 18px; }
  .app-shell main.view-home.home-page .home-practice-card .sd-hero-motto { font-size: 24px; }
  .app-shell main.view-home.home-page .home-hero-art { min-height: 112px; max-height: 150px; margin: 0 12px 12px; }
  .app-shell main.view-home.home-page .home-area-welcome > .p13-welcome-card { grid-template-columns: minmax(0, 1fr); }
  .app-shell main.view-home.home-page .p13-welcome-card .p13-welcome-actions { justify-content: flex-start; }
  .app-shell main.view-home.home-page .home-area-steps > .p13-steps-card { padding: 14px; }
  .app-shell main.view-home.home-page .home-area-steps .p13-step { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .app-shell main.view-home.home-page .home-area-steps .p13-step-action { grid-column: 2; justify-self: start; }
  .app-shell main.view-practice.page,
  .app-shell main.view-skills.skills-page,
  .app-shell main.view-growth.page.growth-page,
  .app-shell main.view-settings { padding: 12px 14px calc(80px + env(safe-area-inset-bottom, 0px)); }
  .app-shell main.view-growth.page.growth-page .gw-stage-scene,
  .app-shell main.view-growth.page.growth-page .growth-stage-full-scene { min-height: 170px; max-height: 220px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .app-shell .learning-status-bar { min-height: 44px; padding-block: 0; }
  .app-shell main.view-home.home-page .home-layout > .sd-hero.home-practice-card.home-area-hero { grid-template-columns: minmax(0, 1.2fr) minmax(190px, .8fr); }
  .app-shell main.view-home.home-page .home-hero-art { max-height: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell button { transition: none; }
}

/* Final scheme 3: canonical render order is tasks, companion banner, actions. */
.app-shell { --o3-ink: var(--ui-text, #273238); --o3-muted: var(--ui-muted, #6d7a7d); --o3-soft: var(--surface-soft, #f6f8f7); --o3-line: var(--ui-border, #e2e8e5); }
.app-shell main.view-home.home-page > .home-page-greeting { display:grid; margin-bottom:18px; padding:0; }
.app-shell main.view-home.home-page .home-layout > * { order:initial; }
.app-shell main.view-home.home-page .home-layout > .home-area-steps { order:initial; border:1px solid var(--o3-line); border-radius:18px; padding:18px; background:var(--ui-surface,#fff); }
.app-shell main.view-home.home-page .home-area-steps > .home-quest-rail { display:flex; align-items:center; gap:12px; margin:0 0 10px; padding:0; border:0; background:transparent; box-shadow:none; }
.app-shell main.view-home.home-page .home-area-steps .home-quest-label { font-size:20px; font-weight:750; color:var(--o3-ink); }
.app-shell main.view-home.home-page .home-area-steps .home-quest-track { flex:1; display:flex; gap:5px; height:9px; }
.app-shell main.view-home.home-page .home-area-steps .home-quest-track > i { flex:1; width:auto; height:9px; border:0; border-radius:6px; background:var(--o3-line); }
.app-shell main.view-home.home-page .home-area-steps .home-quest-track > i.is-done { background:var(--o3-green); }
.app-shell main.view-home.home-page .home-area-steps > .p13-steps-card { padding:0; border:0; border-radius:0; background:transparent; gap:0; display:block; }
/* Same semantic heading is already exposed by the progress rail immediately above. */
.app-shell main.view-home.home-page .home-area-steps .p13-steps-card > .section-kicker { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.app-shell main.view-home.home-page .home-area-steps .p13-steps-list { counter-reset:daily-step; margin:0; }
.app-shell main.view-home.home-page .home-area-steps .p13-step { counter-increment:daily-step; grid-template-columns:36px minmax(0,1fr) auto; min-height:72px; gap:12px; }
.app-shell main.view-home.home-page .home-area-steps .p13-step::after { content:none; }
.app-shell main.view-home.home-page .home-area-steps .p13-step-mark { width:34px; height:34px; }
.app-shell main.view-home.home-page .home-area-steps .p13-step-mark:not(.is-done)::before { width:auto; height:auto; background:transparent; box-shadow:none; }
.app-shell main.view-home.home-page .home-layout > .sd-hero.home-practice-card.home-area-hero { display:grid; grid-template:minmax(130px,auto) auto / minmax(0,1fr) minmax(200px,.65fr); height:auto; min-height:0; max-height:none; border:0; border-radius:16px; overflow:visible; background:var(--o3-green-wash); gap:0; padding:0; }
.app-shell main.view-home.home-page .home-layout .home-practice-card > .sd-hero-copy { padding:20px; min-height:130px; justify-content:center; }
.app-shell main.view-home.home-page .home-practice-card .sd-hero-date { margin:0; font-size:12px; }
.app-shell main.view-home.home-page .home-practice-card .sd-hero-motto { font-size:23px; line-height:1.35; letter-spacing:0; }
.app-shell main.view-home.home-page .home-practice-card .home-hero-sub { display:block; margin:0; font-size:13px; line-height:1.5; }
.app-shell main.view-home.home-page .home-practice-card > .home-hero-art { grid-area:1 / 2; min-height:130px; height:100%; max-height:180px; margin:0; border:0; border-radius:0 16px 16px 0; }
.app-shell main.view-home.home-page .home-practice-card > .hero-actions { grid-column:1 / -1; display:flex; gap:10px; flex-wrap:wrap; padding:14px 0 0; margin:0; background:var(--ui-canvas,#fff); }
.app-shell main.view-home.home-page .home-practice-card > .hero-actions > .primary { flex:1; min-height:50px; font-size:16px; }
.app-shell main.view-home.home-page .home-practice-card > .hero-actions > .home-poster-shortcut { min-height:48px; padding:10px 16px; border:1px solid var(--o3-line); border-radius:12px; background:var(--ui-surface,#fff); }
.app-shell main.view-home.home-page .home-layout > .home-actions-pair { grid-template-columns:minmax(0,1fr); }
.app-shell main.view-home.home-page .home-area-welcome > .p13-welcome-card { display:grid; grid-template-columns:minmax(0,1fr); padding:16px; }
.app-shell main.view-home.home-page .p13-welcome-card .p13-welcome-actions { justify-content:flex-start; }
.app-shell main.view-home.home-page .home-area-steps .p13-step-action { margin:0; }
.app-shell main.view-home.home-page :where(.section-kicker,.sd-hero-motto,.p13-step-text) { letter-spacing:0; }
@media(max-width:767px) {
 .app-shell main.view-home.home-page { --home-gap:14px; }
 .app-shell main.view-home.home-page > .home-page-greeting { margin-bottom:16px; }
 .app-shell main.view-home.home-page .home-layout > .home-area-steps { padding:14px; }
 .app-shell main.view-home.home-page .home-area-steps .p13-step { grid-template-columns:32px minmax(0,1fr) auto; gap:8px; min-height:70px; }
 .app-shell main.view-home.home-page .home-area-steps .p13-step-mark { width:30px; height:30px; }
 .app-shell main.view-home.home-page .home-area-steps .p13-step-action { grid-column:auto; justify-self:auto; padding-inline:9px; font-size:13px; }
 .app-shell main.view-home.home-page .home-area-steps .p13-step-text { font-size:14px; }
 .app-shell main.view-home.home-page .home-area-steps .p13-step-text small { font-size:11px; }
 .app-shell main.view-home.home-page .home-layout > .sd-hero.home-practice-card.home-area-hero { grid-template:minmax(118px,auto) auto / minmax(0,1fr) 124px; height:auto; min-height:0; max-height:none; }
 .app-shell main.view-home.home-page .home-layout .home-practice-card > .sd-hero-copy { padding:14px; min-height:118px; gap:4px; }
 .app-shell main.view-home.home-page .home-practice-card .sd-hero-date { font-size:10px; }
 .app-shell main.view-home.home-page .home-practice-card .sd-hero-motto { font-size:17px; }
 .app-shell main.view-home.home-page .home-practice-card .home-hero-sub { font-size:11px; }
 .app-shell main.view-home.home-page .home-practice-card > .home-hero-art { min-height:118px; max-height:150px; }
 .app-shell main.view-home.home-page .home-practice-card > .hero-actions { flex-direction:column; padding-top:12px; }
 .app-shell main.view-home.home-page .home-practice-card > .hero-actions > .primary { flex:auto; width:100%; }
 .app-shell main.view-home.home-page .home-practice-card > .hero-actions > .home-poster-shortcut { width:100%; }
}

/* Preserve completion feedback while removing the repeated checklist heading. */
.app-shell main.view-home.home-page .home-area-steps .p13-steps-card > .section-kicker:has(.p13-steps-done-chip) { position:static; width:auto; height:auto; overflow:visible; clip-path:none; margin:6px 0; }
.app-shell main.view-home.home-page .home-area-steps .p13-steps-card > .section-kicker:has(.p13-steps-done-chip) > :not(.p13-steps-done-chip) { display:none; }
.app-shell main.view-home.home-page .home-area-steps .home-quest-track { max-width:none; }
.app-shell main.view-home.home-page .home-area-steps .home-quest-track > i { background:var(--o3-line); box-shadow:none; transform:none; }
.app-shell main.view-home.home-page .home-area-steps .home-quest-track > i.is-done { background:var(--o3-green); }

.app-shell main.view-home.home-page .home-area-steps > .home-quest-rail { width:100%; max-width:none; }
@media(min-width:1280px) { .app-shell main.view-home.home-page > .home-page-greeting { display:none; } }
/* Landscape Pad uses two reading columns, with tasks before the companion. */
@media (min-width:900px) and (orientation:landscape) {
 .app-shell main.view-home.home-page { max-width:1320px; }
 .app-shell main.view-home.home-page .home-layout { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:18px; align-items:start; }
 .app-shell main.view-home.home-page .home-layout > * { grid-column:1 / -1; }
 .app-shell main.view-home.home-page .home-layout > .home-area-steps { grid-column:1; grid-row:1; min-height:296px; }
 .app-shell main.view-home.home-page .home-layout > .sd-hero.home-practice-card.home-area-hero { grid-column:2; grid-row:1; grid-template:minmax(220px,auto) auto / minmax(0,1fr) minmax(120px,.75fr); align-self:start; }
 .app-shell main.view-home.home-page .home-layout .home-practice-card > .sd-hero-copy { padding:18px; min-height:220px; }
 .app-shell main.view-home.home-page .home-practice-card > .home-hero-art { min-height:220px; max-height:none; }
 .app-shell main.view-home.home-page .home-practice-card .sd-hero-motto { font-size:20px; }
 .app-shell main.view-home.home-page .home-practice-card > .hero-actions { flex-direction:column; }
 .app-shell main.view-home.home-page .home-practice-card > .hero-actions > .primary { flex:auto; width:100%; }
 .app-shell main.view-home.home-page .home-practice-card > .hero-actions > .home-poster-shortcut { width:100%; }
 .app-shell main.view-home.home-page .home-layout > .home-card-pair:not(.home-actions-pair),
 .app-shell main.view-home.home-page .home-layout > .home-entries { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Theme harmony: role-derived accents stay on the existing account tokens. */
.app-shell { --o3-green: var(--ui-accent, #58cc02); --o3-green-dark: var(--ui-accent-border, #337502); --o3-green-wash: var(--ui-accent-soft, #eefae6); }
.app-shell .home-hero-art { border-color: var(--ui-accent-border, var(--o3-line)); }
.app-shell .home-squad-char img, .app-shell .avatar-stage-panel img { filter:none; }

/* Compact existing content without hiding controls, guides, or character art. */
.app-shell main.view-home.home-page .home-area-welcome > .p13-welcome-card {
 gap:10px; align-items:start; background:var(--o3-soft); padding:16px;
}
.app-shell main.view-home.home-page .p13-welcome-card .p13-welcome-actions { gap:8px; }
.app-shell main.view-home.home-page .p13-welcome-card .sd-guide {
 display:flex; align-items:center; gap:10px; padding:8px 0 0; min-height:0;
}
.app-shell main.view-home.home-page .p13-welcome-card .sd-guide-avatar { width:36px; height:36px; flex:0 0 36px; }
.app-shell main.view-home.home-page .p13-welcome-card .sd-guide-text { font-size:12px; line-height:1.55; }
.app-shell main.view-home.home-page .home-card-pair > *,
.app-shell main.view-home.home-page .home-card-pair > * > :is(.p13-streak-panel,.chest-entry) { min-height:0; }
.app-shell main.view-home.home-page .home-area-steps { align-self:stretch; }
@media(min-width:900px) and (orientation:landscape) {
 .app-shell main.view-home.home-page .home-layout > .home-area-steps { min-height:0; }
 .app-shell main.view-home.home-page .home-layout > .sd-hero.home-practice-card.home-area-hero { grid-template:minmax(180px,auto) auto / minmax(0,1fr) minmax(120px,.75fr); }
 .app-shell main.view-home.home-page .home-layout .home-practice-card > .sd-hero-copy { min-height:180px; padding:16px; }
 .app-shell main.view-home.home-page .home-practice-card > .home-hero-art { min-height:180px; }
 .app-shell main.view-home.home-page .home-practice-card > .hero-actions { gap:8px; padding-top:12px; }
 .app-shell main.view-home.home-page .home-area-welcome > .p13-welcome-card { grid-template-columns:minmax(0,1fr) auto; gap:10px 18px; }
 .app-shell main.view-home.home-page .p13-welcome-card .p13-welcome-actions { max-width:420px; align-self:center; }
 .app-shell main.view-home.home-page .p13-welcome-card .sd-guide { grid-column:1 / -1; }
}

.app-shell .app-topbar {
  height: auto;
  min-height: 76px;
  box-sizing: border-box;
  padding: 12px 32px;
}

.app-shell .app-topbar-greeting {
  padding: 0;
  overflow-wrap: anywhere;
}

.app-shell main.view-home.home-page .home-layout > .sd-hero.home-practice-card.home-area-hero {
  box-sizing: border-box;
  padding: 16px;
  gap: 12px;
}

.app-shell main.view-home.home-page .home-layout .home-practice-card > .sd-hero-copy {
  min-width: 0;
  padding: 0;
  overflow-wrap: anywhere;
}

.app-shell main.view-home.home-page .home-practice-card > .home-hero-art {
  min-width: 0;
  margin: 0;
  border-radius: var(--ui-radius-card);
}

.app-shell main.view-home.home-page .home-practice-card > .hero-actions {
  min-width: 0;
  padding: 0;
  background: transparent;
}

.app-shell main.view-home.home-page .home-practice-card > .hero-actions > .primary {
  min-height: 50px;
  white-space: normal;
}

.app-shell main.view-home.home-page .home-practice-card > .hero-actions > .home-poster-shortcut {
  min-height: 44px;
  white-space: normal;
}

.app-shell main.view-home.home-page .home-area-welcome > .p13-welcome-card {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  height: auto;
  min-height: 0;
  align-self: start;
  gap: 10px;
}

.app-shell main.view-home.home-page .p13-welcome-card > :is(.p13-welcome-copy, .p13-welcome-actions, .sd-guide) {
  grid-column: 1 / -1;
  grid-row: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
}

.app-shell main.view-home.home-page .p13-welcome-card .p13-welcome-actions {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  align-self: start;
  justify-content: flex-start;
  width: 100%;
  max-width: none;
  gap: 8px;
}

.app-shell main.view-home.home-page .p13-welcome-actions > :is(button, .p13-warmup-timer) {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.app-shell main.view-practice.page .practice-now-head {
  padding: 0 0 10px;
}

.app-shell main.view-settings.page .set-card-account:not([aria-labelledby="sd-set-account"]) {
  height: auto;
  min-height: 0;
  padding: 16px;
}

.app-shell main.view-settings.page .set-card-account:not([aria-labelledby="sd-set-account"]) > .set-account-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 12px;
}

.app-shell main.view-settings.page .set-card-account:not([aria-labelledby="sd-set-account"]) .set-account-actions {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  height: auto;
  min-width: 0;
  margin: 0;
}

.app-shell main.view-settings.page .set-card-account:not([aria-labelledby="sd-set-account"]) .set-account-actions > button {
  min-height: 44px;
}

.app-shell main.pbw .pbw-workspace {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.app-shell main.pbw .pbw-workspace > :is(.pbw-cards, .pbw-rail, .pbw-actions-zone, .pbw-tools-toggle) {
  height: auto;
  min-width: 0;
  align-self: start;
}

.app-shell main.pbw .pbw-workspace > .pbw-tools-toggle {
  display: flex;
  grid-row: 1;
  min-height: 44px;
}

.app-shell main.pbw .pbw-workspace > .pbw-rail {
  grid-row: 2;
}

.app-shell main.pbw .pbw-workspace > .pbw-rail.is-collapsed {
  display: none;
}

.app-shell main.pbw .pbw-workspace > .pbw-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.app-shell main.pbw .pbw-cards > .pbw-card {
  height: auto;
}

.app-shell main.pbw .pbw-card-head {
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px;
}

.app-shell main.pbw :is(.pbw-card-label, .pbw-btn, .pbw-field, .pbw-text-body) {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.app-shell main.view-growth.page.growth-page .avatar-stage-panel .gw-stage-summary {
  height: auto;
  min-width: 0;
  justify-content: center;
  gap: 12px;
  overflow-wrap: anywhere;
}

.app-shell main.view-growth.page.growth-page .avatar-stage-panel .avatar-stage-footer {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 8px;
}

.app-shell main.view-growth.page.growth-page .avatar-stage-panel .avatar-stage-footer button {
  flex: 1 1 132px;
  min-width: 0;
  min-height: 44px;
  white-space: normal;
}

@media (min-width: 768px) {
  .app-shell main.view-settings.page .set-card-account:not([aria-labelledby="sd-set-account"]) > .set-account-head {
    grid-template-columns: auto minmax(0, 1fr) minmax(0, auto);
  }

  .app-shell main.view-settings.page .set-card-account:not([aria-labelledby="sd-set-account"]) .set-account-actions {
    grid-column: 3;
    width: auto;
    max-width: 20rem;
  }

  .app-shell main.view-growth.page.growth-page .avatar-stage-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
    align-items: center;
    gap: 16px;
  }

  .app-shell main.view-growth.page.growth-page .avatar-stage-panel .gw-stage-customizer {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .app-shell main.pbw .pbw-workspace {
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: 16px;
  }

  .app-shell main.pbw .pbw-workspace > .pbw-cards {
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .app-shell main.pbw .pbw-workspace > .pbw-tools-toggle {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .app-shell main.pbw .pbw-workspace > .pbw-rail {
    grid-column: 2;
    grid-row: 2;
    position: sticky;
    top: calc(var(--topbar-h, 76px) + var(--duo-shell-statusbar-h, 54px) + 8px);
    max-height: calc(100dvh - var(--topbar-h, 76px) - var(--duo-shell-statusbar-h, 54px) - 24px);
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  .app-shell main.pbw .pbw-workspace > .pbw-actions-zone {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (min-width: 1200px) {
  .app-shell main.page .txchars-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-shell main.page .txchars-grid > .txchars-card:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (min-width: 1280px) {
  .app-shell {
    --topbar-h: 76px;
  }
}

@media (max-width: 1279px) {
  .app-shell .app-topbar {
    min-height: 0;
    padding: 12px 16px;
  }

  .app-shell main.pbw .pbw-workspace > .pbw-rail {
    top: calc(var(--duo-shell-statusbar-h, 54px) + 8px);
    max-height: calc(100dvh - var(--duo-shell-statusbar-h, 54px) - 24px);
  }
}

@media (max-width: 767px) {
  .app-shell main.page .txchars-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell main.view-home.home-page .home-layout > .sd-hero.home-practice-card.home-area-hero {
    padding: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 124px);
  }

  .app-shell main.view-practice.page .practice-timer-actions .practice-timer-toggle {
    box-sizing: border-box;
    height: 56px;
    min-height: 56px;
    padding: 8px 12px;
    flex-direction: row;
    gap: 8px;
  }

  .app-shell main.view-practice.page .practice-timer-toggle .practice-ctl-circle {
    width: 22px;
    height: 22px;
    min-height: 0;
    flex: 0 0 22px;
  }

  .app-shell main.view-practice.page .practice-timer-toggle .practice-ctl-label,
  .app-shell main.view-practice.page .practice-timer-toggle.is-running .practice-ctl-label,
  .app-shell main.view-practice.page .practice-timer-toggle .practice-ctl-circle,
  .app-shell main.view-practice.page .practice-timer-toggle.is-running .practice-ctl-circle {
    color: var(--ui-on-accent);
  }

  .app-shell main.view-practice.page .practice-timer-actions :is(.practice-timer-stop, .practice-timer-reset) {
    box-sizing: border-box;
    min-height: 44px;
    height: auto;
    padding: 8px;
    flex-direction: row;
    gap: 6px;
    background: var(--ui-surface) !important;
    color: var(--ui-muted);
    border-color: var(--ui-border);
    box-shadow: none !important;
  }

  .app-shell main.view-practice.page :is(.practice-timer-stop, .practice-timer-reset) .practice-ctl-circle {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit;
  }

  .app-shell main.view-practice.page :is(.practice-timer-stop, .practice-timer-reset) .practice-ctl-label {
    color: inherit;
  }

  .app-shell main.view-practice.page .practice-timer-actions :is(.practice-timer-stop, .practice-timer-reset):disabled {
    color: var(--ui-muted);
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .app-shell main.pbw .pbw-workspace > .pbw-rail {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* Follow-up fixes from the 320px and teacher role preview. */
@media (max-width: 360px) {
 .app-shell main.view-home.home-page .home-layout > .sd-hero.home-practice-card.home-area-hero {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr);
 }
 .app-shell main.view-home.home-page .home-practice-card > .sd-hero-copy {
  text-align: left;
 }
 .app-shell main.view-home.home-page .home-practice-card > .sd-hero-copy h1 {
  font-size: 17px;
  line-height: 1.45;
 }
}
.page.teacher-page .tch-main > .teacher-topbar {
 height: auto;
 min-height: 76px;
 border: 0;
 border-bottom: 1px solid var(--tch-line, #e5e7eb);
 border-radius: 0;
 background: var(--ui-surface, #fff);
 padding: 12px 24px;
 gap: 12px;
 box-shadow: none;
 overflow: visible;
}
.page.teacher-page .teacher-topbar .tch-topbar-heading {
 min-width: 0;
 background: transparent;
}
@media (max-width: 767px) {
 .page.teacher-page .tch-main > .teacher-topbar {
  padding: 12px;
  gap: 8px;
 }
}

/* Actual MiniMax brand asset; keep the existing logo slot and handlers. */
.brand-mark.brand-mark.brand-mark.brand-mark.brand-mark.brand-mark,
.login-brand-mark.login-brand-mark.login-brand-mark.login-brand-mark.login-brand-mark.login-brand-mark,
.ob-brand-mark.ob-brand-mark.ob-brand-mark.ob-brand-mark.ob-brand-mark.ob-brand-mark,
.admin-shell-brand-icon.admin-shell-brand-icon.admin-shell-brand-icon.admin-shell-brand-icon.admin-shell-brand-icon.admin-shell-brand-icon,
.tch-brand-mark.tch-brand-mark.tch-brand-mark.tch-brand-mark.tch-brand-mark.tch-brand-mark,
.tch-topbar-mark.tch-topbar-mark.tch-topbar-mark.tch-topbar-mark.tch-topbar-mark.tch-topbar-mark {
  background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible;
}
.brand-mark.brand-mark.brand-mark.brand-mark.brand-mark.brand-mark > img,
.login-brand-mark.login-brand-mark.login-brand-mark.login-brand-mark.login-brand-mark.login-brand-mark > img,
.ob-brand-mark.ob-brand-mark.ob-brand-mark.ob-brand-mark.ob-brand-mark.ob-brand-mark > img,
.admin-shell-brand-icon.admin-shell-brand-icon.admin-shell-brand-icon.admin-shell-brand-icon.admin-shell-brand-icon.admin-shell-brand-icon > img,
.tch-brand-mark.tch-brand-mark.tch-brand-mark.tch-brand-mark.tch-brand-mark.tch-brand-mark > img,
.tch-topbar-mark.tch-topbar-mark.tch-topbar-mark.tch-topbar-mark.tch-topbar-mark.tch-topbar-mark > img {
  display: block; width: 100%; height: 100%; object-fit: contain;
}

/* Final screen UI layer. Append after main/card/admin styles.
 * ponytail: reuse existing tokens and selectors; no second component system.
 * Capture the account palette at the root without changing it, then keep that
 * palette on character scenes. UI controls use a stable brand palette.
 */
@media screen {
  :root {
    --lj-role-accent: var(--ui-accent, #58cc02);
    --lj-role-accent-strong: var(--ui-accent-strong, #58a700);
    --lj-role-accent-border: var(--ui-accent-border, #58a700);
    --lj-role-accent-soft: var(--ui-accent-soft, #f0fbe6);
    --lj-role-on-accent: var(--ui-on-accent, #ffffff);
    --lj-role-secondary: var(--ui-secondary, #1cb0f6);
    --lj-role-secondary-soft: var(--ui-secondary-soft, #ddf4ff);
    --lj-role-canvas: var(--ui-canvas, #ffffff);
    --lj-role-surface: var(--ui-surface, #ffffff);
    --lj-role-soft: var(--surface-soft, #f7f7f7);
    --lj-role-text: var(--ui-text, #4b4b4b);
    --lj-role-muted: var(--ui-muted, #777777);
    --lj-role-border: var(--ui-border, #e5e5e5);
    --lj-role-primary: var(--primary, #58a700);
    --lj-role-primary-hover: var(--primary-hover, #58a700);
    --lj-role-reward: var(--reward, #ae6802);
    --lj-green: #58cc02;
    --lj-green-edge: #58a700;
    --lj-green-soft: #f0fbe6;
    --lj-blue: #1cb0f6;
    --lj-blue-edge: #048fd1;
    --lj-blue-ink: #1899d6;
    --lj-blue-soft: #ddf4ff;
    --lj-line: #e5e5e5;
    --lj-ink: #4b4b4b;
    --lj-muted: #777777;
  }

  :is(.app-shell, .page.teacher-page, .admin-v2, .view-login, .view-migration, .view-onboarding, .spirit-dialog) {
    --ui-accent: var(--lj-green);
    --ui-accent-strong: var(--lj-green-edge);
    --ui-accent-border: var(--lj-green-edge);
    --ui-accent-soft: var(--lj-green-soft);
    --ui-on-accent: #fff;
    --ui-secondary: var(--lj-blue);
    --ui-secondary-soft: var(--lj-blue-soft);
    --ui-canvas: #fff;
    --ui-surface: #fff;
    --ui-text: var(--lj-ink);
    --ui-muted: var(--lj-muted);
    --ui-border: var(--lj-line);
    --ui-nav: #fff;
    --bg: #fff;
    --surface: #fff;
    --surface-soft: #f7f7f7;
    --text: var(--lj-ink);
    --text-muted: var(--lj-muted);
    --border: var(--lj-line);
    --primary: var(--lj-green-edge);
    --primary-soft: var(--lj-green-soft);
    --primary-hover: #4c9100;
    --on-primary: #fff;
    --brand: var(--lj-green);
    --brand-deep: var(--lj-green-edge);
    --practice: var(--lj-green-edge);
    --reward: #ae6802;
    --skill: #9069cd;
    --info: var(--lj-blue-ink);
    --danger: #ea2b2b;
    --paper: #fff;
    --paper-raised: #fff;
    --paper-sunk: #f7f7f7;
    --line: var(--lj-line);
    --line-strong: var(--lj-line);
    --ink: var(--lj-ink);
    --ink-strong: var(--lj-ink);
    --ink-soft: var(--lj-muted);
    --ink-faint: var(--lj-muted);
    --clay: var(--lj-green);
    --clay-ink: var(--lj-green-edge);
    --clay-soft: var(--lj-green-soft);
    --amber: #ffc800;
    --amber-deep: #ae6802;
    --amber-soft: #fff5d3;
    --moss: var(--lj-green-edge);
    --moss-soft: var(--lj-green-soft);
    --sd-wood: var(--lj-green);
    --sd-wood-dark: var(--lj-green-edge);
    --sd-wood-light: var(--lj-green);
    --sd-parchment: #fff;
    --sd-parchment-deep: #f7f7f7;
    --sd-line-warm: var(--lj-line);
    --sd-ink: var(--lj-ink);
    --sd-ink-strong: var(--lj-ink);
    --sd-night: var(--lj-ink);
    --sd-sky: var(--lj-blue-soft);
    --sd-sky-blue: var(--lj-blue);
    --sd-sky-blue-deep: var(--lj-blue-ink);
    --sd-skill-purple: #9069cd;
    --sd-gold: #ffc800;
    --sd-berry: #ff4b4b;
    --dj-snow: #fff;
    --dj-polar: #f7f7f7;
    --dj-swan: var(--lj-line);
    --dj-hare: #afafaf;
    --dj-wolf: var(--lj-muted);
    --dj-eel: var(--lj-ink);
    --dj-text: var(--lj-ink);
    --dj-green: var(--lj-green);
    --dj-green-lip: var(--lj-green-edge);
    --dj-blue: var(--lj-blue);
    --dj-blue-lip: var(--lj-blue-edge);
    --dj-gold: #ffc800;
    --dj-gold-text: #ae6802;
    --dj-orange: #ff9600;
    --dj-purple: #9069cd;
    --dj-selected-bg: var(--lj-blue-soft);
    --dj-selected-border: #84d8ff;
    --dj-selected-text: var(--lj-blue-ink);
    --section-practice: var(--lj-green-edge);
    --section-reward: #ae6802;
    --section-skill: #9069cd;
    --section-system: var(--lj-blue-ink);
    --section-accent: var(--lj-green-edge);
    --sd-section-practice: var(--lj-green-edge);
    --sd-section-reward: #ae6802;
    --sd-section-skill: #9069cd;
    --sd-section-system: var(--lj-blue-ink);
    --sd-section-accent: var(--lj-green-edge);
    --duo-n-0: #fff;
    --duo-n-1: #f7f7f7;
    --duo-n-2: #f7f7f7;
    --duo-n-3: var(--lj-line);
    --duo-n-4: var(--lj-line);
    --duo-n-5: #afafaf;
    --duo-n-6: var(--lj-muted);
    --duo-n-7: var(--lj-ink);
    --duo-n-8: var(--lj-ink);
    --duo-ink-title: var(--lj-ink);
    --duo-ink-deep: var(--lj-ink);
    --duo-ink-night: var(--lj-ink);
    --duo-brand: var(--lj-green-edge);
    --duo-brand-bright: var(--lj-green);
    --duo-success: var(--lj-green-edge);
    --duo-success-bright: var(--lj-green);
    --duo-warning: #ae6802;
    --duo-warning-bright: #ffc800;
    --duo-error: #ea2b2b;
    --duo-error-bright: #ff4b4b;
    --duo-info: var(--lj-blue-ink);
    --duo-skill: #9069cd;
    --duo-focus: var(--lj-blue-ink);
    --duo-flame-100: #f0fbe6;
    --duo-flame-200: #d7ffb8;
    --duo-flame-300: #a5ed6e;
    --duo-flame-500: #58cc02;
    --duo-flame-700: #58a700;
    --duo-flame-800: #58a700;
    --duo-flame-900: #4c9100;
    --duo-leaf-100: #f0fbe6;
    --duo-leaf-200: #d7ffb8;
    --duo-leaf-300: #a5ed6e;
    --duo-leaf-500: #58cc02;
    --duo-leaf-700: #58a700;
    --duo-leaf-800: #58a700;
    --duo-leaf-900: #4c9100;
    --duo-sky-100: #ddf4ff;
    --duo-sky-200: #ddf4ff;
    --duo-sky-300: #84d8ff;
    --duo-sky-500: #1cb0f6;
    --duo-sky-700: #1899d6;
    --duo-sky-800: #1899d6;
    --duo-sky-900: #127cae;
    --duo-grape-100: #f1ebfe;
    --duo-grape-200: #f1ebfe;
    --duo-grape-300: #d3c3f0;
    --duo-grape-500: #a987d9;
    --duo-grape-700: #9069cd;
    --duo-grape-800: #7653ae;
    --duo-grape-900: #624491;
    --duo-amber-100: #fff5d3;
    --duo-amber-200: #fff5d3;
    --duo-amber-300: #ffe79c;
    --duo-amber-500: #ffc800;
    --duo-amber-700: #ae6802;
    --duo-amber-800: #ae6802;
    --duo-amber-900: #8b5300;
    --duo-berry-100: #ffdfe0;
    --duo-berry-200: #ffdfe0;
    --duo-berry-300: #f5a4a4;
    --duo-berry-500: #ff4b4b;
    --duo-berry-700: #ea2b2b;
    --duo-berry-800: #cf2525;
    --duo-berry-900: #af2020;
    --duo-face: var(--lj-green);
    --duo-lip-color: var(--lj-green-edge);
    --duo-tint: var(--lj-green-soft);
    --duo-accent-text: var(--lj-green-edge);
    --duo-bg-page: #fff;
    --duo-bg-surface: #fff;
    --duo-bg-sunk: #f7f7f7;
    --duo-border: var(--lj-line);
    --duo-border-ctl: var(--lj-line);
    --duo-text-title: var(--lj-ink);
    --duo-text-body: var(--lj-ink);
    --duo-text-muted: var(--lj-muted);
    --duo-text-on-solid: #fff;
    --p-bg-page: #fff;
    --p-bg-page-mobile: #fff;
    --p-bg-page-queen: #fff;
    --p-text-primary: var(--lj-ink);
    --p-text-secondary: var(--lj-muted);
    --p-search-bg: #f7f7f7;
    --p-hero-bg: var(--lj-green-soft);
    --p-hero-bg-deep: var(--lj-green-soft);
    --p-hero-grad-mobile: var(--lj-green-soft);
    --p-hero-grad-queen: var(--lj-green-soft);
    --p-cta-grad: var(--lj-green);
    --p-cta-grad-mobile: var(--lj-green);
    --p-cta-grad-queen: var(--lj-green);
    --p-tint-blue: var(--lj-blue-soft);
    --p-tint-blue-2: var(--lj-blue-soft);
    --p-tint-purple: #f1ebfe;
    --p-tint-pink: #ffdfe0;
    --p-tint-cream: #fff5d3;
    --p-tint-mint: var(--lj-green-soft);
    --p-skill-purple: #9069cd;
    --p-reward-yellow: #ffc800;
    --pt-surface: #fff;
    --pt-text-primary: var(--lj-ink);
    --pt-text-secondary: var(--lj-muted);
    --pt-input-bg: #f7f7f7;
    --o3-green: var(--lj-green);
    --o3-green-dark: var(--lj-green-edge);
    --o3-green-wash: var(--lj-green-soft);
    --o3-ink: var(--lj-ink);
    --o3-muted: var(--lj-muted);
    --o3-line: var(--lj-line);
    --o3-soft: #f7f7f7;
    background-color: #fff;
    color: var(--lj-ink);
  }

  .app-shell :is(.app-main, main.page, main[class*="view-"]),
  .app-shell > .nav, .app-shell :is(.app-topbar, .learning-status-bar, .tab-bar) {
    background: #fff;
    border-color: var(--lj-line);
  }

  /* Main progression controls use exact classes. Danger controls are separate.
   * ponytail: shared face/edge variables keep secondary and pressed states in sync.
   */
  .app-shell.app-shell.app-shell.app-shell .app-main main :is(button.primary, button.sd-btn-primary, button.pbw-btn-primary, button.pbw-btn.is-primary, button.txchars-btn-primary, button.txchars-btn-stage-primary, button.shp-buy, button.chest-btn--primary, button.pbw-btn-visual, button.pbw-btn-textdl, button.pbw-btn-accent, button.sd-review-open, button.vd-cta-orange, button.sk-video-cta),
  .view-login.view-login button.primary,
  .view-onboarding.view-onboarding button.primary,
  .spirit-page.spirit-page .spirit-draw-actions > button {
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--lj-button-face, var(--lj-green));
    background-image: none;
    color: #fff;
    box-shadow: 0 4px 0 var(--lj-button-edge, var(--lj-green-edge));
    font-weight: 800;
  }

  .app-shell.app-shell.app-shell.app-shell .app-main main :is(button.primary, button.sd-btn-primary, button.pbw-btn-primary, button.pbw-btn.is-primary, button.txchars-btn-primary, button.txchars-btn-stage-primary, button.shp-buy, button.chest-btn--primary, button.pbw-btn-visual, button.pbw-btn-textdl, button.pbw-btn-accent, button.sd-review-open, button.vd-cta-orange, button.sk-video-cta):hover:not(:disabled),
  .spirit-page.spirit-page .spirit-draw-actions > button:hover:not(:disabled) {
    background: color-mix(in srgb, var(--lj-button-face, var(--lj-green)) 92%, white);
    color: #fff;
    filter: none;
  }
  .app-shell.app-shell.app-shell.app-shell .app-main main :is(button.primary, button.sd-btn-primary, button.pbw-btn-primary, button.pbw-btn.is-primary, button.txchars-btn-primary, button.txchars-btn-stage-primary, button.shp-buy, button.chest-btn--primary, button.pbw-btn-visual, button.pbw-btn-textdl, button.pbw-btn-accent, button.sd-review-open, button.vd-cta-orange, button.sk-video-cta):active:not(:disabled),
  .spirit-page.spirit-page .spirit-draw-actions > button:active:not(:disabled) {
    transform: translateY(4px);
    box-shadow: none;
  }
  .app-shell.app-shell.app-shell.app-shell .app-main main :is(button.primary, button.sd-btn-primary, button.pbw-btn-primary, button.pbw-btn.is-primary, button.txchars-btn-primary, button.txchars-btn-stage-primary, button.shp-buy, button.chest-btn--primary, button.pbw-btn-visual, button.pbw-btn-textdl, button.pbw-btn-accent, button.sd-review-open, button.vd-cta-orange, button.sk-video-cta):disabled,
  .spirit-page.spirit-page .spirit-draw-actions > button:disabled {
    background: #e5e5e5;
    color: #777;
    box-shadow: 0 2px 0 #cecece;
    transform: none;
    opacity: 1;
    filter: none;
  }

  /* Independent positive actions: review and downloads are blue, not green. */
  .app-shell.app-shell.app-shell.app-shell .app-main main :is(.practice-timer-video, .pbw-btn-visual, .pbw-btn-textdl, .pbw-btn-accent, .sd-review-open, .vd-cta-orange),
  .app-shell.app-shell.app-shell.app-shell .app-main main.view-skills .skills-video-entry .primary,
  .app-shell.app-shell.app-shell.app-shell .app-main main.view-skills .sk-video-cta {
    --lj-button-face: var(--lj-blue);
    --lj-button-edge: var(--lj-blue-edge);
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--lj-blue);
    color: #fff;
    box-shadow: 0 4px 0 var(--lj-blue-edge);
    font-weight: 800;
  }
  .app-shell.app-shell.app-shell.app-shell .app-main main :is(.pbw-btn-visual, .pbw-btn-textdl, .pbw-btn-accent, .sk-video-cta):disabled,
  .app-shell.app-shell.app-shell.app-shell .app-main main.view-skills .skills-video-entry .primary:disabled {
    background: #e5e5e5;
    color: #777;
    box-shadow: 0 2px 0 #cecece;
  }

  /* Equipment remains clickable when already equipped; lack of points does not. */
  .app-shell.app-shell.app-shell.app-shell .app-main main.view-shop .shp-equip {
    min-height: 44px;
    border: 2px solid var(--lj-line);
    border-radius: 12px;
    background: #fff;
    color: var(--lj-blue-ink);
    box-shadow: 0 2px 0 var(--lj-line);
    font-weight: 800;
  }
  .app-shell.app-shell.app-shell.app-shell .app-main main.view-shop .shp-buy.is-short {
    background: #e5e5e5;
    color: #777;
    box-shadow: 0 2px 0 #cecece;
    filter: none;
  }
  .app-shell.app-shell.app-shell.app-shell .app-main main :is(.p13-story-cta, .sk-branch-cta) {
    min-height: 44px;
    border: 2px solid var(--lj-line);
    border-radius: 12px;
    background: #fff;
    color: var(--lj-blue-ink);
    box-shadow: 0 2px 0 var(--lj-line);
  }

  .app-shell .nav-links button.active, .app-shell .tab-bar button.active,
  .app-shell .language-control button[aria-checked="true"],
  .app-shell .language-control button[aria-pressed="true"],
  .spirit-page .spirit-tabs > button[aria-pressed="true"] {
    background: var(--lj-blue-soft);
    color: var(--lj-blue-ink);
    border: 2px solid #84d8ff;
    border-radius: 12px;
    box-shadow: none;
  }
  .app-shell .nav-links button.active svg, .app-shell .tab-bar button.active svg {
    background: transparent;
    color: var(--lj-blue);
  }
  .app-shell .learning-status-xp { color: #ae6802; }
  .app-shell .learning-status-streak { color: #ff9600; }
  .app-shell main.view-home.home-page .home-area-steps .p13-step-action {
    color: var(--lj-blue-ink);
    border-color: var(--lj-line);
    background: #fff;
  }
  .app-shell main.view-home.home-page .p13-step-mark.is-next,
  .app-shell main.view-home.home-page .p13-step-mark.is-current,
  .app-shell main.view-home.home-page .p13-step-mark.is-active {
    background: var(--lj-green-soft);
    color: var(--lj-green-edge);
  }
  .app-shell main.view-home.home-page .home-area-welcome > .p13-welcome-card {
    background: #f7f7f7;
    border-color: var(--lj-line);
  }
  .app-shell main.view-settings .set-card-icon { background: var(--lj-blue-soft); color: var(--lj-blue-ink); }
  .app-shell main.view-settings :is(.set-icon-goal, .set-icon-stage) { background: var(--lj-green-soft); color: var(--lj-green-edge); }
  .app-shell main.view-settings .set-icon-skills { background: #f1ebfe; color: #9069cd; }
  .app-shell main.view-settings .set-icon-logout { background: #ffdfe0; color: #ea2b2b; }
  .app-shell .app-main .view-skills .skills-video-entry {
    background: var(--lj-blue-soft);
    color: var(--lj-ink);
  }
  .app-shell .app-main .view-skills .skills-video-entry :is(h2, span, svg) { color: inherit; }
  .spirit-page { --spirit-ink: var(--lj-ink); --spirit-muted: var(--lj-muted); --spirit-paper: #fff; --spirit-line: var(--lj-line); --spirit-accent: var(--lj-green); }
  .spirit-page .spirit-draw { background: #fff; border-color: var(--lj-line); }

  /* Teacher uses its own token family and is not necessarily inside app-shell. */
  .page.teacher-page {
    --tch-face: var(--lj-green);
    --tch-orange: var(--lj-green);
    --tch-orange-deep: var(--lj-green-edge);
    --tch-grad: var(--lj-green);
    --tch-lip-color: var(--lj-green-edge);
    --tch-ink: var(--lj-ink);
    --tch-sub: var(--lj-ink);
    --tch-faint: var(--lj-muted);
    --tch-line: var(--lj-line);
    --tch-stroke: var(--lj-line);
    --tch-stroke-ctl: var(--lj-line);
    --tch-surface: #fff;
    --tch-sunk: #f7f7f7;
    --tch-blue: var(--lj-blue-ink);
    --tch-green: var(--lj-green-edge);
    --tch-purple: #9069cd;
    --tch-tint-orange: var(--lj-blue-soft);
    --tch-edge-orange: #84d8ff;
    --tch-shadow: none;
    background: #fff;
  }
  .page.teacher-page .teacher-area-tabs button.active {
    background: var(--lj-blue-soft);
    color: var(--lj-blue-ink);
    box-shadow: inset 0 0 0 2px #84d8ff;
  }
  .page.teacher-page .tch-stat-purple .tch-stat-icon { background: #f1ebfe; color: #9069cd; }
  .page.teacher-page .tch-stat-blue .tch-stat-icon { background: var(--lj-blue-soft); color: var(--lj-blue-ink); }
  .page.teacher-page.page.teacher-page :is(.tch-cta-orange, button.primary, .teacher-assign-submit, .tch-submit) {
    --lj-button-face: var(--lj-green);
    --lj-button-edge: var(--lj-green-edge);
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--lj-button-face);
    color: #fff;
    box-shadow: 0 4px 0 var(--lj-button-edge);
    font-weight: 800;
  }
  .page.teacher-page.page.teacher-page .tch-cta-purple {
    --lj-button-face: var(--lj-blue);
    --lj-button-edge: var(--lj-blue-edge);
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--lj-button-face);
    color: #fff;
    box-shadow: 0 4px 0 var(--lj-button-edge);
    font-weight: 800;
  }
  .page.teacher-page.page.teacher-page .tch-cta-green {
    min-height: 48px;
    border: 2px solid var(--lj-line);
    border-radius: 12px;
    background: #fff;
    color: var(--lj-blue-ink);
    box-shadow: 0 2px 0 var(--lj-line);
    font-weight: 800;
  }
  .page.teacher-page.page.teacher-page :is(.tch-cta-orange, .tch-cta-purple, button.primary, .teacher-assign-submit, .tch-submit):hover:not(:disabled) {
    background: color-mix(in srgb, var(--lj-button-face) 92%, white);
    color: #fff;
    filter: none;
  }
  .page.teacher-page.page.teacher-page :is(.tch-cta-orange, .tch-cta-purple, button.primary, .teacher-assign-submit, .tch-submit):active:not(:disabled) {
    transform: translateY(4px);
    box-shadow: none;
  }
  .page.teacher-page.page.teacher-page :is(.tch-cta-orange, .tch-cta-purple, .tch-cta-green, button.primary, .teacher-assign-submit, .tch-submit):disabled {
    background: #e5e5e5;
    color: #777;
    box-shadow: 0 2px 0 #cecece;
    transform: none;
    filter: none;
    opacity: 1;
  }

  /* The old admin tail reintroduced an orange gradient; override its variables. */
  .admin-v2.admin-v2 {
    --adm-bg: #fff;
    --adm-card: #fff;
    --adm-line: var(--lj-line);
    --adm-line-strong: var(--lj-line);
    --adm-ink: var(--lj-ink);
    --adm-text: var(--lj-ink);
    --adm-muted: var(--lj-muted);
    --adm-orange: var(--lj-green);
    --adm-orange-deep: var(--lj-green-edge);
    --adm-orange-grad: var(--lj-green);
    --adm-orange-soft: var(--lj-blue-soft);
    --adm-cta-bg: var(--lj-green);
    --adm-cta-hover-bg: #61d807;
    --adm-cta-ink: #fff;
    --adm-cta-focus: var(--lj-blue-ink);
    --adm-blue: var(--lj-blue);
    --adm-red: #ff4b4b;
    --adm-shadow: none;
    background: #fff;
  }
  .admin-v2.admin-v2 :is(button.primary, a.primary, .teacher-learner-controls button.admin-push-right) { border-radius: 12px; }
  .admin-v2.admin-v2 .teacher-learner-controls button.admin-push-right {
    min-height: 48px;
    background: var(--lj-blue);
    color: #fff;
    box-shadow: 0 4px 0 var(--lj-blue-edge);
  }
  .admin-v2.admin-v2 .teacher-learner-controls button.admin-push-right:hover:not(:disabled) {
    background: #36bafa;
    box-shadow: 0 4px 0 var(--lj-blue-edge);
  }
  .admin-v2.admin-v2 .teacher-learner-controls button.admin-push-right:active:not(:disabled) {
    transform: translateY(4px);
    box-shadow: none;
  }
  .admin-v2.admin-v2 .teacher-learner-controls button.admin-push-right:disabled {
    background: #e5e5e5;
    color: #777;
    box-shadow: 0 2px 0 #cecece;
  }
  .admin-v2.admin-v2 :is(.admin-shell-nav-item.active, .admin-shell-nav-item[aria-current="page"]) {
    background: var(--lj-blue-soft);
    color: var(--lj-blue-ink);
    border-color: #84d8ff;
  }

  /* Restore account decoration only inside art/role previews, not their CTA rows.
   * Root aliases resolve before the shell's local brand overrides. */
  :is(.app-shell, .page.teacher-page, .view-login, .view-migration, .view-onboarding) :is(.home-hero-art, .home-squad-char, .home-statusbar-avatar, .app-topbar-avatar, .friend-avatar, .set-profile-avatar, .set-hero-image, .gw-stage-scene, .growth-stage-full-scene, .txchars-card-media, .txchars-edit-hero, .txshow-char-card, .login-role, .onboarding-avatar-row, .onboarding-companion, .ob-character-generation-card, .set-theme-custom-panel, .poster-preview, .pbw-card-visual, .pbw-card-text) {
    --ui-accent: var(--lj-role-accent);
    --ui-accent-strong: var(--lj-role-accent-strong);
    --ui-accent-border: var(--lj-role-accent-border);
    --ui-accent-soft: var(--lj-role-accent-soft);
    --ui-on-accent: var(--lj-role-on-accent);
    --ui-secondary: var(--lj-role-secondary);
    --ui-secondary-soft: var(--lj-role-secondary-soft);
    --ui-canvas: var(--lj-role-canvas);
    --ui-surface: var(--lj-role-surface);
    --surface-soft: var(--lj-role-soft);
    --ui-text: var(--lj-role-text);
    --ui-muted: var(--lj-role-muted);
    --ui-border: var(--lj-role-border);
    --primary: var(--lj-role-primary);
    --primary-hover: var(--lj-role-primary-hover);
    --reward: var(--lj-role-reward);
    --pbw-blue: var(--lj-role-accent-strong);
    --pbw-blue-2: var(--lj-role-accent-strong);
    --pbw-blue-soft: var(--lj-role-accent-soft);
    --pbw-purple: var(--lj-role-accent-strong);
    --pbw-purple-2: var(--lj-role-accent-strong);
    --pbw-orange: var(--lj-role-reward);
    --pbw-orange-2: var(--lj-role-reward);
    --person-frame-border: var(--lj-role-accent-border);
    --person-frame-surface: var(--lj-role-accent-soft);
  }
}

/* Reuse the site's original, transparent reward chest. Currency values and
 * accessible point labels remain real text; no duplicated generated numbers. */
@media screen {
  .app-shell .lj-point-art {
    display: inline-block;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    object-fit: contain;
    vertical-align: middle;
  }
  .app-shell .learning-status-bar .learning-status-xp {
    gap: 6px;
    color: #4b4b4b;
  }
  .app-shell .shp-points-pill { gap: 7px; }
  .app-shell .shp-points-coin {
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .app-shell .shp-points-coin .lj-point-art { width: 60px; height: 60px; flex-basis: 60px; }
  .app-shell .shp-card-price .lj-point-art { width: 22px; height: 22px; flex-basis: 22px; }
  .app-shell .friend-stat-icon-points { background: transparent; }
  .app-shell .friend-stat-icon-points .lj-point-art { width: 36px; height: 36px; flex-basis: 36px; }
  @media (max-width: 380px) {
    .app-shell .learning-status-xp .lj-point-art { width: 23px; height: 23px; flex-basis: 23px; }
  }
}

/* Product adaptation of the observed main-practice / task-sidebar hierarchy. */
@media screen {
  .app-shell main.view-home.home-page .home-layout { gap: 24px; }
  .app-shell main.view-home.home-page .home-practice-card > .sd-hero-copy h1 { font-size: clamp(23px, 2.1vw, 30px); line-height: 1.35; }
  .app-shell main.view-home.home-page .home-hero-sub { font-size: 16px; line-height: 1.6; }
  .app-shell main.view-home.home-page .weekly-progress-summary .weekly-progress-metric { background: #f7f7f7; }
  .app-shell main.view-home.home-page .home-practice-card > .hero-actions > .home-poster-shortcut { color: #1899d6; }
  .app-shell main.view-home.home-page .home-area-steps .p13-step-action { min-height: 46px; border: 2px solid #e5e5e5; box-shadow: 0 2px 0 #e5e5e5; }
  .app-shell .nav-links button > svg { width: 28px; height: 28px; padding: 3px; border-radius: 8px; }
  .app-shell .nav-links button:nth-child(1) > svg { color: #ff9600; background: #fff5d3; }
  .app-shell .nav-links button:nth-child(2) > svg { color: #58a700; background: #f0fbe6; }
  .app-shell .nav-links button:nth-child(3) > svg { color: #9069cd; background: #f1ebfe; }
  .app-shell .nav-links button:nth-child(4) > svg { color: #1cb0f6; background: #ddf4ff; }
  .app-shell .nav-links button:nth-child(5) > svg { color: #ff9600; background: #fff5d3; }
  .page.teacher-page .tch-todo-tabs > button.active { color: #1899d6; background: #ddf4ff; border: 2px solid #84d8ff; box-shadow: none; }
}
@media screen and (min-width: 1024px) {
  .app-shell main.view-home.home-page .home-layout { grid-template-columns: minmax(0,1.35fr) minmax(360px,1fr); }
  .app-shell main.view-home.home-page .home-layout > .sd-hero.home-practice-card.home-area-hero { grid-column: 1; grid-row: 1; min-height: 324px; grid-template-columns: minmax(0,1fr) minmax(160px,.7fr); padding: 20px; }
  .app-shell main.view-home.home-page .home-layout > .home-area-steps { grid-column: 2; grid-row: 1; min-height: 324px; padding: 20px; }
  .app-shell main.view-home.home-page .home-layout > .home-practice-summary { grid-column: 1; grid-row: 2; gap: 16px; height: 100%; align-self: stretch; }
  .app-shell main.view-home.home-page .home-layout > .weekly-progress-summary { grid-column: 2; grid-row: 2; height: 100%; box-sizing: border-box; }
  .app-shell main.view-home.home-page .home-practice-summary > * { min-height: 132px; }
}
@media screen and (max-width: 767px) {
  .app-shell main.view-home.home-page .home-layout > .sd-hero.home-practice-card.home-area-hero { order: -1; }
  .app-shell main.view-home.home-page .home-layout { gap: 20px; }
  .app-shell main.view-home.home-page .home-area-steps .p13-step { min-height: 76px; }
  .app-shell main.view-home.home-page .home-layout > .sd-hero.home-practice-card.home-area-hero { padding: 16px; gap: 14px; }
  .app-shell main.view-home.home-page .home-practice-card > .sd-hero-copy h1 { font-size: 22px; }
  .app-shell main.view-home.home-page .home-hero-sub { font-size: 14px; }
}
