/* Full-page study surfaces share the Shop rail, not its content layout. */
body.play-screen dialog#panel[data-learning-screen].learning-panel {
  --study-page: var(--interface-surface);
  --study-card: #fff3e3;
  --study-line: #e3c8b9;
  --study-gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --study-rail: min(var(--interface-rail), calc(100% - 2 * var(--study-gutter)));
  --study-copy: #604b60;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--study-page) !important;
  color: var(--ui-ink);
  box-shadow: none;
  overflow: hidden;
  transform: none;
  translate: none;
  animation: none;

  &, & * {
    &, &::before, &::after {
      --css-frame-bg: none !important;
      --css-frame-border: none !important;
    }
  }

  &::before, &::after { content: none; }
  &::backdrop { background: var(--study-page); backdrop-filter: none; }

  & > #panel-content {
    position: static;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    overflow: hidden;
  }

  & .learning-page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
    flex: none;
    width: var(--study-rail);
    min-height: 44px;
    margin: var(--interface-top) auto 12px;
    padding: 0;
    border: 0;
  }

  & .learning-page-title {
    margin: 0;
    color: var(--ui-ink);
    font-size: var(--interface-title-size);
    font-weight: 900;
    line-height: 1.15;
    text-shadow: none;
    overflow-wrap: anywhere;
  }

  & .learning-page-body {
    flex: 1 1 auto;
    min-height: 0;
    width: var(--study-rail);
    margin-inline: auto;
    padding: 0 0 max(16px, env(safe-area-inset-bottom));
    overflow: auto;
    overscroll-behavior: contain;
    overflow-wrap: anywhere;
    scrollbar-width: thin;
    scrollbar-color: #ad8ec4 var(--study-page);
    scroll-padding-block: 8px;
  }

  & .learning-page-header .learning-page-close:is(#exit-lesson,#end-review,#close-learning-result),
  & > #close-panel {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid #ad8ec4;
    border-image: none;
    border-radius: 8px;
    background: #fff4e3;
    color: var(--ui-ink);
    box-shadow: 0 2px #a682bf;
    font-size: 0;
    transform: none;
    translate: none;
    opacity: 1;
    filter: none;

    &::before, &::after {
      content: "";
      position: absolute;
      display: block;
      inset: 50% auto auto 50%;
      width: 16px;
      height: 3px;
      margin: 0;
      border: 0;
      border-radius: 2px;
      background: currentColor;
      transform: translate(-50%, -50%) rotate(45deg);
    }

    &::after { transform: translate(-50%, -50%) rotate(-45deg); }
  }

  & .learning-page-header .learning-page-close:is(#exit-lesson,#end-review,#close-learning-result) {
    position: relative;
    inset: auto;
    align-self: start;
  }
  & > #close-panel {
    position: absolute;
    inset: var(--interface-top) calc((100% - var(--study-rail)) / 2) auto auto;
    z-index: 2;
  }
  &:has(.learning-page-close) > #close-panel { display: none; }
  & :is(button, [tabindex]):focus-visible {
    outline: 2px solid #65428b;
    outline-offset: -3px;
  }
  & .learning-page-body button:not(.course-node) {
    min-width: 0;
    min-height: 44px;
    border: 1px solid var(--control-line, #ad8ec4);
    border-radius: 8px;
    border-image: none;
    background: var(--control-face, #fff4e3);
    color: var(--control-ink, var(--ui-ink));
    box-shadow: 0 2px var(--control-edge, #a682bf);
    line-height: 1.25;
    text-shadow: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  & .learning-page-body :is(
    #learn-review, #lesson-next, #check-order, #record-speech, #garden-review,
    .garden-empty #back-course, #next-lesson, #review-next, #review-farm:not(.quiet),
    #return-farm:not(:has(+ #next-lesson))
  ):not(:disabled) {
    --control-face: #ff9684;
    --control-line: #ba6574;
    --control-edge: #b76378;
  }
  & .learning-page-body button:disabled:not(:is(.correct-answer,.wrong-answer,.matched,.right,.reveal,.wrong,[aria-invalid=true])),
  & .learning-page-body #learn-review:disabled {
    --control-face: #f0e7da;
    --control-line: #d0bdb3;
    --control-edge: #cbbab0;
    --control-ink: #655466;
    opacity: 1;
    filter: none;
  }
}

body.play-screen #panel[data-learning-screen].learning-panel > #panel-content .learning-page-body {
  & :is(.course-shell,.lesson-shell,.garden-overview,.notebook-view,.review-shell,.lesson-completion,.review-completion) {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: inherit;
    overflow: visible;
    transform: none;
    translate: none;
  }
  & :is(.course-scroll,.lesson-scroll,.notebook-scroll,.review-scroll,.completion-scroll) {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 0;
    flex: none;
    overflow: visible;
  }
  & :is(.course-shell,.lesson-shell,.review-shell,.lesson-completion,.review-completion)::before,
  & :is(.course-shell,.lesson-shell,.review-shell,.lesson-completion,.review-completion)::after {
    content: none;
  }
  & :is(.course-header,.course-content,.lesson-body,.review-body,.completion-content,.review-result-content) {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }
}

/* Roadmap: lay out nodes in flow and let the SVG follow their measured centers. */
body.play-screen dialog#panel[data-learning-screen="board"].learning-panel {
  --topic-wash-opacity: 86%;
  background: var(--study-page) url("ui/raster/v2/roadmap-background.png") center / cover no-repeat !important;
}

