.paired-frame {position:relative;min-width:0;container-type:inline-size}
.photo-modes {display:inline-flex;align-items:stretch;gap:2px;position:absolute;inset:8px auto auto 8px;z-index:2;padding:2px;margin:0;max-width:calc(100% - 16px);border:1px solid #ad9e80;border-radius:3px;background:#f8f2e5;box-shadow:0 2px 7px #241a111f}
.photo-modes button {min-height:30px;padding:3px 9px;border:0;border-radius:1px;background:transparent;color:#393226;font:600 .77rem/1.25 var(--sans);white-space:nowrap;cursor:pointer}
.photo-modes button[aria-pressed=true] {background:#40382a;color:#fff7e6}
.photo-modes button:focus-visible {outline:2px solid #803c2c;outline-offset:1px}
.photo-modes[hidden],.paired-frame img[hidden] {display:none!important}
.paired-frame .enlarge {overflow:hidden}
.paired-frame .enlarge img:not([hidden]) {display:block;object-fit:contain;margin:auto}
.filmstrip .paired-frame .enlarge,.chapter-strips .paired-frame .enlarge,.restoration .paired-frame .enlarge {background:#ece5d8}
.filmstrip .paired-frame .enlarge img,.restoration .paired-frame .enlarge img {width:100%;height:100%}
.project-photos .paired-frame .enlarge {background:transparent}
.project-photos .paired-frame .enlarge img {width:100%;height:auto;max-height:70vh}
.inset-plate .paired-frame .enlarge img {max-height:380px;object-fit:contain}
.field-spread .plate[data-paired-photo] {width:100%}
.field-spread .paired-frame .enlarge img {width:100%;height:auto;max-height:510px;object-fit:contain}
.field-close {clear:both}
#photo-viewer {position:fixed}
#photo-viewer>.photo-modes {position:static;float:left;margin:6px 12px 5px 0;box-shadow:none}
#photo-viewer>.photo-modes:not([hidden])~.viewer-tools {min-height:42px}
#photo-viewer>img {clear:both}
@container(max-width:205px) {
 .photo-modes {inset:5px auto auto 5px;padding:1px;max-width:calc(100% - 10px)}
 .photo-modes button {padding:3px 5px;font-size:.69rem;min-height:27px}
}
@container(max-width:125px) {
 .photo-modes {flex-direction:column;align-items:stretch}
 .photo-modes button {min-height:23px}
}
@media(max-width:700px) {
 .photo-modes {inset:6px auto auto 6px}
 .photo-modes button {padding:3px 6px;font-size:.73rem}
}
