/* Reserve the illustration's space while its SVG is being lazy-loaded. */
#motion-scene:empty, #motion-scene[aria-busy="true"] {
  box-sizing: content-box;
  aspect-ratio: 320 / 164;
  max-height: 244px;
}
.word-stage-art {
  --stage-sky: #fbf7e9;
  --stage-distant: #e3e6d7;
  --stage-field: #d4dfcc;
  --stage-sun: #f2d99b;
  --stage-floor: #f0e7d5;
  --stage-line: #d4caba;
  --stage-water: #d4e5e3;
  --stage-shadow: #c6bba480;
  --stage-light: #f9f0db;
  --stage-plinth: #e7d8bd;
  display: block;
  width: 100%;
  height: auto;
  max-height: 244px;
  margin: 0 auto;
  background: var(--stage-sky);
  color-scheme: light;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: hidden;
}
.word-stage-glyph { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.word-stage-art[data-presentation="usage"] { max-height: 72px; }
.ja-example mark[data-recall-prompt], .study-sentence mark[data-recall-prompt] {
  display: inline-block;
  min-width: 3ch;
  text-align: center;
  border-bottom: 2px dotted currentColor;
}
.motion-scene:has(> .example-recall-toggle) {
  width: fit-content;
  min-height: 0;
  margin-top: 4px;
}
.example-recall-toggle {
  display: block;
  min-height: 40px;
  padding: 5px 12px;
  border: 0;
  color: #354d4b;
  background: #e2ede7;
  font: inherit;
  cursor: pointer;
}
@media (pointer: coarse) { .example-recall-toggle { min-height: 44px; } }
.word-stage-art .word-stage-night {
  --stage-sky: #a6b3c9;
  --stage-distant: #8496af;
  --stage-field: #8d9da9;
  --stage-floor: #b9bfca;
  --stage-line: #8a98aa;
  --stage-water: #8fa5b7;
}
:root[data-theme="space"] .word-stage-art {
  --stage-sky: #e9eaf4;
  --stage-distant: #d2d9e8;
  --stage-field: #c4d3d9;
  --stage-sun: #f7deab;
  --stage-floor: #dedbe5;
  --stage-line: #bdc2d3;
  --stage-water: #cadce8;
  --stage-shadow: #a7a5bf80;
  --stage-light: #efecf3;
  --stage-plinth: #d1cbdc;
}

.word-stage-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-top: 1px solid #ded7c8;
  background: #f7f3e9;
}
.word-stage-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 32px;
  padding: 3px 8px;
  font: inherit;
  font-size: 12px;
  color: #4d594f;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}
.word-stage-controls button:hover, .word-stage-controls button:focus-visible { background: #e9e4d6; }
.word-stage-controls button::before { font: 16px/1 system-ui, sans-serif; }
.word-stage-controls [data-action="pause"]::before { content: "Ⅱ"; }
.word-stage-controls [data-action="play"]::before { content: "▶"; font-size: 10px; }
.word-stage-controls [data-action="replay"]::before { content: "↻"; font-size: 16px; }
:root[data-theme="space"] .word-stage-art { --stage-card: #fcf9f2; }
:root[data-theme="space"] .word-stage-controls { background: #eaeaf2; border-color: #c9cbd7; }
:root[data-theme="space"] .word-stage-controls button { color: #434c65; }
:root[data-theme="space"] .word-stage-controls button:hover,
:root[data-theme="space"] .word-stage-controls button:focus-visible { background: #d9dce7; }
@media (pointer: coarse) { .word-stage-controls button { min-width: 44px; min-height: 44px; } }
