/* Scoped to the core-lesson photographs and their viewer. */
.lesson-photo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 18px;align-items:start;container-type:inline-size}
.lesson-photo-grid.lesson-photo-single{grid-template-columns:minmax(0,1fr);max-width:560px}
.lesson-photo{margin:0!important;min-width:0;border:1px solid #39434b;border-radius:9px;overflow:hidden;background:#1b2026;box-shadow:0 3px 12px #0002}
.lesson-photo-open{position:relative;display:grid;place-items:center;width:100%;height:clamp(145px,26cqi,240px);padding:0!important;border:0!important;border-radius:0!important;background:#101316!important;overflow:hidden;cursor:zoom-in}
.lesson-photo-open img{display:block;width:100%;height:100%;object-fit:contain;min-height:0;max-height:100%}
.lesson-photo-single .lesson-photo-open{height:clamp(165px,50cqi,270px)}
.lesson-photo-zoom{position:absolute;right:7px;bottom:7px;padding:3px 6px;border-radius:4px;background:#111c;color:#fff;font-size:10px;line-height:1.4;pointer-events:none}
.lesson-photo figcaption{padding:9px 10px 10px}
.lesson-photo figcaption strong{display:block;color:#edf0f3;font-size:13px;line-height:1.4}
.lesson-photo figcaption p{margin:4px 0 5px!important;font-size:12px;line-height:1.65;color:#bac5d0;overflow-wrap:anywhere}
.lesson-photo-source{font-size:10px!important;line-height:1.5;color:#93a9ba!important;text-decoration:none}
.lesson-photo-source:hover{text-decoration:underline}
.lesson-photo-open:focus-visible,.lesson-photo-dialog button:focus-visible{outline:2px solid #9bc9e9!important;outline-offset:-3px}
.lesson-photo-dialog{width:min(960px,calc(100vw - 24px));max-width:none;height:min(820px,calc(100dvh - 28px));max-height:calc(100dvh - 28px);padding:0;border:1px solid #58636f;border-radius:12px;background:#15191e;color:#edf0f3;box-shadow:0 24px 80px #0009;overflow:hidden}
.lesson-photo-dialog[open]{display:flex;flex-direction:column}
.lesson-photo-dialog::backdrop{background:#05080dd9}
.lesson-photo-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding:8px 12px;border-bottom:1px solid #323a43}
.lesson-photo-dialog-head h2{margin:0!important;font-size:16px;line-height:1.4}
.lesson-photo-dialog button{min-width:40px;min-height:40px;padding:6px 10px;border:1px solid #39444e;border-radius:7px;background:#252d35;color:inherit;cursor:pointer;font:inherit}
.lesson-photo-dialog button:disabled{opacity:.35;cursor:default}
.lesson-photo-dialog .lesson-photo-close{font-size:24px;line-height:1}
.lesson-photo-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:8px;background:#0c0e11;overflow:hidden}
.lesson-photo-stage img{width:100%;height:100%;min-height:0;object-fit:contain}
.lesson-photo-dialog-foot{flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 14px;padding:10px 14px;max-height:38%;overflow:auto;border-top:1px solid #323a43}
.lesson-photo-dialog-foot>p{grid-column:1;margin:0;font-size:13px;line-height:1.6}
.lesson-photo-dialog-foot>span{grid-column:1}
.lesson-photo-navigation{grid-column:2;grid-row:1/3;align-self:center;display:flex;align-items:center;gap:9px}
.lesson-photo-navigation span{min-width:48px;text-align:center;font-size:12px;color:#b6c8d6;font-variant-numeric:tabular-nums}
.lesson-photo-error{padding:14px;font-size:12px;line-height:1.6;color:#bdc9d2}
.lesson-photo-open [hidden],.lesson-photo-stage [hidden]{display:none!important}
@media(max-width:560px){.lesson-photo-dialog{width:calc(100vw - 16px);height:calc(100dvh - 20px);max-height:calc(100dvh - 20px)}.lesson-photo-dialog-foot{grid-template-columns:1fr;padding:8px 10px}.lesson-photo-navigation{grid-column:1;grid-row:auto;justify-self:end}.lesson-photo-grid{gap:8px}.lesson-photo figcaption{padding:8px}.lesson-photo figcaption p{font-size:11px}.lesson-photo figcaption strong{font-size:12px}}
@media(prefers-reduced-motion:no-preference){.lesson-photo-open img{transition:filter .15s}.lesson-photo-open:hover img{filter:brightness(1.08)}}
