.planet-memories{position:fixed;top:28svh;right:7vw;width:255px;z-index:4;text-align:center;pointer-events:auto;cursor:auto}
.planet-memories[hidden]{display:none}
.memory-stack{display:flex;align-items:center;justify-content:center;padding:9px 4px}
.memory-stack button{width:132px;height:160px;flex-shrink:0;padding:5px;background:#eeece5;border-radius:3px;box-shadow:0 10px 35px #0008;transform:rotate(-8deg);transition:transform .25s}
.memory-stack button+button{margin-left:-24px;transform:rotate(9deg) translateY(17px)}
.memory-stack button:hover,.memory-stack button:focus-visible{transform:rotate(0) translateY(-8px);z-index:1}
.memory-stack img{display:block;width:100%;height:100%;object-fit:cover;object-position:40% 50%}
.memory-stack img.memory-uncropped{object-fit:contain;background:#171717}
.memory-stack button:only-child{width:190px;height:144px;transform:rotate(-5deg)}
.memory-stack button:only-child:hover,.memory-stack button:only-child:focus-visible{transform:rotate(0) translateY(-8px)}
.memory-thumbnails[hidden]{display:none}
.memory-open{display:inline-flex;gap:18px;align-items:center;min-height:44px;padding:8px 16px;margin-top:20px;background:#111e;border:1px solid #ffffff40;border-radius:30px;font-size:14px;box-shadow:0 4px 20px #0008}
.memory-open:hover{background:#282828;border-color:#ddd}
.in-transit .planet-memories{visibility:hidden;pointer-events:none}
.memory-panel #panel-content{max-width:1000px;margin:28px auto 50px}
.memory-heading{height:auto;margin:0 0 22px;padding:0 0 16px;display:flex;gap:16px;align-items:baseline;justify-content:space-between}
#panel-content .memory-heading h2{font-size:clamp(28px,4vw,42px);letter-spacing:-1px;margin:0}
.memory-heading>span{font-size:14px;color:#aaa}
.memory-gallery figure{margin:0}
.memory-full{display:block;width:100%;height: min(55svh,620px);object-fit:contain;background:#111;border:1px solid #ffffff1c;border-radius:6px}
.memory-gallery figcaption{padding:15px 0 0;min-height:85px}
.memory-caption{font-size:16px;line-height:1.6;margin:0 0 8px}
.memory-source{font-size:14px;color:#c8bb91;text-decoration:underline;text-underline-offset:4px}
.memory-navigation{display:flex;justify-content:center;align-items:center;gap:20px;margin:15px 0}
.memory-navigation button{border:1px solid #ffffff40;border-radius:50%;width:44px;height:44px;font-size:22px}
.memory-navigation button:hover{background:#ffffff18}
.memory-count{font-size:14px;color:#bbb;min-width:45px;text-align:center}
.memory-thumbnails{display:flex;justify-content:center;gap:10px}
.memory-thumbnails button{width:66px;height:70px;border:2px solid transparent;border-radius:5px;padding:3px;opacity:.6}
.memory-thumbnails button[aria-pressed=true]{border-color:#dfc56a;opacity:1}
.memory-thumbnails img{width:100%;height:100%;object-fit:cover;border-radius:2px}
@media(min-width:761px) and (max-height:700px){.planet-memories{top:24svh}.memory-stack button{width:110px;height:130px}}
@media(max-width:760px){
  .planet-memories{position:absolute;top:auto;bottom:calc(100% + 20px);right:0;width:175px}
  .memory-stack{padding:5px 0}
  .memory-stack button{width:86px;height:90px;padding:3px}
  .memory-stack button:only-child{width:145px;height:100px}
  .memory-stack button+button{margin-left:-12px;transform:rotate(9deg) translateY(8px)}
  .memory-open{margin-top:8px;padding:5px 12px;min-height:36px;font-size:14px;gap:12px}
  .memory-heading{display:block}
  .memory-heading>span{display:block;margin-top:9px}
  .memory-panel #panel-content{margin-top:24px}
  .memory-full{height:48svh}
}
@media(max-width:760px) and (max-height:740px){
  .planet-memories{bottom:calc(100% + 10px);width:148px}
  .memory-stack button{width:70px;height:66px}
  .memory-stack button:only-child{width:115px;height:78px}
  .memory-open{margin-top:4px}
}
@media(prefers-reduced-motion:reduce){.memory-stack button{transition:none}}
