
/* ============================================================
   NOTRE REFUGE — V75 NOS PHOTOS
   ============================================================ */

.manage71-tabs{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
}

.refuge75-photos-panel{
  padding-bottom:38px;
}

.refuge75-photo-hero{
  display:grid;
  gap:16px;
  padding:18px;
  border:1px solid rgba(82,55,69,.10);
  border-radius:22px;
  background:
    radial-gradient(circle at 92% 12%,rgba(186,116,141,.13),transparent 30%),
    linear-gradient(145deg,#fffaf7,#f4e9e8);
  box-shadow:0 12px 30px rgba(63,40,52,.05);
}
.refuge75-photo-hero h3{
  margin:4px 0 8px;
  color:#4d3944;
  font:500 clamp(1.7rem,6vw,2.65rem)/.98 Georgia,serif;
  letter-spacing:-.035em;
}
.refuge75-photo-hero h3 em{
  color:#b36f88;
  font-style:italic;
}
.refuge75-photo-hero p:not(.eyebrow){
  max-width:62ch;
  margin:0;
  color:#7c6671;
  font-size:.67rem;
  line-height:1.55;
}
.refuge75-photo-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.refuge75-photo-actions label,
.refuge75-picker-import label,
.refuge75-editor-photo-actions label,
.refuge75-editor-photo-actions button{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  border:1px solid rgba(82,55,69,.10);
  border-radius:13px;
  color:#6c5360;
  background:#fff;
  font-size:.57rem;
  font-weight:850;
  cursor:pointer;
}
.refuge75-photo-actions label.is-primary{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg,#b8708a,#81739c);
}
.refuge75-photo-actions input,
.refuge75-picker-import input,
.refuge75-editor-photo-actions input{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}

.refuge75-photo-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 3px 10px;
}
.refuge75-photo-toolbar strong{
  display:block;
  color:#513e48;
  font-size:.72rem;
}
.refuge75-photo-toolbar small{
  display:block;
  margin-top:2px;
  color:#907985;
  font-size:.50rem;
}
#refuge75-photo-status{
  color:#8f6d7d;
  font-size:.53rem;
  text-align:right;
}
#refuge75-photo-status[data-tone="error"],
#refuge75-picker-status[data-tone="error"]{color:#ad626a}

