#gallery.gallery-feed {
  --gallery-card-width:min(448px,calc(100vw - 28px),max(244px,calc((var(--tour-scene-height,100vh) - 166px) * .8)));
  width:var(--gallery-card-width);
  height:fit-content;max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px);
  margin:auto;padding:0;overflow:hidden;
  border:1px solid rgba(48,42,35,.12);border-radius:15px;
  background:rgba(255,255,255,.97);color:#252321;
  box-shadow:0 12px 49px rgba(19,16,12,.19);
}
#gallery.gallery-feed[open] {display:flex;flex-direction:column;gap:0;padding:0;}
.gallery-feed .album-head {
  flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:57px;
  padding:9px 13px 9px 17px;border-bottom:1px solid rgba(43,38,32,.09);
}
.gallery-feed .album-profile,.gallery-feed .album-identity {display:flex;align-items:center;}
.gallery-feed .album-profile {min-width:0;min-height:40px;gap:10px;color:#242321;text-decoration:none;border-radius:6px;}
.gallery-feed .album-profile:hover .album-identity strong {text-decoration:underline;text-underline-offset:2px;}
.gallery-feed .album-avatar {
  width:37px;height:37px;flex:none;display:grid;place-items:center;
  overflow:hidden;border:1px solid #d9d4c9;border-radius:50%;background:#faf8f3;
}
.gallery-feed .album-avatar img {display:block;width:100%;height:100%;object-fit:cover;}
.gallery-feed .album-identity {flex-direction:column;align-items:flex-start;gap:2px;}
.gallery-feed .album-identity strong {font-size:14px;line-height:1.15;letter-spacing:-.025em;}
.gallery-feed .album-identity span {font-size:11px;line-height:1.25;color:#69635c;}
.gallery-feed .album-body {min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;}
#gallery.gallery-feed .lightbox {
  width:100%;height:auto;aspect-ratio:4 / 5;min-height:0;max-height:none;
  border-radius:0;background:#f4f2ee;
}
.gallery-feed #photo-stage {margin:0;padding:0;width:100%;height:100%;outline-offset:-3px;}
.gallery-feed #real-photo {object-fit:cover;object-position:var(--album-focal-x,50%) var(--album-focal-y,50%);}
.gallery-feed #photo-stage {touch-action:pan-y;}
.gallery-feed .album-count {
  position:absolute;z-index:2;top:11px;right:12px;pointer-events:none;
  padding:4px 8px;border-radius:14px;
  background:rgba(24,22,19,.66);color:#fff;font-size:11px;line-height:1.25;font-weight:600;
  letter-spacing:.015em;font-variant-numeric:tabular-nums;
}
.gallery-feed .album-icon,.gallery-feed .album-turn {
  display:inline-flex;align-items:center;justify-content:center;flex:none;text-decoration:none;
}
.gallery-feed .album-icon {width:40px;height:40px;border-radius:50%;color:#302d29;}
.gallery-feed .album-icon svg {width:20px;height:20px;}
.gallery-feed .album-icon:is(:hover,:focus-visible),.gallery-feed .album-icon[aria-pressed=true] {background:rgba(42,36,27,.07);}
.gallery-feed .lightbox .album-turn {
  position:absolute;z-index:2;top:50%;bottom:auto;transform:translateY(-50%);
  width:40px;height:44px;border-radius:0;color:#fff;background:transparent;
}
.gallery-feed .album-turn svg {
  width:26px;height:26px;padding:4px;
  border:1px solid rgba(255,255,255,.56);border-radius:50%;background:rgba(30,26,21,.47);
}
.gallery-feed .album-turn:is(:hover,:focus-visible) svg {background:rgba(24,22,18,.78);}
.gallery-feed .lightbox .previous {left:3px;right:auto;}
.gallery-feed .lightbox .next {right:3px;left:auto;}
.gallery-feed .album-caption {padding:0 15px 13px;}
.gallery-feed .album-action-row {display:flex;align-items:center;gap:10px;min-width:0;min-height:46px;}
.gallery-feed .album-actions {display:flex;flex:none;gap:1px;margin-left:-8px;align-items:center;}
.gallery-feed .album-caption-content {min-width:0;padding-top:1px;}
.gallery-feed .thumb-bar {
  position:relative;display:flex;flex:0 1 auto;align-items:center;justify-content:flex-start;gap:4px;
  min-width:0;width:max-content;max-width:100%;margin:0 0 0 auto;padding:2px;
  overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#aaa39b transparent;
}
.gallery-feed .thumb-bar button {
  display:grid;place-items:center;width:44px;height:44px;padding:3px;
  border:1px solid transparent;border-radius:5px;background:transparent;
}
.gallery-feed .thumb-bar img {width:36px;height:32px;border-radius:3px;opacity:.65;object-fit:cover;}
.gallery-feed .thumb-bar button[aria-current=true] {border-color:#9b392e;background:#fff;}
.gallery-feed .thumb-bar button[aria-current=true]::after {content:none;}
.gallery-feed .thumb-bar button:is([aria-current=true],:hover) img {opacity:1;}
.gallery-feed :is(button,a):focus-visible {outline:2px solid #a13b33;outline-offset:-2px;}
@media (max-width:600px) {
  #gallery.gallery-feed {--gallery-card-width:calc(100vw - max(10px,env(safe-area-inset-left)) - max(10px,env(safe-area-inset-right)));border-radius:13px;}
  .gallery-feed .album-head {padding:7px 9px 7px 13px;min-height:51px;}
  .gallery-feed .album-caption {padding:0 12px 10px;}
  .gallery-feed .album-actions {gap:0;}
  .gallery-feed .thumb-bar {gap:2px;}
}
@media (orientation:landscape) and (max-height:510px) {
  #gallery.gallery-feed {--gallery-card-width:min(364px,calc(100vw - 24px),max(212px,calc((var(--tour-scene-height,100vh) - 114px) * .8)));}
  .gallery-feed .album-head {min-height:43px;padding-block:2px;}
  .gallery-feed .album-caption {padding-block:0 7px;}
  .gallery-feed .album-action-row {gap:4px;}
  .gallery-feed .album-count {top:7px;right:8px;}

}

.gallery-feed .album-original-controls[hidden] {display:none;}
#gallery.gallery-feed[data-original="true"][open] {
  inset:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) calc(var(--tour-dock-height,0px) + 8px) max(8px,env(safe-area-inset-left));
  width:auto;height:auto;max-width:none;max-height:none;margin:0;border:0;border-radius:12px;background:#151514;
}
.gallery-feed[data-original="true"] :is(.album-head,.album-caption,.thumb-bar,.album-count,.album-turn) {display:none;}
.gallery-feed[data-original="true"] .album-body {display:flex;flex:1;overflow:hidden;}
#gallery.gallery-feed[data-original="true"] .lightbox {flex:1;height:100%;aspect-ratio:auto;background:#151514;}
.gallery-feed[data-original="true"] #real-photo {object-fit:contain;object-position:center;}
.gallery-feed[data-original="true"] #photo-stage {touch-action:none;}
.gallery-feed .album-original-controls {
  position:absolute;z-index:3;top:10px;right:10px;display:flex;gap:2px;
  padding:2px;border-radius:24px;background:rgb(30 29 28 / 79%);color:white;
}
.gallery-feed .album-original-controls .album-icon {width:44px;height:42px;color:inherit;}
.gallery-feed .album-original-controls .album-icon:disabled {opacity:.38;}
.gallery-feed .album-original-controls .album-icon:is(:hover,:focus-visible):not(:disabled) {background:rgb(255 255 255 / 18%);}
.gallery-feed .album-original-controls .album-icon:focus-visible {outline-color:white;}
body.shelf-focus-active #gallery.gallery-feed[open] {
  opacity:0;pointer-events:none;backdrop-filter:none;-webkit-backdrop-filter:none;
}
body.shelf-focus-active #gallery::backdrop {background:transparent;backdrop-filter:none;}
