/* Shared paper, typography and ink; uploads retain their original colour. */
.qoacht-memory { color: var(--qoacht-ink,#38251f); font: 400 15px/1.6 var(--qoacht-sans,Arial,sans-serif); }
.qoacht-memory__heading { max-width: 850px; margin-bottom: 42px; }
.qoacht-memory__heading h1 { margin: 20px 0; font: 400 clamp(38px,5vw,76px)/1.08 var(--qoacht-serif,Georgia,serif); letter-spacing: -.035em; overflow-wrap: anywhere; }
.qoacht-memory__heading > div { max-width: 680px; }
.qoacht-memory__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; }
.qoacht-memory__grid[data-columns="2"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
.qoacht-memory__grid[data-columns="4"] { grid-template-columns: repeat(4,minmax(0,1fr)); }
.qoacht-memory__grid figure { min-width: 0; margin: 0; }
.qoacht-memory__grid a { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; color: inherit; background: #38251f12; }
.qoacht-memory__grid img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.qoacht-memory__grid a:hover img { transform: scale(1.025); }
.qoacht-memory__grid figcaption { margin-top: 12px; font-size: 13px; overflow-wrap: anywhere; }
.qoacht-memory__play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid #fff8; border-radius: 50%; background: #38251fbb; color: #f4efe9; font-size: 19px; }
.qoacht-memory__video-placeholder { display: grid; place-items: center; height: 100%; padding-bottom: 90px; }
.qoacht-memory__empty { padding: 35px; border: 1px solid var(--qoacht-line,#38251f40); }
.qoacht-gallery-overlay[hidden] { display: none !important; }
body.qoacht-gallery-open { position: fixed; top: var(--qoacht-gallery-scroll,0); left: 0; right: 0; overflow: hidden; }
.qoacht-gallery-overlay { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 24px; background: #241710d9; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #38251f; font: 400 14px/1.5 var(--qoacht-sans,Arial,sans-serif); }
.qoacht-gallery-viewer { width: 1100px; max-width: 100%; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; padding: 24px 30px 20px; background: var(--qoacht-bone,#f4efe9); box-shadow: 0 24px 100px #140b0880; overflow-y: auto; overscroll-behavior: contain; animation: qoacht-gallery-enter .22s ease-out; }
.qoacht-gallery-viewer > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 18px; }
.qoacht-gallery-viewer > header p { margin: 0 0 7px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.qoacht-gallery-viewer h2 { margin: 0; font: 400 clamp(25px,3vw,40px)/1.08 var(--qoacht-serif,Georgia,serif); letter-spacing: -.025em; overflow-wrap: anywhere; }
.qoacht-gallery-viewer button { flex-shrink: 0; display: grid; place-items: center; min-width: 44px; min-height: 44px; border: 1px solid #38251f50; padding: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.qoacht-gallery-viewer [data-gallery-close] { border-radius: 50%; font-size: 30px; }
.qoacht-gallery-viewer button:hover { background: #38251f12; }
.qoacht-gallery-viewer :focus-visible, .qoacht-memory a:focus-visible { outline: 2px solid var(--qoacht-burgundy,#751f2a); outline-offset: 3px; }
.qoacht-gallery-stage { min-height: 0; flex: 1 1 auto; display: flex; align-items: center; justify-content: center; background: #201611; touch-action: pan-y; }
.qoacht-gallery-stage:empty { display: none; }
.qoacht-gallery-stage > img, .qoacht-gallery-stage > video { display: block; width: 100%; max-height: 52vh; max-height: 52dvh; object-fit: contain; min-height: 180px; }
.qoacht-gallery-stage > img { height: 52vh; height: 52dvh; }
.qoacht-gallery-caption { flex-shrink: 0; max-height: 90px; overflow-y: auto; margin-top: 13px; font-size: 13px; text-align: center; white-space: pre-line; overflow-wrap: anywhere; }
.qoacht-gallery-caption:empty { display: none; }
.qoacht-gallery-viewer > footer { display: flex; flex-shrink: 0; justify-content: center; align-items: center; gap: 24px; padding-top: 13px; }
.qoacht-gallery-viewer > footer button { border: 0; font-size: 24px; }
.qoacht-gallery-viewer [hidden] { display: none !important; }
.qoacht-gallery-thumbs { display: flex; flex-shrink: 0; justify-content: flex-start; gap: 9px; overflow-x: auto; padding: 12px 3px 3px; }
.qoacht-gallery-thumbs:empty { display: none; }
.qoacht-gallery-thumbs button { position: relative; width: 66px; height: 48px; border: 2px solid transparent; opacity: .6; }
.qoacht-gallery-thumbs button[aria-current="true"] { border-color: var(--qoacht-burgundy,#751f2a); opacity: 1; }
.qoacht-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.qoacht-gallery-thumbs span { position: absolute; inset: 0; display: grid; place-items: center; color: white; background: #20161155; }
[data-gallery-status] { margin: 28px 0; text-align: center; }
[data-gallery-status] a { color: inherit; text-decoration: underline; }
@keyframes qoacht-gallery-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .qoacht-memory__grid, .qoacht-memory__grid[data-columns] { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 12px; }
  .qoacht-memory__heading { margin-bottom: 28px; }
  .qoacht-gallery-overlay { padding: 12px; padding-top: max(12px,env(safe-area-inset-top)); padding-bottom: max(12px,env(safe-area-inset-bottom)); }
  .qoacht-gallery-viewer { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 18px 16px 14px; }
  .qoacht-gallery-viewer > header { gap: 12px; }
  .qoacht-gallery-stage > img, .qoacht-gallery-stage > video { max-height: 48vh; max-height: 48dvh; min-height: 120px; }
  .qoacht-gallery-stage > img { height: 48vh; height: 48dvh; }
  .qoacht-gallery-thumbs button { width: 58px; height: 44px; }
}
@media (max-height: 500px) { .qoacht-gallery-viewer { padding-top: 12px; } .qoacht-gallery-viewer > header p { display: none; } .qoacht-gallery-viewer h2 { font-size: 24px; } .qoacht-gallery-stage > img, .qoacht-gallery-stage > video { height: 35vh; min-height: 80px; } }
@media (prefers-reduced-motion: reduce) { .qoacht-gallery-viewer { animation: none; } .qoacht-memory__grid img { transition: none; } }
