.muted { color: var(--sol-base1); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.grid .card { display: block; color: inherit; padding: 1rem; text-decoration: none; }
.meta { font-size: .9rem; }
.status { padding: .75rem 1rem; background: #f2f4e2; border-radius: .5rem; }
.errors { padding: .75rem 1rem; background: #fbeae9; color: var(--sol-red); border-radius: .5rem; }
.markdown { max-width: 78ch; padding: 1.5rem; border-radius: .75rem; background: var(--sepia-surface); line-height: 1.7; }
.markdown pre { overflow-x: auto; padding: 1rem; background: var(--sepia-panel); }
.markdown img { max-width: 100%; }
audio, video, img.preview { max-width: 100%; }
img.preview { max-height: 70vh; object-fit: contain; background: #000; }
#story-pane > .container-fluid { max-width: 1500px; }
.chapter { margin-bottom: .75rem; border: 1px solid var(--sepia-border); border-radius: .75rem; background: var(--sepia-surface); box-shadow: 0 1px 2px rgba(88, 110, 117, .06); transition: box-shadow .15s ease, border-color .15s ease; }
.chapter:hover { border-color: #ddd3b8; box-shadow: 0 2px 8px rgba(88, 110, 117, .08); }
.chapter > summary { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.1rem; cursor: pointer; list-style: none; border-radius: .75rem; }
.chapter > summary::-webkit-details-marker { display: none; }
.chapter > summary:focus-visible { outline: 2px solid rgba(38, 139, 210, .5); outline-offset: 2px; }
.chapter[open] > summary { border-bottom: 1px solid var(--sepia-border-soft); border-radius: .75rem .75rem 0 0; background: var(--sepia-main); }
.chapter-number { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--sepia-panel); color: var(--sol-base00); font-weight: 600; font-variant-numeric: tabular-nums; }
.chapter[open] .chapter-number { background: var(--sol-blue); color: #fff; }
.chapter-heading { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.chapter-name { font-size: 1.05rem; font-weight: 600; color: var(--sol-base02); line-height: 1.3; }
.chapter-meta { font-size: .78rem; color: var(--sol-base1); }
.chapter-reflected { color: var(--sol-green, #859900); border-color: currentColor; }
.chapter-read { flex-shrink: 0; font-size: .78rem; opacity: 0; transition: opacity .15s ease; }
.chapter > summary:hover .chapter-read, .chapter[open] .chapter-read, .chapter-read:focus-visible { opacity: 1; }
.chapter-chevron { flex-shrink: 0; color: var(--sol-base1); transition: transform .2s ease; }
.chapter[open] .chapter-chevron { transform: rotate(180deg); }
.chapter-body { padding: 1.25rem 1.5rem 1.5rem 1.1rem; }
@media (hover: none) { .chapter-read { opacity: 1; } }

.story-prose { margin-bottom: 1rem; padding: .15rem .35rem; border-radius: .4rem; font-size: var(--prose-size, 1.02rem); line-height: 1.7; color: var(--sol-base01); transition: background-color .2s ease; }
.story-prose:last-child { margin-bottom: 0; }
.story-prose p { margin: 0 0 .6rem; max-width: none; }
.story-prose p:last-child { margin-bottom: 0; }
.story-prose .speaker { font-weight: 600; color: var(--sol-base02); }
.story-prose .music-cue { display: inline-block; padding: .05rem .55rem; border-radius: 50rem; background: var(--sepia-panel); color: var(--sol-violet); font-size: .72em; letter-spacing: .03em; }
.story-prose .music-cue-broken { color: var(--sol-red); }
.story-prose .music-cue-problem { color: var(--sol-red); font-size: .72em; }
.story-prose .speaker.teller { display: inline-block; margin-right: .15rem; padding: .05rem .45rem; border-radius: 50rem; background: var(--sepia-panel); color: var(--sol-cyan); font-size: .68em; letter-spacing: .06em; text-transform: uppercase; vertical-align: .12em; }
.story-prose .action { color: var(--sol-base00); font-style: italic; }
.story-prose .thought { color: var(--sol-cyan); font-style: italic; font-weight: 600; }
.story-prose.reading-now { background: rgba(181, 137, 0, .12); box-shadow: 0 0 0 .3rem rgba(181, 137, 0, .12); }
.story-row { border-radius: .5rem; }
.story-row.reader-picked { outline: 2px dashed rgba(38, 139, 210, .45); outline-offset: .5rem; }
.story-row .line-play { margin-top: .3rem; padding: 0 .25rem; border: 0; background: none; color: var(--sol-base1); font-size: .7rem; opacity: 0; transition: opacity .15s ease; }
.story-prose:hover .line-play, .story-row .line-play:focus-visible, .story-row .line-play.is-playing { opacity: .8; }
.story-row .line-play:hover { color: var(--sol-blue); opacity: 1; }
.story-row .line-tools { gap: .1rem; }
.story-row .line-tools .line-play { margin-top: 0; }
.story-row .line-tools .line-play:first-child { margin-top: .3rem; }
@media (hover: none) { .story-row .line-play { opacity: .6; } }
.reader-bar { position: sticky; bottom: .5rem; z-index: 5; max-width: none; box-shadow: 0 4px 16px rgba(88, 110, 117, .12); backdrop-filter: blur(6px); }
.voice-row { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(12rem, 2fr) minmax(10rem, 1fr) 4.5rem 1.25rem 1.25rem; gap: .75rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--sepia-border-soft); }
@media (max-width: 767.98px) { .voice-row { grid-template-columns: 1fr; } }
@media (min-width: 1200px) { .voice-library { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; } }
.voice-library-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.song-analysis h2 { font-size: .95rem; font-weight: 600; color: var(--sol-base02); margin: 1.1rem 0 .35rem; }
.song-analysis h2:first-child { margin-top: 0; }
.song-analysis ul, .song-analysis ol { padding-left: 1.1rem; margin-bottom: .5rem; }
.song-analysis p { margin-bottom: .5rem; }
.story-prose.fix-picked { background: rgba(211, 54, 130, .1); box-shadow: 0 0 0 .3rem rgba(211, 54, 130, .1); border-radius: .2rem; }
.reader-dock { position: sticky; bottom: .5rem; z-index: 5; }
.reader-dock .reader-bar { position: static; }
.chunk-break { border: 1px dashed rgba(108, 113, 196, .55); background: rgba(108, 113, 196, .07); color: var(--sol-violet, #6c71c4); }
.outline-card { margin-bottom: 1rem; padding: 1rem 1.25rem 1.1rem; border: 1px solid var(--sepia-border); border-radius: .75rem; background: var(--sepia-surface); box-shadow: 0 1px 2px rgba(88, 110, 117, .06); scroll-margin-top: 1rem; }
.outline-card:target { border-color: var(--sol-blue); }
.outline-summary { color: var(--sol-base01); line-height: 1.6; max-width: none; }
.outline-label { margin-bottom: .25rem; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sol-base00); }
.outline-checks { padding: .6rem .85rem; border-left: 3px solid var(--sol-yellow); border-radius: .4rem; background: rgba(181, 137, 0, .09); font-size: .875rem; }
.outline-checks ul, .outline-card ul { padding-left: 1.1rem; }
.outline-checks li { margin-bottom: .2rem; }
.outline-stale { color: var(--sol-orange); }
.outline-scene { padding: .55rem 0 .55rem .85rem; border-left: 2px solid var(--sepia-border); scroll-margin-top: 1rem; }
.outline-scene + .outline-scene { margin-top: .35rem; }
.outline-scene:target { border-left-color: var(--sol-blue); }
.outline-scene-title { font-size: .85rem; font-weight: 600; color: var(--sol-base02); }
.pov-bar { display: flex; height: .7rem; overflow: hidden; border-radius: 50rem; background: var(--sepia-panel); }
.pov-bar > span { display: block; height: 100%; }
.pov-dot { display: inline-block; width: .6rem; height: .6rem; margin-right: .3rem; border-radius: 50%; }
.pov-sam { background: var(--sol-blue); }
.pov-jr { background: var(--sol-green); }
.pov-mila { background: var(--sol-magenta); }
.pov-other { background: var(--sol-base1); }

/* Instructions page */
.instructions-contents { position: sticky; top: 1rem; max-height: calc(100vh - 8rem); overflow-y: auto; display: flex; flex-direction: column; gap: .1rem; }
.instructions-link { display: block; padding: .25rem .6rem; border-radius: .4rem; font-size: .875rem; font-weight: 600; color: inherit; text-decoration: none; }
.instructions-link:hover { background: rgba(0, 0, 0, .06); }
.instructions-sublink { padding-left: 1.4rem; font-weight: 400; font-size: .8125rem; opacity: .8; }
.instructions-section { scroll-margin-top: 1rem; }
.instructions-part { font-size: .95rem; font-weight: 700; margin: 1.25rem 0 .5rem; padding-top: .9rem; border-top: 1px solid rgba(0, 0, 0, .08); scroll-margin-top: 1rem; }
.instructions-body { max-width: 85ch; line-height: 1.65; font-size: .925rem; }
.instructions-body > :last-child { margin-bottom: 0; }
.instructions-body li { margin-bottom: .35rem; }
.instructions-body pre { overflow-x: auto; padding: .75rem 1rem; border-radius: .5rem; background: rgba(0, 0, 0, .05); font-size: .8125rem; }
.instructions-body code { font-size: .85em; }

/* Song page */
.song-section { padding: .75rem 0; border-top: 1px solid rgba(0, 0, 0, .08); }
.song-section:last-child { padding-bottom: 0; }
