:root {
  color-scheme: light;
  color: #172c26;
  background: #f5f2eb;
  font: 1rem/1.55 system-ui, sans-serif;
  --ink: #172c26;
  --green: #244c3c;
  --cream: #fffcf5;
  --line: #d9d4c8;
}
* { box-sizing: border-box; }
body { margin: 0; }
.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.mast { color: var(--cream); background: #17362d; }
.mast a, .mast a:visited { display: inline-flex; align-items: center; gap: .75rem; min-height: 3.5rem; color: inherit; }
.mast span { font: 600 1.22rem/1.25 Georgia, serif; }
h1, h2, p, figure { margin: 0; }
h1 { margin-top: clamp(1.75rem, 5vw, 3.35rem); font: 600 clamp(2.55rem, 6vw, 4.85rem)/1 Georgia, serif; letter-spacing: -.035em; }
.intro { margin: .9rem 0 1.45rem; max-width: 43rem; color: #40544a; }
.player { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 1fr); align-items: center; gap: .4rem 1.25rem; position: sticky; top: .5rem; z-index: 2; padding: .9rem 1.15rem; border-radius: .85rem; background: #19392f; color: #fffaf0; box-shadow: 0 5px 25px #1c352c24; }
.player-label { color: #d9e6b1; font-weight: 700; font-size: .85rem; }
.player h2 { margin-top: .12rem; font: 600 clamp(1.13rem, 2.4vw, 1.55rem)/1.2 Georgia, serif; }
audio { display: block; width: 100%; height: 48px; }
#player-message { grid-column: 1 / -1; }
#player-message:empty { display: none; }
.stories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.4rem 0; padding: 0; list-style: none; }
.story { display: grid; grid-template-columns: minmax(0, 30%) minmax(0, 1fr); gap: clamp(.7rem, 1.7vw, 1.2rem); padding: .75rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--cream); }
.story[data-active] { border-color: #52735f; box-shadow: inset 0 0 0 1px #52735f; }
.art { display: block; width: 100%; min-width: 0; height: auto; aspect-ratio: 1; border-radius: .45rem; background-color: #324941; object-fit: cover; }
.story-copy { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; padding: .18rem .2rem .12rem 0; }
.story h2 { font: 700 clamp(1.3rem, 2.1vw, 1.7rem)/1.17 Georgia, serif; }
.story-copy p { font-size: .96rem; color: #3c4e45; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .9rem; margin-top: auto; }
a, a:visited { color: var(--green); text-underline-offset: .18em; }
.play, .play:visited { display: inline-flex; align-items: center; gap: .5rem; min-width: 6.5rem; min-height: 44px; padding: .48rem .85rem; border-radius: .45rem; color: white; background: var(--green); font-weight: 730; text-decoration: none; }
.play:hover { background: #16362a; }
.read { display: inline-flex; align-items: center; min-height: 44px; font-weight: 660; font-size: .92rem; }
figcaption { margin-top: .4rem; font-size: .76rem; color: #40544a; }
footer { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .65rem; padding: 1rem 0 2rem; border-top: 1px solid var(--line); font-size: .89rem; color: #40544a; }
:focus-visible { outline: 3px solid #2c70b0; outline-offset: 3px; }
.mast :focus-visible, .player :focus-visible { outline-color: #f8dd91; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 54rem) { .stories { grid-template-columns: 1fr; } }
@media (max-width: 40rem) {
  .player { grid-template-columns: minmax(0, 1fr); padding: .7rem .8rem; }
  .story { grid-template-columns: minmax(0, 32%) minmax(0, 1fr); }
}

.room-links, .room-languages, .player-nav, .player-links { display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.room-links { justify-content: space-between; align-items: center; }
.room-links a, .room-languages a, .player-nav a, .player-links a, .shelf-bar a { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; font-weight: 650; }
.room-languages { gap: .3rem .45rem; margin-bottom: 1rem; }
.room-languages a { padding-inline: .65rem; border-radius: .4rem; }
.room-languages a[aria-current='page'] { background: #e2eadc; text-decoration: none; }
.player { position: relative; top: auto; z-index: auto; scroll-margin-top: .5rem; }
.player-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.player-nav a, .player-nav a:visited, .player-links a, .player-links a:visited { color: #fffaf0; font-size: .93rem; }
.player-nav a { justify-content: center; padding: .3rem .5rem; border: 1px solid #92a698; border-radius: .4rem; text-align: center; line-height: 1.2; }
.player-nav a[aria-disabled='true'] { opacity: .6; text-decoration: none; border-style: dashed; }
.player-links { justify-content: flex-end; column-gap: 1.2rem; }
.story-shelf { margin: 1.2rem 0; scroll-margin-top: .25rem; }
.shelf-bar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .25rem .2rem; border-bottom: 1px solid var(--line); background: #f5f2eb; }
.shelf-bar h2 { font: 650 clamp(1.12rem, 2.6vw, 1.5rem)/1.2 Georgia, serif; }
.shelf-bar a { justify-content: flex-end; text-align: end; }
.stories { margin: .8rem 0 0; }
.story, .story a { scroll-margin-top: 4.75rem; }
.story figure { min-width: 0; overflow-wrap: anywhere; }
.story figcaption a[href*='creativecommons.org'] { white-space: nowrap; }
footer p { margin-inline-start: auto; }
@media (max-width: 40rem) {
  .player-links { justify-content: space-between; gap: .2rem .6rem; }
}
@media (max-height: 26rem) {
  .shelf-bar { position: static; }
  .story, .story a { scroll-margin-top: .5rem; }
}

.room-narration { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; }
.room-narration [hidden] { display: none; }
.room-source {
  min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .65rem;
  overflow: clip; overflow-clip-margin: 6px;
}
.room-source label, .room-recording-name { font-size: .875rem; font-weight: 650; }
.room-source select, .room-speech-toggle {
  font: inherit;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid #9fb4a6;
  border-radius: .45rem;
  color: #19392f;
  background: #fffcf5;
}
.room-source select { min-width: 0; flex: 1 1 12rem; padding: .3rem .5rem; text-overflow: ellipsis; }
.room-source select:focus-visible { outline: 3px solid #244c3c; outline-offset: -4px; }
.room-speech-toggle { width: 100%; padding: .45rem .75rem; font-weight: 700; }
.room-voice-note { font-size: .82rem; color: #e4eadf; overflow-wrap: anywhere; }
.room-voice-note:empty { display: none; }