@media (max-width: 699px) and (orientation: portrait) {
  body.play-screen dialog#panel[data-learning-screen="board"].learning-panel {
    --topic-wash-opacity: 26%;
    background: #e6d9fb url("ui/raster/v3/phone-roadmap-background.png") center / 100% 100% no-repeat !important;
  }
}

body.play-screen #panel[data-learning-screen="board"] > #panel-content .learning-page-body {
  & :is(.course-header,.course-heading) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    gap: 8px;
    border: 0;
    background: none;
    box-shadow: none;
  }
  & .course-heading {
    padding: 14px;
    gap: 12px;
    border-radius: 14px;
    background: #fff8eeb3;
  }
  & :is(.course-header,.course-content,.course-topic,.course-topic-banner,.course-node,.course-start,.course-lesson-name,.course-recommendation,.course-recommendation strong)::before,
  & :is(.course-header,.course-content,.course-topic,.course-topic-banner,.course-node,.course-start,.course-lesson-name,.course-recommendation)::after { content: none; }
  & .course-heading h2 {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0 8px;
    width: auto;
    padding: 0;
    margin: 0;
    translate: none;
    font-size: clamp(22px, 4vw, 31px);
  }
  & .course-heading h2 small {
    grid-column: 2;
    margin: 0;
    color: var(--study-copy);
    font-size: 13px;
    translate: none;
  }
  & .course-heading .language-flag {
    display: block;
    grid-row: 1 / 3;
    width: 42px;
    height: 28px;
  }
  & .course-top-stats {
    display: flex;
    flex-direction: row;
    justify-content: start;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font-size: 14px;
  }
  & .course-top-stats > *, & #learn-streak {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 3px 8px;
    border: 0;
    border-radius: 999px;
    background: #fff8eee0;
    box-shadow: none;
    color: inherit;
  }
  & #learn-streak::before { content: none; }
  & .course-top-stats img { width: 19px; height: 19px; object-fit: contain; }
  & .course-header .learn-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    padding: 0;
    margin: 0;
    gap: 8px;
  }
  & .course-header .learn-summary button, & .course-header #learn-review {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 6px;
    font-size: 14px;
  }
  & .course-streak-note {
    position: static;
    display: block;
    width: auto;
    height: auto;
    margin: 12px 0;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    background: #f0e7f6;
    box-shadow: none;
    color: var(--study-copy);
    font-size: 14px;
    text-align: left;
    clip-path: none;
  }
  & .course-scroll { background: none; }
  & .course-topic {
    --topic-wash: color-mix(in srgb, var(--topic-color) 16%, #fff8eb);
    --topic-path: color-mix(in srgb, var(--topic-color) 24%, #fff4e4);
    width: 100%;
    min-height: 0;
    padding: 0;
    margin: 0 0 20px;
    border: 0;
    border-radius: 14px;
    background: color-mix(in srgb, var(--topic-wash) var(--topic-wash-opacity), transparent);
    box-shadow: none;
  }
  & .course-topic-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 9px 14px;
    border: 0;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(100deg, var(--topic-path), color-mix(in srgb, var(--topic-wash) 68%, transparent));
    box-shadow: none;
    transform: none;
  }
  & .course-topic-banner > div:first-child { transform: none; }
  & .course-topic-banner h3 { margin: 0; font-size: clamp(22px, 5vw, 28px); }
  & .course-topic-native, & .course-topic-progress { font-size: 13px; }
  & .course-topic-progress progress { width: min(160px, 75%); height: 9px; }
  & .course-reward-art {
    width: 74px;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border: 0;
    background: none;
    font-size: 12px;
    text-align: center;
    translate: none;
  }
  @media (min-width: 1101px) {
    & .course-reward-art { width: 124px; max-width: none; }
  }
  & .course-reward-art :is(canvas,.course-plot-art) { width: 48px; height: 48px; translate: none; }
  & .course-reward-art > span {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.1;
  }
  & .course-path {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template: none / minmax(0, 1fr);
    justify-items: center;
    gap: 12px;
    width: min(100%, 540px);
    height: auto;
    min-height: 0;
    margin: 0 auto;
    padding: 12px 8px;
  }
  & .course-road {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    stroke-linecap: round;
  }
  & .course-road path:nth-child(-n+2) { stroke: var(--topic-color); stroke-width: 13; opacity: .48; }
  & .course-road path:nth-child(3) { stroke: #fff8ec; stroke-width: 2; stroke-dasharray: 2 9; }
  & .course-path .course-step:nth-of-type(n) {
    position: relative;
    inset: auto;
    display: grid;
    justify-items: center;
    grid-template: none / minmax(0, 1fr);
    width: min(100%, 270px);
    min-width: 0;
    margin: 0;
    gap: 3px;
    transform: none;
  }
  & .course-path .course-step:nth-of-type(2) { translate: 18% 0; }
  & .course-path .course-step:nth-of-type(4) { translate: -18% 0; }
  & .course-path .course-step:not(:has(.course-recommendation)) { width: min(72%, 200px); }
  & .course-path .course-step .course-node[data-course-state] {
    --node-face: #f2e8f4;
    position: relative;
    grid-area: auto;
    display: grid;
    place-items: center;
    width: 86px;
    height: 64px;
    min-height: 44px;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: var(--node-face);
    box-shadow: 0 2px #a682bf;
  }
  & .course-path .course-step .course-node[data-course-state="next"] { --node-face: #ffdda8; box-shadow: 0 3px #c58b62; }
  & .course-path .course-step .course-node[data-course-state="done"] { --node-face: #e5efbe; box-shadow: 0 3px #9bae70; }
  & .course-path .course-node[data-course-state] canvas { width: 60px; height: 60px; opacity: 1; filter: none; }
  & .course-path .course-node[data-course-state] .course-state-icon {
    inset: auto 3px 3px auto;
    width: 19px;
    height: 19px;
    border: 1px solid #ad8ec4;
    border-radius: 50%;
    background: var(--study-page);
  }
  & .course-path .course-state-icon svg { width: 14px; height: 14px; }
  & .course-path .course-step .course-lesson-name {
    grid-area: auto;
    position: static;
    width: auto;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    margin: 0;
    padding: 3px 6px;
    border: 0;
    border-radius: 6px;
    background: var(--study-card);
    box-shadow: none;
    font-size: 13px;
    text-align: center;
    white-space: normal;
  }
  & .course-path .course-start { display: none; }
  & .course-path .course-recommendation {
    position: relative;
    inset: auto;
    grid-area: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: min(100%, 260px);
    min-height: 0;
    gap: 8px;
    margin: 0;
    padding: 6px 8px 8px;
    border: 1px solid var(--study-line);
    border-radius: 8px;
    background: var(--study-page);
    box-shadow: none;
    transform: none;
  }
  & .course-recommendation > div { display: grid; gap: 2px; font-size: 13px; text-align: left; }
  & .course-recommendation > div > span { padding: 0; }
  & .course-recommendation strong { font-size: 14px; translate: none; }
  & .course-path .course-recommendation button { min-height: 44px; font-size: 14px; }
  & .course-reward {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 5px 8px;
    border: 1px solid var(--study-line);
    border-radius: 6px;
    background: var(--study-page);
    box-shadow: none;
    font-size: 13px;
    text-align: center;
    transform: none;
    clip-path: none;
  }
}

body.play-screen #panel[data-learning-screen].learning-panel > #panel-content .learning-page-body {
  & .lesson-shell .lesson-header, & .review-shell .review-header {
    position: static;
    display: flex;
    align-items: center;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0 0 8px;
    padding: 0 0 6px;
    gap: 8px;
    border: 0;
    border-bottom: 1px solid var(--study-line);
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  & .lesson-header .lesson-header-row {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
  }
  & .lesson-header .lesson-progress {
    position: relative;
    inset: auto;
    flex: 1;
    width: auto;
    height: 10px;
    margin: 0;
    border: 1px solid #c7a4d8;
    border-radius: 5px;
    background: #f0e2ef;
    box-shadow: none;
  }
  & .lesson-header .lesson-progress span { border-radius: 4px; background: #9571b8; }
  & .lesson-header .word-plant { width: 35px; height: 37px; margin: 0; object-fit: contain; }
  & .lesson-shell .lesson-scroll, & .review-shell .review-scroll {
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  & .lesson-shell .lesson-body .exercise-counter {
    position: static;
    margin: 0 0 8px;
    padding: 0;
    color: var(--study-copy);
    font-size: 12px;
  }
  & .lesson-shell .lesson-body h3, & .review-question h3 {
    display: block;
    width: auto;
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ui-ink);
    font-size: clamp(20px, 5vw, 26px);
    line-height: 1.2;
    text-shadow: none;
  }
  & .lesson-shell .lesson-body h3::before,
  & .lesson-shell .lesson-body :is(.exercise-counter,.lesson-answer-summary)::before { content: none; }
  & .lesson-shell .lesson-body > p,
  & .lesson-shell .lesson-body .dialogue-prompt-row { margin: 0 0 10px; color: var(--study-copy); }
  & .lesson-shell .lesson-body :is(.intro-words,.answer-grid,.match-grid,.word-pieces,.row-actions,.sentence-answer) {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    margin: 8px 0;
    gap: 8px;
  }
  & .lesson-body .row-actions { flex-wrap: wrap; }
  & .lesson-body :is(.answer-grid,.match-grid) button {
    min-height: 44px;
    height: auto;
    font-size: clamp(14px, 3.8vw, 17px);
  }
  & .lesson-body .match-grid > div { min-width: 0; gap: 8px; }
  & .lesson-body .sentence-answer { padding: 6px; border: 1px dashed #ad8ec4; border-radius: 8px; background: var(--study-card); }
  & .lesson-body .intro-words .intro-word {
    padding: 0;
    border: 1px solid var(--study-line);
    border-radius: 8px;
    background: var(--study-card);
    box-shadow: none;
  }
  & .lesson-body .intro-words .intro-word:has([aria-expanded=true]) {
    border-color: #ad8ec4;
    background: #fff8ee;
    box-shadow: none;
  }
  & .lesson-body .intro-words .intro-word-toggle {
    position: relative;
    padding-inline-end: 82px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  & .lesson-body .intro-words :is(.intro-word-pronounce,.intro-example-pronounce) {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }
  & .lesson-shell .lesson-body .intro-words :is(.intro-word-pronounce,.intro-example-pronounce)::before {
    content: none;
  }
  & .lesson-shell .lesson-body .intro-words :is(.intro-word-pronounce,.intro-example-pronounce)::after { content: none; }
  & .lesson-body .intro-example:not([hidden]) {
    margin: 0 8px 8px;
    padding: 8px;
    border: 1px solid var(--study-line);
    border-radius: 8px;
    background: #faeee8;
  }
  & .lesson-body .intro-example::before, & .lesson-body .intro-chevron::before { content: none; }
  & .lesson-body .intro-chevron {
    position: absolute;
    display: block;
    inset: 50% 62px auto auto;
    width: 12px;
    height: 12px;
    margin: 0;
    border: solid #76528c;
    border-width: 0 2px 2px 0;
    border-radius: 0;
    background: none;
    transform: translateY(-65%) rotate(45deg);
  }
  & .lesson-body [aria-expanded=true] .intro-chevron { transform: translateY(-30%) rotate(225deg); }
  & .lesson-shell .lesson-body .lesson-answer-summary {
    position: static;
    width: auto;
    min-height: 0;
    padding: 4px 0;
    border: 0;
    background: none;
    text-align: left;
    font-size: 16px;
  }
  & .lesson-shell .lesson-footer, & .review-shell .review-feedback {
    position: static;
    width: 100%;
    min-height: 0;
    margin: 10px 0 2px;
    padding: 8px 0 0;
    border: 0;
    border-top: 1px solid var(--study-line);
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  & .lesson-shell .lesson-footer-inner, & .review-shell .review-feedback-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: none;
    gap: 8px;
    margin: 0;
    padding: 0;
  }
  & :is(.lesson-footer,.review-feedback) .lesson-feedback {
    min-height: 0;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #8aa473;
    border-radius: 8px;
    background: #f0f5de;
    color: #38542a;
    box-shadow: none;
  }
  & :is(.lesson-footer,.review-feedback).wrong .lesson-feedback {
    border-color: #c48b83;
    background: #fff0e6;
    color: #783b47;
  }
  & :is(.lesson-footer,.review-feedback) .lesson-feedback::before,
  & :is(.lesson-footer,.review-feedback) .lesson-feedback::after { content: none; }
  & :is(.lesson-footer,.review-feedback) .lesson-feedback strong { font-size: 17px; color: inherit; }
  & :is(.lesson-footer,.review-feedback) .lesson-feedback p { margin: 2px 0 0; }
  & :is(.lesson-footer-inner,.review-feedback-inner) > button {
    width: 100%;
    max-width: none;
    min-height: 44px;
    padding: 7px 12px;
    font-size: 16px;
  }
  & .lesson-shell:has(.intro-words) .lesson-footer-inner > #lesson-next {
    height: auto;
    border: 1px solid var(--control-line);
    border-radius: 8px;
    background: var(--control-face);
    color: var(--ui-ink);
    box-shadow: 0 2px var(--control-edge);
    text-shadow: none;
  }
  & .lesson-shell:has(.intro-words) .lesson-footer-inner > #lesson-next::after { content: none; }
  & .review-shell { gap: 0; }
}

body.play-screen #panel[data-learning-screen=lesson].learning-panel > #panel-content .learning-page-body:has(.lesson-feedback) {
  overflow: hidden;

  & .lesson-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  & .lesson-shell :is(.lesson-header, .lesson-footer) { flex: none; }
  & .lesson-shell .lesson-scroll {
    flex: 0 1 auto;
    height: auto;
    overflow: auto;
    overscroll-behavior: contain;
    padding-bottom: 4px;
  }
  & .lesson-shell .lesson-footer,
  & .lesson-shell .lesson-footer-inner,
  & .lesson-shell #lesson-next { height: auto; }
  & .lesson-feedback {
    max-height: 30dvh;
    overflow: auto;
  }
}

body.play-screen #panel[data-learning-screen].learning-panel > #panel-content .learning-page-body {
  & .garden-heading { display: none; }
  & :is(.garden-stages > div,.garden-watering,.notebook-stats > div,.completion-rewards > div,.completion-detail,.completion-topic,.review-stars) {
    border: 1px solid var(--study-line);
    border-radius: 9px;
    background: var(--study-card);
    box-shadow: none;
  }
  & :is(.garden-watering,.notebook-stats > div,.notebook-filters,.completion-detail,.completion-topic)::before,
  & :is(.garden-stages > div,.garden-watering,.notebook-filters,.completion-detail,.completion-topic)::after { content: none; }
  & .garden-stages { gap: 4px; margin: 0; }
  & .garden-stages > div { min-height: 0; padding: 6px 2px; }
  & .garden-stages > [data-garden-stage]::before { width: 42px; height: 42px; padding: 0; }
  & .garden-stages span { font-size: clamp(10px, 2.9vw, 12px); line-height: 1.15; letter-spacing: normal; }
  & .garden-watering { margin: 12px 0; padding: 12px; color: var(--study-copy); }
  & .garden-watering #garden-review { width: 100%; min-height: 44px; margin: 8px 0 0; }
  & .garden-schedule { color: var(--study-copy); }
  & :is(.garden-actions,.garden-shortcuts) { gap: 8px; }
  & .garden-overview button { font-size: 14px; }
  & .notebook-view .notebook-stats { margin: 0 0 10px; }
  & .notebook-view .notebook-stats > div { min-height: 0; padding: 8px 2px; }
  & .notebook-view .notebook-stats strong { font-size: 23px; }
  & .notebook-view .notebook-stats span { font-size: 12px; }
  & .notebook-view .notebook-filters {
    min-height: 0;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0 0 2px;
  }
  & .notebook-filters button { min-height: 44px; padding: 6px 8px; font-size: 13px; }
  & .notebook-view .notebook-count { margin: 8px 0; font-size: 13px; }
  & .notebook-view .notebook-detail:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 8px; }
  & .notebook-example-copy { padding: 0; }
  & .notebook-example-copy::before { content: none; }
  & .notebook-example-meta { width: auto; padding: 0; border: 0; }
  & .notebook-example-meta :is(.row-actions,small) { flex-wrap: wrap; }
  & .notebook-view .notebook-navigation { margin: 10px 0 0; gap: 8px; }
  & .notebook-view .notebook-toggle { min-height: 44px; }
  & .notebook-view .notebook-word .word-plant { padding: 0; }
  & .notebook-view .notebook-meaning { line-height: 1.25; }

  & .lesson-completion .completion-heading {
    display: grid;
    justify-items: start;
    width: 100%;
    min-height: 0;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
  }
  & :is(.completion-heading,.completion-hero,.perfect-badge,.completion-streak,.completion-new-words)::before,
  & :is(.completion-heading,.completion-hero,.perfect-badge,.completion-streak,.completion-new-words)::after { content: none; }
  & .lesson-completion .completion-hero {
    position: static;
    width: 72px;
    height: 74px;
    transform: none;
  }
  & .lesson-completion .completion-hero canvas {
    position: static;
    width: 72px;
    height: 74px;
    opacity: 1;
    object-fit: contain;
  }
  & .lesson-completion .completion-subtitle { margin: 0 0 6px; color: var(--study-copy); font-size: 16px; }
  & .lesson-completion .perfect-badge { margin: 0; padding: 0; border: 0; background: none; color: var(--ui-ink); }
  & .lesson-completion .completion-rewards { gap: 6px; padding: 0; margin: 0 0 8px; }
  & .lesson-completion .completion-rewards > div { min-height: 0; padding: 8px 3px; }
  & .lesson-completion .completion-detail, & .lesson-completion .completion-topic { margin: 0 0 8px; padding: 8px; }
  & .lesson-completion .completion-words { flex-wrap: wrap; }
  & .lesson-completion .completion-words span { border: 1px solid var(--study-line); border-radius: 6px; background: var(--study-page); }
  & .lesson-completion .completion-footer {
    position: static;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 6px 0 2px;
    border: 0;
    background: none;
    box-shadow: none;
  }
  & .lesson-completion .completion-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  & .lesson-completion .completion-actions button, & .review-result-content #review-farm {
    width: auto;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    font-size: 16px;
  }
  & .review-result-content .review-plants {
    display: flex;
    justify-content: flex-start;
    align-items: end;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0 0 8px;
    padding: 0;
    gap: 4px;
    border: 0;
    background: none;
  }
  & .review-result-content .review-plants canvas {
    position: static;
    width: min(56px, 18%);
    height: auto;
    margin: 0;
    object-fit: contain;
  }
  & .review-result-content p { margin: 0 0 10px; color: var(--study-copy); text-align: left; }
  & .review-result-content .review-stars { width: fit-content; min-height: 0; margin: 0 0 10px; padding: 6px 10px; }
  & .review-result-content .review-stars::before, & .review-result-content .review-plants::before { content: none; }
  & .review-result-content::before, & .review-result-content::after { content: none; }
  & .review-completion { text-align: left; }
}

@media (min-width: 780px) {
  body.play-screen #panel[data-learning-screen="board"] > #panel-content .learning-page-body .course-path .course-recommendation {
    position: absolute;
    inset: 0 auto auto calc(50% + 48px);
    width: 220px;
  }
}
