/* Family Book — contributor-grouped Memories library */
.memory-contributor-chipbar{
  display:flex;
  align-items:center;
  gap:8px;
  margin:11px 0 12px;
  padding:1px 1px 3px;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  scrollbar-width:none;
}
.memory-contributor-chipbar::-webkit-scrollbar{display:none}
.memory-contributor-chip{
  flex:0 0 auto;
  min-height:38px;
  padding:0 13px;
  border:1px solid #ddd4c9;
  border-radius:999px;
  background:#fff;
  color:#49443e;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font:700 .74rem Inter,system-ui,sans-serif;
  white-space:nowrap;
}
.memory-contributor-chip svg{width:16px;height:16px}
.memory-contributor-chip.active{background:#315c43;color:#fff;border-color:#315c43}
.memory-contributor-chip.active .memory-contributor-avatar{border-color:rgba(255,255,255,.65)}
.memory-contributor-avatar{
  width:42px;height:42px;border-radius:50%;overflow:hidden;display:grid;place-items:center;
  flex:0 0 auto;background:#e7efe9;color:#315c43;border:2px solid #fff;font-weight:900;font-size:.72rem
}
.memory-contributor-avatar img{width:100%;height:100%;object-fit:cover;object-position:center;display:block}
.memory-contributor-avatar.small{width:24px;height:24px;border-width:1px;font-size:.55rem}
.memory-contributor-avatar.tiny{width:18px;height:18px;border-width:1px;font-size:.48rem}

.memory-contributor-library{display:block;width:100%}
.memory-contributor-section{margin:0 0 23px}
.memory-contributor-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 10px}
.memory-contributor-person{display:flex;align-items:center;gap:10px;min-width:0}
.memory-contributor-person>div{display:grid;gap:2px;min-width:0}
.memory-contributor-person strong{font:800 1rem Inter,system-ui,sans-serif;color:#315c43;line-height:1.2}
.memory-contributor-person small{font-size:.72rem;color:#81786e;line-height:1.35}
.memory-contributor-view{
  flex:0 0 auto;min-height:34px;padding:0 10px;border:0;background:transparent;color:#315c43;
  display:inline-flex;align-items:center;gap:5px;font:800 .72rem Inter,system-ui,sans-serif
}
.memory-contributor-view svg{width:15px;height:15px}
.memory-contributor-view span{font-weight:700;color:#81786e}
.memory-contributor-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.memory-contributor-grid .memory-card{min-width:0}
.memory-card-author{display:flex;align-items:center;gap:6px;margin-top:3px;color:#81786e;font-size:.62rem}
.memory-group-empty{
  margin:14px 0;padding:28px 20px;border:1px dashed #d8cec2;border-radius:16px;background:#fff;
  display:grid;justify-items:center;gap:7px;text-align:center;color:#81786e
}
.memory-group-empty svg{width:26px;height:26px;color:#75967f}
.memory-group-empty strong{color:#315c43;font-size:.95rem}
.memory-group-empty span{font-size:.76rem;max-width:420px;line-height:1.45}

html[data-theme="dark"] .memory-contributor-chip{background:#151a15;border-color:#394239;color:#eee9e2}
html[data-theme="dark"] .memory-contributor-chip.active{background:#274a35;border-color:#4d765a;color:#d9efe0}
html[data-theme="dark"] .memory-contributor-avatar{background:#203126;color:#a9cfb2;border-color:#2f4033}
html[data-theme="dark"] .memory-contributor-person strong{color:#dfe9e1}
html[data-theme="dark"] .memory-contributor-person small{color:#9e9a91}
html[data-theme="dark"] .memory-contributor-view{color:#9fc9aa}
html[data-theme="dark"] .memory-contributor-view span{color:#9e9a91}
html[data-theme="dark"] .memory-card-author{color:#a5a099}
html[data-theme="dark"] .memory-group-empty{background:#151a15;border-color:#394239;color:#a5a099}
html[data-theme="dark"] .memory-group-empty strong{color:#dfe9e1}

@media(max-width:1050px){
  .memory-contributor-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:820px){
  .memory-contributor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .memory-contributor-section{margin-bottom:19px}
}
@media(max-width:620px){
  .memory-contributor-chipbar{margin:8px -2px 10px;padding:1px 2px 4px}
  .memory-contributor-chip{min-height:36px;padding:0 11px;font-size:.7rem}
  .memory-contributor-head{align-items:center;margin-bottom:8px}
  .memory-contributor-avatar{width:36px;height:36px}
  .memory-contributor-person{gap:8px}
  .memory-contributor-person strong{font-size:.88rem}
  .memory-contributor-person small{font-size:.65rem;max-width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .memory-contributor-view{font-size:.67rem;padding:0 4px}
  .memory-contributor-view span{display:none}
  .memory-contributor-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .memory-contributor-section:not(:only-child) .memory-contributor-grid>.memory-card:nth-child(n+3){display:none}
  .memory-contributor-library .memory-card-copy{padding:8px 9px 9px!important;min-height:55px!important}
  .memory-contributor-library .memory-card-copy strong{font-size:.78rem!important}
  .memory-card-author{font-size:.58rem}
}
@media(min-width:621px){
  .memory-contributor-section .memory-contributor-grid>.memory-card:nth-child(n+5){display:none}
  .memory-contributor-library .memory-contributor-section:only-child .memory-contributor-grid>.memory-card{display:flex}
}
@media(max-width:360px){
  .memory-contributor-grid{grid-template-columns:1fr}
  .memory-contributor-section:not(:only-child) .memory-contributor-grid>.memory-card:nth-child(n+2){display:none}
}
