.scene-reading {width:100%; min-width:0; text-align:start; color:var(--ink);}
.reading-tabs {display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.22fr) minmax(0,.83fr); max-width:390px; padding:3px; gap:2px; border:1px solid #c9d5ca; border-radius:7px; background:#edf2eb;}
.reading-tabs button {min-width:0; min-height:44px; padding:4px 2px; border:0; border-radius:4px; background:transparent; color:#315142; font-family:inherit; font-size:.94rem; font-weight:650; line-height:1.35; white-space:nowrap;}
.reading-tabs button:hover {background:#dde8dc;}
.reading-tabs [aria-selected=true], .reading-tabs [aria-selected=true]:hover {background:#24513e; color:white;}
.reading-panel {padding:14px 0 4px; max-width:68ch; overflow-wrap:break-word; word-break:keep-all;}
.reading-panel[hidden], .reading-panel a[hidden] {display:none;}
.reading-panel strong {display:block; font-size:1.06rem; line-height:1.5; color:#234535;}
.scene-reading .reading-panel p {margin:5px 0 6px; color:#344e40; font-size:1rem; line-height:1.65;}
.reading-panel a {display:inline-block; color:#285c45; font-size:.88rem; font-weight:600; text-decoration:underline; text-underline-offset:3px;}
.reading-tabs button:focus-visible,.reading-panel:focus-visible,.reading-panel a:focus-visible {outline:3px solid #955317; outline-offset:2px;}
#cuesta .cu-reading {max-width:880px;}
#cuesta .cu-reading>h3,.lv-photo .lv-caption .lv-frame-heading {margin-bottom:8px;}
#model .explain {min-width:0;}
@media (min-width:691px) {
  #model .spread {grid-template-areas:"picker picker" "figure notes"; grid-template-columns:minmax(0,1.75fr) minmax(255px,1fr);}
  #model #steps {margin:0 0 10px;}
}
@media (min-width:701px) {
  .lv-photo {grid-template-columns:minmax(0,min(46%,440px)) minmax(0,1fr); gap:0 clamp(6px,2vw,28px);}
}
body.project #model .spread {grid-template-columns:minmax(0,2.5fr) minmax(265px,1fr);}
@media (max-width:690px) {
  body.project #model .spread {grid-template-columns:minmax(0,1fr);}
  .reading-tabs button {font-size:.9rem;}
  .reading-panel {padding-top:10px;}
}

.titlebar { padding:18px 0 12px; align-items:flex-start; }
.titlebar h1 { font-size:clamp(1.8rem,3.4vw,2.8rem); margin-top:0; }
.titlebar .lead { margin-top:3px; }
.classroom-tools { position:relative; flex-shrink:0; }
.classroom-tools summary,.river-related summary { width:fit-content; min-height:44px; padding:10px 4px; color:#365343; font-size:.94rem; font-weight:630; cursor:pointer; }
.classroom-tools .tools { position:absolute; right:0; z-index:5; padding:5px 8px; min-width:134px; background:#fff; border:1px solid #a1b1a4; border-radius:5px; box-shadow:0 6px 16px #25402b1c; }
.classroom-tools .tools button { min-height:44px; width:100%; text-align:left; border:0; white-space:nowrap; }
#model .stagebar { padding:8px 14px; min-height:44px; }
#model .stagebar .light { min-height:44px; }
.river-stage-title { display:flex; align-items:baseline; flex-wrap:wrap; gap:3px 9px; }
.river-stage-title span { font-size:.9rem; color:#45614e; }
.river-stage-title h2 { font-size:clamp(1.16rem,2vw,1.45rem); }
#model .stage .terrain { flex:0 1 auto; min-height:0; }
#model .explain { align-self:start; }
#model .stage { align-self:start; }
@media (max-width:690px) {
 body:not(.on-library):not(.on-cover):not(.on-discovery) .titlebar { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:0 8px; padding:11px 0 5px; align-items:start; }
 body:not(.on-library):not(.on-cover):not(.on-discovery) .titlebar>div:first-child {display:contents;}
 body:not(.on-library):not(.on-cover):not(.on-discovery) .titlebar h1 { grid-area:1 / 1; align-self:center; min-width:0; font-size:clamp(1.64rem,7vw,2rem); }
 body:not(.on-library):not(.on-cover):not(.on-discovery) .titlebar .lead { grid-area:2 / 1 / 3 / -1; margin:0; font-size:1rem; }
 .classroom-tools { grid-area:1 / 2; }
 .structure .classroom-tools .tools button { width:100%; }
 .structure .classroom-tools .tools button span { position:static; clip-path:none; width:auto; height:auto; overflow:visible; }
 #model .stagebar { padding:3px 10px; }
}
