#panel[data-view="photos"].photo-album-open {
  position: fixed; top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%,-50%);
  width: min(1050px,96vw); max-height: 93dvh; padding: clamp(12px,2.1vw,24px);
  overflow: auto; scrollbar-gutter:stable; overflow-anchor:none; color: #fff3da; border: 1px solid #77583e;
  background-color:#513725;
  background-image:linear-gradient(180deg,#291a10a6,#34211626 32%,#291a1045),url('/media/album-walnut.webp');
  background-size:cover; background-position:center; padding-inline:clamp(16px,3.8vw,52px);
  box-shadow:inset 0 0 0 2px #c4946040,inset 0 0 38px #21130c55,0 20px 56px #120e0bbd;
}
#panel.photo-album-open #panel-title, #panel.photo-album-open #panel-meta { color: #f4e3bd; }
.friend-album { --ink:#452f21; --gold:#dcc38c; width:100%; color:#f7ecd5; }
.friend-album *, .friend-album *::before, .friend-album *::after { box-sizing:border-box; }
.friend-album [hidden] {display:none!important}
.friend-album .friend-album-controls { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:4px 0 13px; flex-wrap:wrap; }
.friend-album-nav { display:flex; align-items:center; gap:10px; }
.friend-album-counter { color:#eee0c1; font-variant-numeric:tabular-nums; font-size:.94rem; }
.friend-album button { font:inherit; }
.friend-album .friend-album-turn,.friend-album .friend-album-collection,.friend-album .friend-album-retry,
.friend-album .friend-album-actions button { width:auto; min-height:36px; border:1px solid #8a937d; border-radius:7px; color:#f8eedb; background:#263c31; padding:5px 12px; }
.friend-album .friend-album-turn { min-width:38px; padding:0 10px 3px; font-size:1.75rem; line-height:1; }
.friend-album .friend-album-turn:disabled {opacity:.35}
.friend-album .friend-album-collection {font-size:.875rem}
.friend-album .friend-album-binding {
  position:relative; isolation:isolate; padding:clamp(7px,1.3vw,16px) clamp(6px,1.1vw,13px) clamp(10px,1.5vw,19px);
  background:linear-gradient(90deg,#69332e,#864d43 47.8%,#482925 49.8%,#57322e 51.4%,#7b443a 54%,#63352e);
  border:1px solid #4d3129; border-radius:11px 15px 15px 10px;
  box-shadow:0 3px 4px #261308a8,2px 12px 19px #1f120bbc,inset 0 1px 2px #c28c6f;
}
.friend-album-binding::before { content:'';position:absolute;inset:4px;z-index:-1;border:1px dashed #c89a75a3;border-radius:8px;pointer-events:none; }
.friend-album-paper { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));position:relative;
  border-radius:4px 6px 5px 4px; background:#c9b897;box-shadow:0 2px 0 #ab9a7f,0 3px 0 #e5d7ba,0 4px 0 #ab9b7c,0 5px 0 #e1d3b9,0 7px 4px #3a211b; }
.friend-album-page {
  position:relative;min-width:0;padding:clamp(12px,2.25vw,27px) clamp(9px,1.8vw,24px) 7px;
  background-color:#f0e2bb;color:var(--ink);
  background-image:repeating-linear-gradient(3deg,#8b673f08 0 1px,transparent 1px 5px),linear-gradient(90deg,#eddeba,#f5edcf 72%,#decba5 94%,#b5a17e 100%);
  border-radius:3px 0 0 3px;transform-origin:right center;
}
.friend-album-page.right {background-image:repeating-linear-gradient(-5deg,#8b673f08 0 1px,transparent 1px 5px),linear-gradient(90deg,#b4a07c 0%,#e0cda5 6%,#f4eccd 25%,#eddfb9 98%);border-radius:0 5px 4px 0;transform-origin:left center}
.friend-album-paper::after {content:'';position:absolute;top:0;bottom:0;left:calc(50% - 1px);width:2px;background:#896e486b;pointer-events:none}
.friend-album-paper {perspective:1500px;perspective-origin:50% 45%;}
.friend-album-leaf {position:absolute;top:0;bottom:0;width:50%;z-index:2;transform-style:preserve-3d;will-change:transform;pointer-events:none;}
.friend-album-leaf.forward {left:50%;transform-origin:0 50%;}
.friend-album-leaf.backward {left:0;transform-origin:100% 50%;}
.friend-album-leaf>.friend-album-page {position:absolute;inset:0;backface-visibility:hidden;transform-origin:center;}
.friend-album-leaf>.friend-album-page:nth-child(2) {transform:rotateY(180deg);}
.friend-album-leaf>.friend-album-page::after {content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(100deg,#58391621,transparent 58%);}
.friend-album-slots { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(8px,1.4vw,16px); }
.friend-album .friend-album-print {
  min-width:0;width:100%;margin:0;padding:clamp(4px,.65vw,8px);height:var(--album-cell,clamp(84px,20dvh,177px));border-radius:2px;border:1px solid #d6c6a1;
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  background:#fff8df;color:#493b2c;box-shadow:1px 2px 3px #60472d42;isolation:isolate;
}
.friend-album .friend-album-print::before,.friend-album .friend-album-print::after {
  content:'';position:absolute;width:clamp(9px,1vw,14px);aspect-ratio:1;z-index:1;pointer-events:none;background:#8b754c;
}
.friend-album-print::before {top:-2px;left:-2px;clip-path:polygon(0 0,100% 0,0 100%)}
.friend-album-print::after {bottom:-2px;right:-2px;clip-path:polygon(100% 0,100% 100%,0 100%)}
.friend-album .friend-album-print:hover {background:#fffaf0;border-color:#96754f}
.friend-album .friend-album-print:focus-visible {outline:3px solid #31715b;outline-offset:3px}
.friend-album .friend-album-print.empty {background:#d6c8a83d;border:1px dashed #a19070;box-shadow:none}
.friend-album .friend-album-print.empty::before,.friend-album .friend-album-print.empty::after {opacity:.65}
.friend-album-plus {font:300 clamp(23px,3vw,36px)/1 Georgia,serif;color:#93744b}
.friend-album-empty-label {font:500 clamp(.7rem,1.35vw,.92rem)/1.2 'Segoe UI',sans-serif;color:#6b5639}
.friend-album-thumb {display:block;width:100%;height:0;min-height:0;flex:1 1 0;object-fit:cover;background:#e6d9bb}
.friend-album-signature {width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#503b2b;font:italic clamp(.72rem,1.4vw,1.02rem)/1.35 Georgia,serif}
.friend-album-folio {display:block;text-align:center;margin-top:clamp(6px,.8vw,10px);color:#745c3e;font:italic .81rem/1.2 Georgia,serif}
.friend-album-feedback {display:flex;align-items:center;justify-content:center;gap:.5rem;min-height:28px;margin-top:7px}
.friend-album .friend-album-note {margin:0;color:#e4d7b6;font-size:.88rem;text-align:center}
.friend-album-viewer {
  position:fixed;inset:0;z-index:4;display:grid;place-items:center;
  background:#111c16ed;border-radius:inherit;padding:clamp(10px,2vw,24px);overflow:auto;
}
.friend-album-large {max-width:100%;max-height:100%;display:flex;flex-direction:column;align-items:center;gap:8px}
.friend-album-original {display:block;min-height:0;max-width:100%;max-height:min(65dvh,640px);object-fit:contain;background:#112018}
.friend-album-byline,.friend-album-actions {display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px 11px;color:#f5ebd6}
.friend-album-byline span,.friend-album-remove-question {font-size:.86rem}
.friend-album .friend-album-remove {background:#643b33;border-color:#a47b6d}
.friend-album .friend-album-close {background:#f1ddac;color:#273d31}
@media (max-width:600px){
  #panel[data-view="photos"].photo-album-open {padding:12px;width:97vw;max-height:94dvh;}
  .friend-album .friend-album-controls {margin-bottom:8px;}
  .friend-album-nav {gap:5px;}
  .friend-album-page {padding:12px 7px 6px;}
  .friend-album-slots {gap:8px 6px;}
  .friend-album {--album-cell:clamp(64px,21vw,106px);}
  .friend-album .friend-album-collection {padding:4px 7px;font-size:.78rem;}
}
@media (orientation:landscape) and (max-height:520px){
  #panel[data-view="photos"].photo-album-open {max-height:96dvh;padding-block:7px;}
  .friend-album {--album-cell:clamp(49px,calc((100dvh - 238px)/2),97px);}
  .friend-album .friend-album-binding {max-width:min(100%,165dvh);margin-inline:auto;}
  .friend-album-page {padding-block:7px 3px;}
  .friend-album-slots {row-gap:5px;}
  .friend-album .friend-album-controls {margin-block:2px 6px;}
}
@media (prefers-reduced-motion:reduce){.friend-album * {scroll-behavior:auto}}
