/* Keep the owned pixel frames; size their content independently of world zoom. */
body.play-screen #placement-keyboard summary {
  min-height: 44px;
  align-content: center;
  padding: 10px 18px;
}
body.play-screen #placement-keyboard :is(select, button) {
  min-width: 44px;
  min-height: 44px;
}
body.play-screen #placement-keyboard .placement-options {
  flex-wrap: wrap;
}
body.play-screen :is(#world-word-card button, #placement-controls button, #placement-keyboard summary, #placement-keyboard select, .level-up-panel > button):focus-visible {
  outline: 3px solid #70428c;
  outline-offset: 2px;
}
@media (max-width: 699px) {
  body.play-screen #toasts {
    inset-block-start: max(146px, calc(var(--hud-content-clearance, 90px) + 52px));
  }
  body.play-screen #toasts .toast[data-variant=streak-protected] {
    padding-top: 40px;
    padding-bottom: 18px;
    line-height: 1.4;
  }
  body.play-screen #toasts .toast[data-variant=streak-protected]::before {
    top: calc(50% + 10px);
  }
  body.play-screen .level-up-panel {
    padding-inline: 16px;
    padding-bottom: 20px;
  }
  body.play-screen .level-up-grid,
  body.play-screen .level-up-grid:has(> article:nth-child(5)):not(:has(> article:nth-child(6))) {
    width: 100%;
    gap: 6px;
    padding: 18px 4px 10px;
  }
  body.play-screen .level-up-grid article,
  body.play-screen .level-up-grid article:nth-last-child(-n+2) {
    width: calc((100% - 12px) / 3);
    min-height: 88px;
    padding: 6px 2px;
  }
  body.play-screen .level-up-grid canvas {
    width: 56px;
    height: 56px;
    max-width: 100%;
  }
  body.play-screen .level-up-grid strong {
    font-size: 13px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  body.play-screen #world-word-card .world-card-scroll {
    scrollbar-gutter: stable;
  }
  body.play-screen #placement-instruction {
    font-size: 14px;
    line-height: 1.35;
  }
  body.play-screen #placement-keyboard {
    width: 100%;
    padding: 8px 12px;
  }
  body.play-screen #placement-keyboard .placement-options {
    gap: 8px;
  }
  body.play-screen #placement-tile {
    flex: 1 1 140px;
    max-width: 100%;
  }
}
@media (min-width: 700px) and (max-width: 1200px),
       (min-width: 700px) and (max-height: 750px) {
  /* The readable font floor needs crest clearance after text wraps. */
  body.play-screen #toasts .toast[data-variant=streak-protected] {
    background: none;
    border: solid transparent;
    border-width: 40px 16px 12px;
    border-image: var(--notice-blank-capsule) 38% 7% 12% fill stretch;
    padding: 4px 4px 4px max(24px, calc(32 * var(--du) + 10px));
  }
  body.play-screen #toasts .toast[data-variant=streak-protected]::before {
    left: 2px;
    top: 50%;
  }
}
@media (max-height: 500px) and (min-width: 700px) {
  body.play-screen #world-word-card {
    --du: .8px;
    --word-card-bottom: 12px;
    --word-card-padding-block: 16px;
    padding: 16px 28px;
    left: 50%;
    width: min(550px, calc(100vw - 24px));
  }
  body.play-screen #placement-controls {
    max-height: calc(100dvh - var(--placement-top) - 8px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.play-screen :is(#world-word-card, #placement-controls, #toasts .toast, .level-up-view, .level-up-badge) {
    animation: none;
    transition: none;
  }
}
