/* Photo-frame memory layout: one question and one target, shared seating animation. */
body.chimelong-game.rrdd-adventure #recall.frame-memory .recall-card{display:grid!important;grid-template-columns:minmax(0,1fr);grid-template-rows:40px minmax(0,1fr);gap:6px!important;padding:10px!important;background:radial-gradient(ellipse at 40% 25%,#f1fdffbf,#bcf0f4c4),url('art/album-garden-v1.webp') center/cover;border:2px solid #fffaf0;overflow:hidden;box-shadow:none}
body.chimelong-game #recall.frame-memory .album-heading{grid-column:1;grid-row:1;display:flex!important;align-items:center;justify-content:center;gap:12px;width:100%;min-height:0;margin:0;padding:0!important}
body.chimelong-game #recall.frame-memory .album-heading h2{font-size:clamp(18px,2.5vw,32px)!important;line-height:1.1;margin:0!important;color:#173c61}
body.chimelong-game #recall.frame-memory .album-progress{position:static;display:inline-flex;align-items:center;min-height:28px;border:0;box-shadow:none;padding:4px 9px;font-size:11px;letter-spacing:0;flex:none}
body.chimelong-game.rrdd-adventure #recall.frame-memory #memoryAlbum{grid-row:2;grid-column:1;display:grid;grid-template-columns:minmax(0,1fr) minmax(190px,25%);grid-template-rows:minmax(0,1fr) 44px 22px!important;gap:8px;width:100%;height:100%;min-height:0;container-type:normal}
.chimelong-frame-scene{grid-column:1;grid-row:1;display:flex;align-items:center;justify-content:center;min-height:0;min-width:0;height:100%;position:relative}
.chimelong-memory-frame{position:relative;flex:none;max-width:100%;aspect-ratio:3/2;filter:drop-shadow(0 7px 6px #1b719838);isolation:isolate}
body.chimelong-game #recall.frame-memory .chimelong-frame-slot{position:absolute;left:12.5%;top:18%;width:75%;height:63%;min-height:0;min-width:0;padding:0;margin:0;background:radial-gradient(#fffef3,#ebf9f7);border:0;border-radius:10px;overflow:hidden;display:block;opacity:1;box-shadow:inset 0 3px 12px #4a9fb42a}
.chimelong-frame-rim{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;z-index:3}
.chimelong-frame-question{position:absolute;left:14%;top:20%;width:72%;height:59%;z-index:2;display:grid;place-items:center;pointer-events:none;padding:2%}
body.chimelong-game #recall.frame-memory .album-clue{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:0;width:100%;max-height:100%;padding:0!important;margin:0;border:0;border-radius:0;background:none;box-shadow:none;pointer-events:none}
body.chimelong-game.rrdd-adventure #recall.frame-memory #recallQuestion{font-size:clamp(18px,2.6vw,32px)!important;line-height:1.25;max-width:100%;margin:0!important;padding:0;border:0;background:none;text-align:center;color:#173c61;overflow-wrap:break-word}
body.chimelong-game #recall.frame-memory #hearRecall{position:static;display:block;width:44px;height:44px;min-height:44px;padding:0;margin:0;border-radius:50%;border:2px solid #c5e8ef;background:#fffdf1;font-size:22px;pointer-events:auto;flex:none}
body.chimelong-game #recall.frame-memory .chimelong-frame-slot .framed-answer{width:100%;height:100%;object-fit:cover;object-position:center;display:block;background:#e2f7f5}
.chimelong-memory-frame.frame-filled{animation:chimelongFrameGlow 900ms ease-out}
@keyframes chimelongFrameGlow{40%{filter:drop-shadow(0 0 18px #ffe279) brightness(1.1)}}
.chimelong-photo-tray{grid-column:2;grid-row:1;display:grid;grid-template-rows:repeat(3,minmax(0,1fr));gap:12px;min-height:0;min-width:0;width:100%;padding:3px 5px}
body.chimelong-game #recall.frame-memory .chimelong-photo{display:grid;grid-template-rows:minmax(0,1fr) auto;grid-template-columns:1fr;width:100%;height:100%;min-height:44px;min-width:0;max-width:260px;max-height:240px;justify-self:center;align-self:center;gap:3px;margin:0;padding:6px;background:#fffdf1;border:3px solid #fff;box-shadow:0 4px 0 #8ab7bd;border-radius:14px;touch-action:none;user-select:none;-webkit-user-select:none;transform:none;overflow:hidden}
body.chimelong-game #recall.frame-memory .chimelong-photo img{display:block;width:100%;height:100%;min-height:0;object-fit:contain;background:#eaf8f5;border-radius:7px;pointer-events:none}
body.chimelong-game #recall.frame-memory .chimelong-photo span{display:block;font-size:clamp(12px,1.5vw,19px);line-height:1.15;color:#173c61;text-align:center;padding:0}
body.chimelong-game #recall.frame-memory .chimelong-photo.selected{border-color:#ffcf57;outline:2px solid #eeb33e;outline-offset:1px}
body.chimelong-game #recall.frame-memory .chimelong-photo:disabled{opacity:.6}
.chimelong-keepsakes{grid-column:1/-1;grid-row:2;display:flex;align-items:center;justify-content:center;gap:14px;min-height:0}
.chimelong-keepsake{position:relative;aspect-ratio:3/2;width:64px;flex:none;height:auto;padding:0;border:0;box-shadow:none;background:none}
.chimelong-keepsake:not(.saved){width:30px;height:30px;aspect-ratio:1;border:2px dashed #65b4c5;border-radius:50%;display:grid;place-items:center;color:#22748d;font-weight:800;background:#fff8}
.chimelong-keepsake-photo{position:absolute;left:12.5%;top:18%;width:75%;height:63%;object-fit:cover;background:#e2f7f5}
.chimelong-frame-note{grid-column:1/-1;grid-row:3;align-self:center;text-align:center;color:#2d657c;font-size:12px;line-height:1.2;margin:0;padding:0}
body.chimelong-game #recall.frame-memory #recallFeedback,body.chimelong-game #recall.frame-memory>.recall-card>.album-clue{display:none!important}
body.chimelong-game.rrdd-adventure #recall.frame-memory.album-complete .recall-card{grid-template-columns:1fr;grid-template-rows:40px minmax(0,1fr) 64px}
body.chimelong-game.rrdd-adventure #recall.frame-memory.album-complete #memoryAlbum{grid-column:1;grid-row:2;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) 26px!important}
.chimelong-memory-gallery{grid-row:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;gap:14px;min-height:0;min-width:0}
.chimelong-gallery-item{margin:0;min-width:0;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px}
.chimelong-gallery-item .chimelong-keepsake{width:100%;max-width:440px}
.chimelong-gallery-item figcaption{font-size:clamp(14px,1.8vw,24px);font-weight:800;line-height:1.2;color:#173c61}
body.chimelong-game.rrdd-adventure #recall.frame-memory.album-complete #nextRecall{grid-column:1;grid-row:3;min-height:54px;height:54px;margin:0 auto;align-self:center;font-size:20px;max-width:340px}
@media(max-width:800px) and (orientation:portrait){
 body.chimelong-game.rrdd-adventure #recall.frame-memory .recall-card{grid-template-rows:36px minmax(0,1fr);padding:6px!important;gap:5px!important}
 body.chimelong-game #recall.frame-memory .album-heading{gap:6px}
 body.chimelong-game #recall.frame-memory .album-heading h2{font-size:clamp(16px,4.6vw,25px)!important}
 body.chimelong-game #recall.frame-memory .album-progress{font-size:10px;padding:3px 6px}
 body.chimelong-game.rrdd-adventure #recall.frame-memory #memoryAlbum{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) clamp(100px,21dvh,190px) 32px 28px!important;gap:5px}
 .chimelong-photo-tray{grid-column:1;grid-row:2;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:7px;padding:0 2px 5px}
 body.chimelong-game #recall.frame-memory .chimelong-photo{padding:4px;border-width:2px;border-radius:10px;max-height:none}
 body.chimelong-game #recall.frame-memory .chimelong-photo span{font-size:clamp(11px,2.9vw,16px)}
 .chimelong-keepsakes{grid-row:3;gap:12px}.chimelong-keepsake{width:46px}.chimelong-keepsake:not(.saved){width:26px;height:26px}
 .chimelong-frame-note{grid-row:4;font-size:11px}
 body.chimelong-game.rrdd-adventure #recall.frame-memory #recallQuestion{font-size:clamp(15px,4.4vw,25px)!important;line-height:1.2}
 body.chimelong-game #recall.frame-memory .album-clue{gap:2px}
 body.chimelong-game.rrdd-adventure #recall.frame-memory.album-complete .recall-card{grid-template-rows:36px minmax(0,1fr) 58px}
 body.chimelong-game.rrdd-adventure #recall.frame-memory.album-complete #memoryAlbum{grid-template-rows:minmax(0,1fr) 32px!important}
 .chimelong-memory-gallery{grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));gap:4px;justify-items:center}
 .chimelong-gallery-item{height:100%;width:100%;min-height:0;gap:1px}.chimelong-gallery-item .chimelong-keepsake{width:auto;height:calc(100% - 20px);max-width:100%}.chimelong-gallery-item figcaption{font-size:13px}
}
@media(orientation:landscape) and (max-height:500px){
 body.chimelong-game.rrdd-adventure #recall.frame-memory .recall-card{grid-template-rows:28px minmax(0,1fr);padding:4px 8px!important;gap:3px!important}
 body.chimelong-game #recall.frame-memory .album-heading h2{font-size:19px!important}
 body.chimelong-game.rrdd-adventure #recall.frame-memory #memoryAlbum{grid-template-columns:minmax(0,1fr) minmax(165px,28%);grid-template-rows:minmax(0,1fr) 25px!important;gap:4px}
 .chimelong-photo-tray{gap:4px;padding:0 3px 4px}
 body.chimelong-game #recall.frame-memory .chimelong-photo{grid-template-columns:42% minmax(0,1fr);grid-template-rows:1fr;padding:2px;gap:3px;border-width:2px;border-radius:8px}
 body.chimelong-game #recall.frame-memory .chimelong-photo span{font-size:12px;align-self:center}
 body.chimelong-game.rrdd-adventure #recall.frame-memory #recallQuestion{font-size:clamp(14px,2.4vw,20px)!important;line-height:1.15}
 body.chimelong-game #recall.frame-memory .album-clue{gap:1px}
 .chimelong-keepsakes{grid-column:1;grid-row:2}.chimelong-keepsake{width:34px}.chimelong-keepsake:not(.saved){width:22px;height:22px;font-size:12px}
 .chimelong-frame-note{grid-column:2;grid-row:2;font-size:9px}
 body.chimelong-game.rrdd-adventure #recall.frame-memory.album-complete .recall-card{grid-template-columns:minmax(0,1fr) 190px;grid-template-rows:28px minmax(0,1fr)}
 body.chimelong-game #recall.frame-memory.album-complete .album-heading{grid-column:1/-1}
 body.chimelong-game.rrdd-adventure #recall.frame-memory.album-complete #nextRecall{grid-column:2;grid-row:2;font-size:18px;padding:6px}
 .chimelong-gallery-item figcaption{font-size:12px}
}
@media(prefers-reduced-motion:reduce){.chimelong-memory-frame.frame-filled{animation:none}}
/* Shared photo-flight class, used by the Halloween and Chimelong adapters. */
.memory-flying-photo{position:fixed;z-index:1000;pointer-events:none;object-fit:cover;object-position:center;transform-origin:0 0;background:#e2f7f5}
body.chimelong-game #recall.frame-memory .memory-answer #recallQuestion{display:none}
body.chimelong-game #recall.frame-memory .memory-answer .chimelong-frame-question{place-items:end;justify-content:end;padding:1%}
body.chimelong-game #recall.frame-memory .memory-answer .album-clue{width:44px}
body.chimelong-game #recall.frame-memory.album-complete .chimelong-frame-note{grid-column:1;grid-row:2}
body.chimelong-game #recall.frame-memory.album-complete .chimelong-memory-gallery{grid-column:1;grid-row:1}
