/* Load last. Keep the current GPTImage panels, controls and ornaments intact. */
body.play-screen #onboarding,
body.play-screen #onboarding :is(h1,h2,button,input),
body.play-screen #panel.settings-panel,
body.play-screen #panel.settings-panel :is(h2,h3,button),
body.play-screen #account-card,
body.play-screen #account-card[data-account-view] :is(h2,h3,button),
body.play-screen #language-picker,
body.play-screen #language-picker :is(h2,button) {
  font-family: "Meadow UI", sans-serif;
}

body.play-screen #panel.settings-panel > #close-panel,
body.play-screen #panel:has(#account-card) > #close-panel,
body.play-screen #language-picker[open] #language-back {
  min-width: 44px;
  min-height: 44px;
}
body.play-screen #account-card h2:focus-visible {
  outline: 2px solid #76519d;
  outline-offset: 4px;
}

@media (max-width: 699px) {
  /* Reserve the flag row for Close before the title and bilingual description. */
  body.play-screen #language-picker .language-picker-heading h2 {
    margin-top: 16px;
    font-size: 24px;
    line-height: 1.15;
  }
  body.play-screen #language-picker .language-picker-scroll {
    scrollbar-width: thin;
    scrollbar-color: #ad7fbc #fff0df;
  }

  /* The profile step uses the same house crest as its desktop presentation. */
  body.play-screen #onboarding[data-onboarding=profile] .onboarding-top {
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }
  body.play-screen #onboarding[data-onboarding=profile] .onboarding-top strong {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex: 1;
    min-width: 0;
    min-height: 72px;
    padding: 0 8px 13px;
    border: 0;
    border-image: none;
    background: var(--profile-heading) center / 100% 100% no-repeat;
    box-shadow: none;
    color: var(--ui-ink);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.1;
  }
  body.play-screen #onboarding[data-onboarding=profile] .onboarding-top > span {
    flex: none;
    padding: 8px;
    border: 3px solid transparent;
    border-image: var(--onboarding-secondary-choice) 7 fill / 8px stretch;
    color: var(--ui-ink);
    font-weight: 800;
  }
  body.play-screen #onboarding[data-onboarding=profile] .onboarding-prompt {
    color: var(--ui-ink);
    font-weight: 800;
  }
  body.play-screen #onboarding[data-onboarding=profile] h2 + p {
    color: #8b5b88;
  }
  body.play-screen #onboarding[data-onboarding=profile] .onboarding-options label {
    font-size: 16px;
    color: var(--ui-ink);
  }
  body.play-screen #panel.settings-panel .settings-reset-confirm .row-actions {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
  }
  body.play-screen #panel.settings-panel .settings-reset-confirm button {
    padding-inline: 6px;
    white-space: normal;
  }
}

@media (min-width: 700px) and (max-height: 520px) {
  body.play-screen #onboarding[data-onboarding=profile] .row-actions button {
    min-width: 44px;
    min-height: 44px;
    font-size: 16px;
    line-height: 1.2;
  }
}
