/* Additional isolated styles; existing panorama/photo viewer CSS stays unchanged. */
.galleryEditModal[hidden],.editorMediaInfo[hidden],#editSiteBtn[hidden],#editMediaBtn[hidden]{display:none!important}
.galleryEditModal{position:fixed;inset:0;z-index:100100;display:flex;justify-content:center;align-items:center;padding:14px;box-sizing:border-box}
.galleryEditShade{position:absolute;inset:0;background:#000b}
.galleryEditPanel{position:relative;width:min(760px,100%);max-height:min(90vh,780px);overflow:auto;box-sizing:border-box;border:1px solid #ffffff36;background:#202126;color:#f6f4ef;border-radius:14px;padding:24px;box-shadow:0 20px 70px #0009}
.galleryEditPanelSmall{width:min(540px,100%)}
.galleryEditHeading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.galleryEditHeading h2{font-size:21px;margin:0;font-weight:600}
.galleryEditHeading button{background:none;border:0;color:#eee;font-size:30px;cursor:pointer}
.galleryEditDesc,.galleryEditFilename{color:#b9b7b4;font-size:12px;overflow-wrap:anywhere;margin:8px 0 18px}
.galleryEditForm{display:flex;flex-direction:column;gap:14px}
.galleryEditGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.galleryEditGrid>.full{grid-column:1 / -1}
.galleryEditForm label{display:flex;flex-direction:column;gap:6px;color:#e6e2db;font-size:12px}
.galleryEditForm input,.galleryEditForm textarea{box-sizing:border-box;width:100%;border-radius:7px;border:1px solid #ffffff44;background:#2b2c31;color:white;font-size:15px;padding:11px 12px;font-family:inherit;outline:none}
.galleryEditForm input:focus,.galleryEditForm textarea:focus{border-color:#ddbb83}
.galleryEditForm textarea{resize:vertical;min-height:82px;line-height:1.5}
.galleryEditStatus{font-size:12px;color:#e4c18c;margin:0;min-height:14px}
.galleryEditActions{display:flex;justify-content:flex-end;gap:8px}
.galleryEditActions button{border:1px solid #7d7469;background:#292a30;color:#f7f5f0;padding:10px 18px;border-radius:7px;cursor:pointer}
.galleryEditActions .galleryEditSave{background:#dcb980;border-color:#dcb980;color:#171717;font-weight:600}
.galleryEditActions button:disabled{opacity:.5;cursor:wait}
.editorMediaInfo{position:absolute;z-index:11;top:69px;left:clamp(12px,4vw,60px);max-width:min(550px,80vw);padding:8px 12px;border-radius:8px;background:#101113a8;color:#f1f1ef;font-size:12px;line-height:1.45;pointer-events:auto}
.editorPlaceLine{font-weight:600;color:#e3c08a}.editorPlaceLine a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.editorMemoLine{white-space:pre-wrap;max-height:95px;overflow:auto;margin-top:4px;overflow-wrap:anywhere}
.editorCardPlace{display:block;color:#e1c28a;font-size:10px;margin-left:5px;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#editMediaBtn{padding:0;border:1px solid #9d8766;display:grid;place-items:center;flex:0 0 auto;width:43px;height:43px;aspect-ratio:1;box-sizing:border-box}#editMediaBtn svg{width:20px;height:20px;display:block}.lightboxActions{flex-shrink:0}.lightboxInfo{flex:1 1 auto;min-width:0}
@media(max-width:680px){.galleryEditPanel{padding:17px;max-height:88vh}.galleryEditGrid{grid-template-columns:1fr}.galleryEditGrid>.full{grid-column:1}.editorMediaInfo{top:85px;left:12px;max-width:calc(100vw - 24px);padding:6px 9px;font-size:11px}.editorMemoLine{max-height:54px}#editMediaBtn{padding:0;width:38px;height:38px}.lightboxActions{gap:5px}}

/* v11.7: saved media title, right-aligned at the bottom of its thumbnail. */
.mediaCard .editorThumbTitle{
  position:absolute;right:9px;bottom:9px;z-index:4;
  max-width:calc(100% - 18px);box-sizing:border-box;
  padding:6px 9px;border-radius:5px;
  background:rgba(9,11,13,.78);color:#fff;
  font-size:12px;font-weight:600;line-height:1.4;
  text-align:right;letter-spacing:-.15px;
  overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  overflow-wrap:anywhere;word-break:keep-all;
  text-shadow:0 1px 3px #000a;pointer-events:none;
  box-shadow:0 2px 10px #0005;
}
/* Avoid filename, PHOTO/VIDEO type or location text overlapping the title. */
.mediaCard.hasEditorTitle .labelStrip{display:none!important}
.mediaCard.hasEditorTitle .videoFallback{display:none!important}
@media(max-width:680px){
  .mediaCard .editorThumbTitle{right:6px;bottom:6px;max-width:calc(100% - 12px);padding:5px 7px;font-size:11px;line-height:1.35}
}
