[hidden] { display: none !important; }
.reading-story { max-width: 840px; }
.reading-story h1 { margin-top: 18px; }
.story-card {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(14px, 3vw, 26px);
}
.story-card p { margin: 0 0 .85rem; line-height: 1.5; }
.story-art { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 16px; background: #e7f2eb; }
.story-controls { display: grid; gap: 8px; margin-block: 12px; }
.story-controls .action { width: fit-content; min-height: 48px; text-align: left; cursor: pointer; border: 0; font: inherit; font-weight: 750; }
.story-choice { display: flex; align-items: center; gap: .65rem; width: 100%; min-height: 52px; padding: 10px 12px; border: 2px solid #ccbce8; border-radius: 14px; background: #f8f2ff; color: #242046; cursor: pointer; font: inherit; text-align: left; }
.story-choice:hover, .story-choice[aria-pressed="true"] { border-color: #5934a2; background: #e9dcff; }
.story-choice span { font-size: 1.4rem; }
.story-feedback:not(:empty) { padding: .65rem .8rem; border-radius: 12px; background: #e4f3e9; }
.story-feedback[data-retry="true"] { background: #fff0d9; }
.story-control-link { font-weight: 750; color: #492c85; }
.reading-story summary { cursor: pointer; min-height: 44px; align-content: center; }
.reading-story :is(button, summary):focus-visible { outline: 3px solid #6337b4; outline-offset: 3px; }
.story-card .story-step { margin-bottom: .35rem; color: #625779; }
html[lang="uk"] .story-card :is(p:not(.story-step), .story-choice, .story-controls .action, summary) {
  font-size: clamp(1.25rem, 3vw, 1.375rem);
  line-height: 1.5;
}
.story-narration { margin-block: 12px; }
.story-narration-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.story-narration-buttons button {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  min-height: 56px;
  padding: 8px 14px;
  border: 2px solid #5934a2;
  border-radius: 14px;
  background: #5934a2;
  color: #fff;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 750;
  line-height: 1.35;
  cursor: pointer;
}
.story-narration-buttons [data-audio-repeat] { background: #f8f2ff; color: #492c85; }
.story-narration-time { font-size: .85em; font-variant-numeric: tabular-nums; }
.story-card .story-narration-status { margin: .4rem 0 0; }
.story-card .story-narration-status:empty { margin: 0; }
@media (max-width: 620px) {
  .story-card { grid-template-columns: minmax(0, 1fr); }
  .story-art { width: min(100%, 320px); max-height: 210px; justify-self: center; }
}
@media (max-width: 1200px), (pointer: coarse) {
  html[lang="uk"] .story-card { grid-template-columns: minmax(0, 1fr); }
  html[lang="uk"] .story-art {
    width: min(100%, 480px);
    max-height: none;
    justify-self: center;
  }
}
@media (orientation: landscape) and (max-height: 850px) {
  html[lang="uk"] .story-art { max-width: 400px; }
}