.refuge75-photo-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.refuge75-photo-card{
  min-width:0;
  overflow:hidden;
  border:1px solid rgba(82,55,69,.08);
  border-radius:17px;
  background:#fffaf7;
  box-shadow:0 8px 20px rgba(63,40,52,.045);
}
.refuge75-photo-open{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:1;
  overflow:hidden;
  padding:0;
  border:0;
  background:linear-gradient(145deg,#efe3e3,#e9e3ee);
}
.refuge75-photo-open img{
  position:absolute;
  z-index:2;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .35s cubic-bezier(.22,.72,.18,1),opacity .25s ease;
}
.refuge75-photo-open img:not([src]){opacity:0}
.refuge75-photo-placeholder{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:rgba(155,100,125,.35);
  font:500 1.7rem Georgia,serif;
}
.refuge75-photo-meta{
  min-height:58px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:7px;
  padding:8px 9px;
}
.refuge75-photo-meta strong{
  display:block;
  overflow:hidden;
  color:#523e48;
  font-size:.59rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.refuge75-photo-meta small{
  display:block;
  margin-top:3px;
  color:#927b86;
  font-size:.47rem;
}
.refuge75-photo-meta>button{
  width:32px;
  height:32px;
  border:1px solid rgba(82,55,69,.08);
  border-radius:10px;
  color:#846976;
  background:#fff;
}
@media(hover:hover){
  .refuge75-photo-card:hover .refuge75-photo-open img{transform:scale(1.035)}
}

.refuge75-empty{
  grid-column:1/-1;
  padding:30px 18px;
  border:1px dashed rgba(151,103,124,.18);
  border-radius:19px;
  color:#806b75;
  background:rgba(255,250,247,.65);
  text-align:center;
}
.refuge75-empty>span{
  display:block;
  color:#bc7991;
  font:500 1.45rem Georgia,serif;
}
.refuge75-empty strong{
  display:block;
  margin-top:7px;
  color:#57434d;
  font-size:.69rem;
}
.refuge75-empty p{
  margin:5px 0 0;
  font-size:.55rem;
  line-height:1.5;
}

.refuge75-photo-note{
  display:flex;
  gap:10px;
  margin-top:12px;
  padding:12px;
  border-radius:15px;
  color:#795f6d;
  background:#f1e7e8;
}
.refuge75-photo-note>span{color:#ad7189}
.refuge75-photo-note p{
  margin:0;
  font-size:.54rem;
  line-height:1.5;
}
.refuge75-photo-note strong{color:#5b4651}

/* Editor attachment block */
.refuge75-editor-photos{
  margin-top:14px;
}
.refuge75-photo-step{
  margin-top:0!important;
}
.refuge75-editor-photo-actions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:10px 0;
}
.refuge75-editor-photo-actions button{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg,#b8708a,#8877a0);
}
.refuge75-editor-selection{
  display:flex;
  gap:7px;
  overflow-x:auto;
  padding-bottom:3px;
  scrollbar-width:none;
}
.refuge75-editor-selection::-webkit-scrollbar{display:none}
.refuge75-editor-selection article{
  position:relative;
  flex:0 0 96px;
  aspect-ratio:1;
  overflow:hidden;
  border:1px solid rgba(82,55,69,.09);
  border-radius:14px;
  background:#f1e5e7;
}
.refuge75-editor-selection img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.refuge75-editor-selection article>span{
  position:absolute;
  left:6px;
  bottom:6px;
  max-width:74px;
  padding:4px 6px;
  overflow:hidden;
  border-radius:999px;
  color:#fff;
  background:rgba(52,34,45,.62);
  font-size:.42rem;
  font-weight:850;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.refuge75-editor-selection article>button{
  position:absolute;
  top:5px;
  right:5px;
  width:25px;
  height:25px;
  border:0;
  border-radius:9px;
  color:#5a414d;
  background:rgba(255,255,255,.92);
  font-size:.8rem;
}
.refuge75-editor-empty{
  color:#917985;
  font-size:.53rem;
}

/* Reusable content strips */
.refuge75-content-photos{
  width:100%;
  display:flex;
  gap:5px;
  margin-top:10px;
  overflow:hidden;
}
.refuge75-content-photos>button{
  width:50px;
  height:50px;
  flex:none;
  overflow:hidden;
  padding:0;
  border:1px solid rgba(82,55,69,.08);
  border-radius:11px;
  background:#efe5e7;
}
.refuge75-content-photos img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.memory-main>.refuge75-content-photos{
  position:absolute;
  z-index:20;
  left:14px;
  bottom:14px;
  width:auto;
  max-width:calc(100% - 28px);
  padding:5px;
  border-radius:14px;
  background:rgba(255,250,247,.82);
  backdrop-filter:blur(10px);
}
.idea-panel>.refuge75-content-photos,
.real-book>.refuge75-content-photos,
.calendar28-detail-event>.refuge75-content-photos,
#intimate-display>.refuge75-content-photos,
.book30-entry-shell>.refuge75-content-photos{
  padding:0 10px 10px;
}
.refuge75-reader-photos{
  display:flex;
  gap:7px;
  margin:0 0 18px;
  overflow-x:auto;
  scrollbar-width:none;
}
.refuge75-reader-photos::-webkit-scrollbar{display:none}
.refuge75-reader-photos button{
  flex:0 0 min(72%,320px);
  aspect-ratio:4/3;
  overflow:hidden;
  padding:0;
  border:1px solid rgba(82,55,69,.10);
  border-radius:16px;
  background:#eee3e6;
}
.refuge75-reader-photos img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* picker / viewer */
.refuge75-modal{
  position:fixed;
  z-index:2800;
  inset:0;
  display:grid;
  place-items:end center;
  padding:12px;
  overflow:auto;
  background:rgba(37,25,37,.54);
  backdrop-filter:blur(8px);
}
.refuge75-modal[hidden]{display:none!important}
.refuge75-modal-open{overflow:hidden!important}
.refuge75-picker-card,
.refuge75-viewer-card{
  width:min(760px,100%);
  max-height:88svh;
  overflow:auto;
  border:1px solid rgba(255,255,255,.20);
  border-radius:26px;
  background:linear-gradient(180deg,#fffdfa,#f5ebe8);
  box-shadow:0 28px 80px rgba(30,19,28,.30);
}
.refuge75-picker-card>header{
  position:sticky;
  z-index:5;
  top:0;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:17px 17px 12px;
  background:rgba(255,253,250,.95);
  backdrop-filter:blur(16px);
}
.refuge75-picker-card h3{
  margin:3px 0 0;
  color:#4e3945;
  font:500 1.5rem/1 Georgia,serif;
}
.refuge75-picker-card>header>button,
.refuge75-viewer-close{
  width:37px;
  height:37px;
  flex:none;
  border:1px solid rgba(82,55,69,.10);
  border-radius:12px;
  color:#735a66;
  background:#fff;
  font-size:1rem;
}
.refuge75-picker-import{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  padding:0 17px 12px;
}
.refuge75-picker-import small{
  width:100%;
  min-height:14px;
  color:#8b717e;
  font-size:.50rem;
}
.refuge75-picker-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
  padding:0 12px 14px;
}
.refuge75-picker-item{
  position:relative;
  aspect-ratio:1;
  overflow:hidden;
  padding:0;
  border:2px solid transparent;
  border-radius:13px;
  background:#ece0e4;
}
.refuge75-picker-item img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.refuge75-picker-item>span{
  position:absolute;
  top:6px;
  right:6px;
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  border-radius:50%;
  opacity:0;
  color:#fff;
  background:#a66882;
  font-size:.55rem;
}
.refuge75-picker-item.is-selected{
  border-color:#b37089;
}
.refuge75-picker-item.is-selected>span{opacity:1}
.refuge75-picker-card>footer{
  position:sticky;
  bottom:0;
  display:flex;
  justify-content:flex-end;
  gap:7px;
  padding:11px 14px max(12px,env(safe-area-inset-bottom));
  border-top:1px solid rgba(82,55,69,.08);
  background:rgba(255,250,247,.96);
  backdrop-filter:blur(16px);
}
.refuge75-picker-card>footer button{
  min-height:40px;
  padding:0 13px;
  border:1px solid rgba(82,55,69,.09);
  border-radius:12px;
  color:#705662;
  background:#fff;
  font-size:.57rem;
  font-weight:850;
}
.refuge75-picker-card>footer button.is-primary{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg,#b8708a,#81739c);
}

.refuge75-viewer{
  place-items:center;
}
.refuge75-viewer-card{
  position:relative;
  display:grid;
  max-height:92svh;
}
.refuge75-viewer-close{
  position:absolute;
  z-index:8;
  top:11px;
  right:11px;
}
.refuge75-viewer-image-wrap{
  min-height:260px;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:#211b22;
}
.refuge75-viewer-image-wrap img{
  max-width:100%;
  max-height:64svh;
  object-fit:contain;
}
.refuge75-viewer-copy{
  padding:17px;
}
.refuge75-viewer-copy h3{
  margin:3px 0 4px;
  color:#4c3943;
  font:500 1.55rem/1 Georgia,serif;
}
#refuge75-viewer-info{
  color:#947b87;
  font-size:.50rem;
}
.refuge75-viewer-copy label{
  display:grid;
  gap:5px;
  margin-top:13px;
}
.refuge75-viewer-copy label>span{
  color:#775f6b;
  font-size:.54rem;
  font-weight:850;
}
.refuge75-viewer-copy input{
  min-height:43px;
  padding:0 12px;
  border:1px solid rgba(82,55,69,.10);
  border-radius:12px;
  outline:none;
  color:#513d47;
  background:#f8f0ed;
}
.refuge75-viewer-links{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:10px;
}
.refuge75-viewer-links span{
  padding:5px 7px;
  border-radius:999px;
  color:#806474;
  background:#f0e3e8;
  font-size:.47rem;
}
.refuge75-viewer-links small{
  color:#8d7581;
  font-size:.50rem;
}
.refuge75-viewer-actions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:13px;
}
.refuge75-viewer-actions button{
  min-height:40px;
  padding:0 12px;
  border:1px solid rgba(82,55,69,.09);
  border-radius:12px;
  font-size:.55rem;
  font-weight:850;
}
.refuge75-viewer-actions .is-primary{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg,#b8708a,#81739c);
}
.refuge75-viewer-actions .is-danger{
  color:#a25968;
  background:#fff7f7;
  border-color:rgba(175,92,106,.16);
}

@media(max-width:699px){
  .manage71-tabs{
    display:flex!important;
    grid-template-columns:none!important;
    justify-content:flex-start!important;
    overflow-x:auto!important;
    scrollbar-width:none;
  }
  .manage71-tabs::-webkit-scrollbar{display:none}
  .manage71-tabs button{
    flex:0 0 88px!important;
  }
  .refuge75-photo-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(min-width:700px){
  .refuge75-photo-hero{
    grid-template-columns:minmax(0,1fr) auto;
    align-items:end;
  }
  .refuge75-photo-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  .refuge75-picker-grid{
    grid-template-columns:repeat(5,minmax(0,1fr));
  }
  .refuge75-viewer-card{
    grid-template-columns:minmax(0,1.25fr) minmax(290px,.75fr);
  }
  .refuge75-viewer-image-wrap{
    min-height:520px;
  }
}
@media(min-width:1150px){
  .refuge75-photo-grid{
    grid-template-columns:repeat(5,minmax(0,1fr));
  }
}


/* ============================================================
   V77 — PHOTO COHERENCE
   Media controls only exist in modules that already had images.
   ============================================================ */

.refuge77-editor-media{
  grid-column:1/-1;
  margin:2px 0 4px!important;
  padding:13px;
  border:1px solid rgba(82,55,69,.09);
  border-radius:17px;
  background:linear-gradient(145deg,#fffaf7,#f6eceb);
}
.refuge77-media-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.refuge77-media-head>div{
  display:flex;
  align-items:flex-start;
  gap:9px;
}
.refuge77-media-head>div>span{
  width:31px;
  height:31px;
  display:grid;
  place-items:center;
  flex:none;
  border-radius:10px;
  color:#a0647c;
  background:#f0e0e6;
  font:500 .8rem Georgia,serif;
}
.refuge77-media-head strong{
  display:block;
  color:#503c47;
  font-size:.66rem;
}
.refuge77-media-head small{
  display:block;
  margin-top:3px;
  color:#8b737f;
  font-size:.50rem;
  line-height:1.45;
}
.refuge77-media-head em{
  flex:none;
  padding:5px 7px;
  border-radius:999px;
  color:#8d6e7c;
  background:#efe2e6;
  font-size:.46rem;
  font-style:normal;
  font-weight:850;
}
.refuge77-media-choices{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  margin-top:11px;
}
.refuge77-media-choices>button,
.refuge77-media-choices>label{
  position:relative;
  min-height:62px;
  display:grid!important;
  grid-template-columns:35px minmax(0,1fr);
  align-items:center!important;
  justify-content:stretch!important;
  gap:8px!important;
  padding:9px!important;
  border:1px solid rgba(82,55,69,.09)!important;
  border-radius:14px!important;
  color:#5f4854!important;
  background:#fff!important;
  text-align:left;
  cursor:pointer;
}
.refuge77-media-choices>button.is-primary{
  color:#fff!important;
  border-color:transparent!important;
  background:linear-gradient(135deg,#b8708a,#81739c)!important;
}
.refuge77-media-choices>button>span,
.refuge77-media-choices>label>span{
  width:35px;
  height:35px;
  display:grid;
  place-items:center;
  border-radius:11px;
  color:#9c6279;
  background:#f1e2e7;
  font:700 .74rem Georgia,serif;
}
.refuge77-media-choices>button.is-primary>span{
  color:#fff;
  background:rgba(255,255,255,.16);
}
.refuge77-media-choices strong{
  display:block;
  font-size:.60rem;
}
.refuge77-media-choices small{
  display:block;
  margin-top:2px;
  color:#8a727e;
  font-size:.46rem;
  line-height:1.35;
}
.refuge77-media-choices>button.is-primary small{
  color:rgba(255,255,255,.75);
}
.refuge77-media-choices input{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
}
.refuge77-legacy-note{
  display:flex;
  align-items:flex-start;
  gap:7px;
  margin-top:8px;
  padding:8px 9px;
  border-radius:11px;
  color:#806873;
  background:rgba(239,229,231,.72);
}
.refuge77-legacy-note>span{
  color:#78907d;
  font-size:.55rem;
}
.refuge77-legacy-note p{
  margin:0;
  font-size:.48rem;
  line-height:1.45;
}
.refuge77-media-empty{
  min-height:45px;
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  padding:8px 10px;
  border:1px dashed rgba(151,103,124,.15);
  border-radius:12px;
  color:#8f7783;
  background:rgba(255,255,255,.55);
}
.refuge77-media-empty>span{
  color:#b67990;
}
.refuge77-media-empty small{
  font-size:.49rem;
}
.refuge77-editor-media .refuge75-editor-selection{
  margin-top:9px;
}

/* Chosen central photo truly becomes the existing visual,
   rather than creating an extra gallery below the module. */
.real-book__cover{
  position:relative;
  overflow:hidden;
}
.real-book__cover .refuge77-book-photo{
  position:absolute;
  z-index:4;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
.real-book__cover .refuge77-book-photo + *{
  position:relative;
}

/* V75 generic content strips are intentionally disabled in V77. */
.idea-panel>.refuge75-content-photos,
.calendar28-detail-event>.refuge75-content-photos,
.book30-entry-shell>.refuge75-content-photos,
#intimate-display>.refuge75-content-photos,
.real-book>.refuge75-content-photos{
  display:none!important;
}

@media(max-width:560px){
  .refuge77-media-choices{
    grid-template-columns:1fr;
  }
}
