@media screen and (max-width: 820px) {
  :root {
    --bright-ink: #263f50;
    --bright-muted: #4c606d;
    --bright-rule: #dae3e9;
    --bright-pink: #ff8cc5;
    --bright-yellow: #ffcf4e;
    --bright-blue: #65cff3;
    --bright-violet: #bc9cfa;
    --bright-green: #78dfa3;
    --bright-round: "Kids Reader Round", "Guide Round Extra", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  }

  /* The same four destinations are recognizable throughout the family area. */
  .app-shell:has(> .family-topbar:first-child) { padding-top: env(safe-area-inset-top, 0px); }
  body:has(.family-topbar) .family-topbar,
  .family-bottom-nav {
    border-color: var(--bright-rule);
    background: #fff;
    color: var(--bright-ink);
  }
  .family-topbar :is(.family-brand,.family-products-trigger),
  .family-bottom-nav button,
  .family-product-dialog {
    font-family: var(--bright-round);
    color: var(--bright-ink);
  }
  .family-products-trigger {
    padding-inline: 10px;
    border-radius: 14px;
    background: #eef4f7;
  }
  .family-bottom-nav button[aria-current] { color: var(--bright-ink); }
  .family-bottom-nav button[aria-current] i { background: var(--bright-green); }
  .family-bottom-nav button[data-nav^="/course-guide"][aria-current] i { background: var(--bright-blue); }
  .family-bottom-nav button[data-nav="/vocabulary"][aria-current] i { background: var(--bright-yellow); }
  .family-bottom-nav button[data-nav="/account"][aria-current] i { background: var(--bright-violet); }
  .family-product-sheet { background: #fff; color: var(--bright-ink); }
  .family-product-handle { background: #c6d3db; }
  .family-product-heading h2,
  .family-paid-topics h3 { font-family: var(--bright-round); color: var(--bright-ink); }
  .family-product-link { grid-template-columns: 36px minmax(0,1fr) auto; border-color: var(--bright-rule); color: var(--bright-ink); }
  .family-product-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--bright-blue);
    color: var(--bright-ink);
  }
  .family-product-icon.family-product-starter { background: var(--bright-pink); }
  .family-product-icon.family-product-books { background: var(--bright-yellow); }
  .family-current-product { color: #166045; }
  .family-paid-topics {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 6px;
    margin-top: 12px;
    padding: 0;
    background: transparent;
  }
  .family-paid-topics h3 { grid-column: 1 / -1; }
  .family-paid-topics .family-product-link {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    border: 0;
    border-radius: 13px;
    background: var(--bright-violet);
    font-size: 14px;
  }
  .family-paid-topics [data-nav="/oral-sense"] { background: var(--bright-green); }
  .family-paid-topics .family-product-icon { width: 28px; background: transparent; }
  .family-paid-topics .family-product-arrow { margin-left: auto; color: inherit; }
  .family-paid-topics .family-current-product { font-size: 11px; }
  .family-menu-shortcuts { border-color: var(--bright-rule); }
  .family-menu-shortcuts button { background: #f0f4f7; color: var(--bright-ink); }

  .mobile-home {
    --home-paper: #fff;
    --home-panel: #fff;
    --home-green: #233f50;
    --home-ink: var(--bright-ink);
    --home-muted: var(--bright-muted);
    --home-rule: var(--bright-rule);
    --home-label-font: var(--bright-round);
    --home-display: var(--bright-round);
    --reading: #167956;
    --listening: #9a6300;
    --practice: #aa3979;
  }
  /* Separate the diffused bookmarks from the glass so the type stays sharp. */
  .mobile-home__bookmark-stack {
    position: relative;
    isolation: isolate;
    margin: 12px 0 16px;
  }
  .mobile-home__bookmarks {
    position: absolute;
    inset: 0;
    clip-path: inset(0 round 17px);
    filter: blur(3.5px);
    pointer-events: none;
  }
  .mobile-home__bookmarks::before,
  .mobile-home__bookmarks::after {
    position: absolute;
    border-radius: 5px 5px 0 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 81%, 0 100%);
    content: "";
  }
  .mobile-home__bookmarks::before {
    top: -12px;
    right: 8%;
    width: clamp(45px, 20%, 78px);
    height: 82px;
    transform: rotate(-19deg);
    background: var(--bright-blue);
  }
  .mobile-home__bookmarks::after {
    top: -8px;
    right: 3%;
    width: clamp(32px, 13%, 56px);
    height: 59px;
    transform: rotate(12deg);
    background: var(--bright-green);
  }
  .mobile-home .mobile-home__feature {
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
    margin: 0;
    padding: 16px clamp(14px, 4.5vw, 22px) 8px;
    border: 1px solid rgba(107, 152, 163, .36);
    border-radius: 17px;
    background: #eef7f8;
    box-shadow: inset 0 1px 1px #fff, 0 3px 10px rgba(43, 87, 99, .07);
  }
  .mobile-home .mobile-home__feature::after {
    right: 7%;
    width: 11px;
    height: 18px;
    background: #38877f;
  }
  .mobile-home__feature .mobile-home__eyebrow {
    grid-column: 1 / -1;
    color: #435b67;
    font: 500 13px/1.4 var(--bright-round);
  }
  .mobile-home .mobile-home__feature h2 {
    grid-column: 1 / -1;
    margin: 7px 0 9px;
    color: var(--bright-ink);
    font: 600 clamp(24px, 6.6vw, 31px)/1.15 var(--bright-round);
    text-wrap: balance;
  }
  .mobile-home .mobile-home__feature h2[lang="en"] {
    font-family: "Charter", "Iowan Old Style", Georgia, serif;
    letter-spacing: -.016em;
  }
  .mobile-home__feature .mobile-home__course-meta {
    grid-column: 1;
    color: #435b67;
    font-size: 13px;
  }
  .mobile-home .mobile-home__primary {
    grid-column: 2;
    justify-self: end;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--bright-ink);
  }
  .mobile-home__primary > .library-icon {
    box-sizing: content-box;
    width: 15px;
    height: 15px;
    padding: 7px;
    border-radius: 50%;
    border: 1px solid #b8dce5;
    background: #d9f2f8;
  }
  .mobile-home__primary::after {
    position: absolute;
    inset: 0;
    content: "";
    border-radius: 17px;
  }
  .mobile-home__feature:focus-within {
    outline: 2px solid #24637c;
    outline-offset: 2px;
  }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .mobile-home .mobile-home__feature {
      background: rgba(232, 246, 248, .39);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
    }
    .family-bottom-nav {
      background: rgba(255, 255, 255, .79);
      -webkit-backdrop-filter: blur(15px) saturate(120%);
      backdrop-filter: blur(15px) saturate(120%);
    }
  }
  @media (prefers-reduced-transparency: reduce) {
    .mobile-home .mobile-home__feature { background: #eef7f8; }
    .mobile-home .mobile-home__feature, .family-bottom-nav {
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }
    .family-bottom-nav { background: #fff; }
  }
  .mobile-home .mobile-home__calendar-paper { border: 1px solid var(--bright-rule); border-radius: 16px; }
  .mobile-home .mobile-home__dates [aria-pressed="true"] span { background: var(--bright-blue); color: var(--bright-ink); }
  .mobile-home .mobile-home__metrics dl > div { padding: 3px 7px; border-radius: 6px; }
  .mobile-home .mobile-home__metrics dl > div:nth-child(1) { background: #c8f4dc; }
  .mobile-home .mobile-home__metrics dl > div:nth-child(2) { background: #ffe8a0; }
  .mobile-home .mobile-home__metrics dl > div:nth-child(3) { background: #ffd5ea; }
  .mobile-home__metrics dt { color: var(--bright-ink); }
  .mobile-home .mobile-home__course-row span { border-radius: 8px; background: var(--bright-blue); }
  .mobile-home__course-row:nth-child(3n + 2) span { background: var(--bright-yellow); }
  .mobile-home__course-row:nth-child(3n) span { background: var(--bright-green); }
  .mobile-home__guest-links a { padding-inline: 9px; border: 0; border-radius: 10px; background: #d6f3ff; }
  .mobile-home__guest-links a:nth-child(2) { background: #ffe6a1; }

  /* Put the opening lesson within thumb's reach, above the catalogue filters. */
  body:has(.is-mobile-course-directory,.activation-page,.family-activation,.phone-account,.purchase-band) { background: #fff; }
  .mobile-directory-intro__links button,
  .mobile-directory-summary button,
  .mobile-directory-extra > summary { color: var(--bright-ink); }
  .mobile-directory-intro__course { padding-block: 6px 10px; }
  .mobile-directory-intro__course h1 { color: var(--bright-ink); font-family: var(--bright-round); }
  .mobile-directory-intro__status {
    padding: 2px 8px;
    border-radius: 20px;
    background: #d6f5e3;
    color: #17583b;
  }
  .mobile-directory-intro .mobile-directory-intro__start {
    min-height: 54px;
    padding: 9px 12px;
    border: 0;
    border-radius: 14px;
    background: var(--bright-blue);
    color: var(--bright-ink);
  }
  .mobile-directory-intro__action { font-family: var(--bright-round); }
  .is-mobile-course-directory .library-search,
  .is-mobile-course-directory .lesson-tile { border-color: var(--bright-rule); border-radius: 13px; box-shadow: none; }
  .is-mobile-course-directory .cefr-filter-button.is-active { background: var(--bright-ink); color: #fff; }
  .is-mobile-course-directory .course-list-more .course-list-expand {
    border: 0;
    border-radius: 12px;
    background: #d6f3ff;
    color: var(--bright-ink);
  }
  .learning-path-home .catalog-head, .library-discovery > header {
    padding: 14px 16px;
    border-radius: 16px;
    background: #cff1ff;
    color: var(--bright-ink);
  }
  .learning-path-home .catalog-head h1, .library-discovery > header h1 { color: var(--bright-ink); font-family: var(--bright-round); }
  .learning-path-home .filter { min-height: 44px; border-radius: 12px; color: var(--bright-muted); }
  .learning-path-home .filter.active { background: var(--bright-blue); color: var(--bright-ink); }
  .learning-path-home .catalog-course, .library-discovery .discovery-course { border-color: var(--bright-rule); border-radius: 13px; }
  .library-discovery .course-access-badge.is-owned { background: #d6f5e3; color: #17583b; }

  .activation-page, .family-activation, .band.phone-account, .band.purchase-band { color: var(--bright-ink); }
  .activation-heading h1, .family-activation h1, .band.phone-account h1,
  .purchase-heading h1 { font-family: var(--bright-round); color: var(--bright-ink); letter-spacing: 0; }
  .activation-code-card, .family-code-form {
    padding: 16px;
    border: 1px solid var(--bright-rule);
    border-top: 5px solid var(--bright-blue);
    border-radius: 16px;
    background: #fff;
  }
  .activation-code-card .activation-current, .family-entitlement {
    border-color: transparent;
    background: #c8f4dc;
    color: #17583b;
  }
  .activation-code-form button, .family-code-form .family-confirm,
  .band.phone-account .primary-action, .purchase-summary > button.primary-action {
    border: 0;
    border-radius: 12px;
    background: var(--bright-ink);
    color: #fff;
  }
  .activation-wechat-card { position: static; border-color: var(--bright-rule); background: #effaf5; }
  .activation-page .activation-guide-link, .band.phone-account [data-phone-send] { background: #d6f3ff; color: var(--bright-ink); }
  .band.phone-account { padding: 16px; border-radius: 16px; border: 1px solid var(--bright-rule); border-top: 5px solid var(--bright-blue); }
  .band.phone-account input:not([type=radio]):not([type=checkbox]) { border: 1px solid #92a9b6; border-radius: 10px; background: #fff; font-size: 16px; }
  .band.phone-account button { min-height: 44px; border-radius: 10px; }
  .purchase-band .purchase-update-promise, .purchase-band .purchase-course-path {
    border-color: var(--bright-rule); border-radius: 14px; background: #f2f8fb; color: var(--bright-ink);
  }
  .purchase-band .purchase-package.is-featured { background: #ffecaf; border-color: #cc9b16; color: var(--bright-ink); }
  .purchase-band .purchase-package.is-selected, .purchase-band .purchase-product.is-selected { background: #d8f3ff; border-color: #256786; }
  .purchase-band .purchase-product.is-owned { background: #e0f8eb; }
  .purchase-band .purchase-product.is-selected .purchase-check { background: var(--bright-ink); color: white; }
  .purchase-band :is(.purchase-summary,.purchase-selection) { border-color: var(--bright-rule); border-radius: 14px; }

  .parent-guide, .home-guide { color: var(--bright-ink); }
  .parent-guide :is(h1,h2), .home-guide h1 { font-family: var(--bright-round); }
  .parent-guide .parent-guide-heading, .home-guide .home-guide-heading {
    padding: 16px;
    border: 0;
    border-radius: 16px;
    background: #ceeffc;
    text-align: left;
  }
  .parent-guide-heading .parent-guide-eyebrow, .home-guide-heading .home-eyebrow,
  .home-guide .home-guide-heading > p { color: #334e5e; }
  .parent-guide .parent-guide-toc a, .home-guide .home-guide-top button {
    border-color: var(--bright-rule);
    background: #f0f4f7;
    color: var(--bright-ink);
  }
  .home-guide .home-device-tabs button[aria-pressed="true"] { background: var(--bright-yellow); color: var(--bright-ink); }
  .home-guide .home-step-heading > span { background: var(--bright-blue); color: var(--bright-ink); }
  .parent-guide button.primary-action, .home-guide .home-primary { background: var(--bright-ink); border-color: var(--bright-ink); color: white; }
}
