.beginner-meaning {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.meaning-word {
  display: flex;
  gap: 20px;
  align-items: center;
}
.meaning-word > span,
.meaning-context-note {
  color: var(--muted, #6b725f);
}
.meaning-word .order-character {
  font-size: 64px;
  line-height: 1.2;
}
.conversation-reference {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: min(620px, 100%);
}
.conversation-person {
  position: relative;
  text-align: center;
  width: 115px;
}
.conversation-person svg {
  width: 88px;
  height: 88px;
  display: block;
  margin: auto;
}
.conversation-person span {
  font-size: 14px;
  white-space: nowrap;
}
.conversation-person.is-speaking:before {
  content: '•••';
  position: absolute;
  top: -5px;
  right: -4px;
  background: #fff8e6;
  border: 2px solid #a2b18e;
  border-radius: 18px;
  padding: 0 8px;
  color: #55795c;
}
.conversation-arrow {
  font-size: 32px;
  color: #78936d;
}
.conversation-person.third-person {
  margin-left: 24px;
}
.meaning-reference {
  display: flex;
  align-items: center;
  gap: 12px;
}
.meaning-reference svg {
  width: 92px;
  height: 92px;
}
.beginner-picture-options {
  width: min(680px, 100%);
  margin: auto;
  gap: 18px;
}
.beginner-picture-options .picture-option {
  min-height: 150px;
  padding: 12px;
}
.beginner-picture-options svg {
  width: 136px;
  height: 136px;
  max-width: 100%;
}
.direction-mini {
  width: 145px;
  height: 130px;
  position: relative;
}
.direction-mini .art {
  position: absolute;
  width: 60px;
  height: 60px;
}
.direction-mini .direction-speaker {
  top: 12px;
  left: 0;
}
.direction-mini .direction-house {
  top: 12px;
  right: 0;
}
.direction-mini.speaker-right .direction-speaker {
  left: auto;
  right: 0;
}
.direction-mini.speaker-right .direction-house {
  right: auto;
  left: 0;
}
.direction-mini .direction-car {
  bottom: 0;
  left: 40px;
}
.direction-movement {
  position: absolute;
  bottom: 40px;
  left: 53px;
  font-size: 30px;
  color: #6b8b65;
}
.direction-movement.to-left {
  transform: rotate(180deg);
}
.beginner-unit {
  display: block;
  color: #727c60;
  font-size: 13px;
  margin-bottom: 6px;
}
.beginner-story-picture {
  width: 100%;
  max-height: 320px;
}
.beginner-reading {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 26px;
  align-items: center;
  width: 100%;
}
.beginner-story-copy {
  display: grid;
  gap: 16px;
}
.beginner-story-copy .story-text {
  font-size: clamp(22px, 2.1vw, 31px);
  line-height: 1.8;
}
.beginner-story-copy .button {
  justify-self: start;
}
.beginner-story-copy .story-text button {
  font: inherit;
  color: inherit;
  padding: 0 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.beginner-story-copy .story-text button:focus-visible {
  outline: 3px solid #c1a061;
  outline-offset: 3px;
}
.meaning-context-sentence {
  font-size: 28px;
  line-height: 1.35;
  margin: 0;
}
.beginner-meaning:has(.meaning-context-sentence) .meaning-word {
  display: none;
}
@media (min-width: 900px) and (max-height: 850px) {
  .conversation-person svg {
    width: 64px;
    height: 64px;
  }
  .beginner-picture-options .picture-option {
    min-height: 110px;
    padding: 8px;
  }
  .beginner-picture-options svg {
    width: 100px;
    height: 100px;
  }
  .beginner-meaning {
    gap: 8px;
  }
  .meaning-word .order-character {
    font-size: 50px;
  }
  .meaning-reference svg {
    width: 65px;
    height: 65px;
  }
  .beginner-story-picture {
    max-height: 260px;
  }
  .beginner-story-copy .story-text {
    font-size: 24px;
    line-height: 1.65;
  }
}
@media (min-width: 900px) and (max-height: 740px) {
  .beginner-meaning {
    gap: 6px;
  }
  .meaning-word .order-character {
    font-size: 36px;
    line-height: 1.1;
  }
  .conversation-person svg {
    width: 46px;
    height: 46px;
  }
  .conversation-person span {
    font-size: 12px;
    line-height: 1.3;
  }
  .conversation-person {
    line-height: 1.3;
  }
  .beginner-picture-options .picture-option {
    height: 104px;
    min-height: 104px;
    padding: 4px;
    display: grid;
    place-items: center;
    line-height: 1;
  }
  .beginner-picture-options svg.art,
  .beginner-picture-options > button > svg {
    width: 90px;
    height: 90px;
    max-height: 90px;
    display: block;
  }
  .meaning-reference svg {
    width: 48px;
    height: 48px;
  }
  .meaning-context-sentence {
    font-size: 25px;
    line-height: 1.25;
  }
  .beginner-story-copy .story-text {
    font-size: 22px;
    line-height: 1.6;
  }
}
/* Give the longer R21–R50 narratives more line width on a short landscape screen.
   Preserve readable text and touch controls; no clipping or hidden overflow. */
@media (min-width: 900px) and (max-height: 760px) {
  .literacy-reading {
    grid-template-columns: minmax(170px, 0.65fr) minmax(0, 1.35fr);
    gap: 18px;
  }
  .literacy-reading .beginner-story-picture {
    max-height: 230px;
  }
  .literacy-reading .beginner-story-copy {
    gap: 8px;
  }
  .literacy-reading .known-reading {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
  }
}
@media (max-width: 700px) {
  .beginner-reading {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .beginner-story-picture {
    max-height: 220px;
  }
  .beginner-story-copy .story-text {
    font-size: 24px;
  }
  .conversation-reference {
    gap: 8px;
  }
  .conversation-person {
    width: 82px;
  }
  .conversation-person svg {
    width: 70px;
    height: 70px;
  }
  .conversation-person.third-person {
    margin-left: 5px;
  }
  .conversation-person span {
    font-size: 12px;
  }
  .beginner-picture-options {
    gap: 8px;
  }
  .beginner-picture-options .picture-option {
    min-height: 108px;
    padding: 6px;
  }
  .beginner-picture-options svg {
    width: 94px;
    height: 94px;
  }
  .direction-mini {
    transform: scale(0.72);
    transform-origin: center;
    width: 115px;
  }
  .meaning-word .order-character {
    font-size: 56px;
  }
}
/* Direction cards keep reference speaker, route arrow and car visually separate. */
.beginner-picture-options .direction-mini {
  width: 130px;
  height: 96px;
  max-width: 100%;
  transform: none;
}
.beginner-picture-options .direction-mini .art {
  width: 43px;
  height: 43px;
  max-height: 43px;
  display: block;
}
.direction-mini .direction-speaker,
.direction-mini .direction-house {
  top: 0;
}
.direction-mini .direction-car {
  left: 42px;
  bottom: 0;
}
.direction-mini .direction-movement {
  bottom: 38px;
  left: 50px;
  font-size: 25px;
  line-height: 1;
}
.direction-mini.speaker-right .direction-speaker {
  left: auto;
  right: 0;
}
.direction-mini.speaker-right .direction-house {
  right: auto;
  left: 0;
}
@media (max-width: 700px) {
  .beginner-picture-options .direction-mini {
    width: 92px;
    height: 87px;
  }
  .beginner-picture-options .direction-mini .art {
    width: 34px;
    height: 34px;
    max-height: 34px;
  }
  .direction-mini .direction-car {
    left: 29px;
  }
  .direction-mini .direction-movement {
    left: 35px;
    bottom: 32px;
    font-size: 22px;
  }
}
