body.halloween-game.rrdd-adventure #memory.frame-memory:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr) minmax(190px,25%);grid-template-rows:auto minmax(0,1fr) 42px;gap:10px!important;padding:12px!important;min-height:0!important;overflow:hidden!important;background:radial-gradient(ellipse at 40% 35%,#9465a8,#53316c 65%);border:1px solid #c398d2;border-radius:24px;position:relative}
body.halloween-game #memory.frame-memory>.mini-header{grid-column:1/-1;grid-row:1;min-height:32px;display:flex;align-items:center;justify-content:center;gap:14px;margin:0}
body.halloween-game #memory.frame-memory h2{font-size:clamp(19px,2.6vw,32px);color:#fff0bc;margin:0;text-shadow:0 2px #4a245e}
body.halloween-game #memory.frame-memory #memoryProgress{display:block!important;font-size:15px;color:#ffe5a2;white-space:nowrap}
body.halloween-game #memory.frame-memory #book{grid-column:1;grid-row:2;display:flex!important;align-items:center;justify-content:center;position:relative;padding:0!important;margin:0!important;width:100%!important;min-width:0;min-height:0!important;height:100%!important;max-height:none!important;aspect-ratio:auto!important;background:none!important;border:0!important;box-shadow:none!important;overflow:visible;isolation:isolate}
body.halloween-game #memory.frame-memory #book:before,body.halloween-game #memory.frame-memory #book:after{display:none!important}
.halloween-frame{position:relative;aspect-ratio:3/2;flex:none;max-width:100%;filter:drop-shadow(0 12px 10px #1c0a2866)}
body.halloween-game #memory.frame-memory #photoSlot{position:absolute;left:12.5%;top:18%;width:75%;height:63%;inset:auto auto auto auto;left:12.5%;top:18%;padding:0!important;margin:0;border:0;border-radius:12px;background:radial-gradient(ellipse,#fff8e4,#ebce9e);overflow:hidden;z-index:1;display:block;min-height:0;box-shadow:inset 0 5px 14px #6d361943;transform:none}
.memory-frame-art{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none;object-fit:contain}
.frame-question{position:absolute;left:14%;top:20%;width:72%;height:59%;padding:3%;box-sizing:border-box;display:grid;place-items:center;z-index:2;pointer-events:none}
body.halloween-game #memory.frame-memory #memoryClue{position:static;width:100%;height:auto;min-height:44px;max-height:100%;padding:6px;margin:0;border:0;border-radius:0;background:transparent;color:#56306b;font-size:clamp(18px,2.5vw,32px);line-height:1.3;font-weight:800;box-shadow:none;text-align:center;pointer-events:auto;overflow:visible;white-space:normal;text-shadow:0 1px #fff8}
body.halloween-game #memory.frame-memory.memory-answer .frame-question{display:none}
.framed-answer{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 60%;box-shadow:inset 0 3px 10px #24112b77}
body.halloween-game #memory.frame-memory #photoSlot.drop-near{box-shadow:0 0 20px 8px #ffe58d,inset 0 0 12px #f8b9ff;outline:3px solid #fff0ad}
.halloween-frame.frame-filled{animation:memoryFrameGlow 1s ease-out}
@keyframes memoryFrameGlow{0%,100%{filter:drop-shadow(0 12px 10px #1c0a2866)}35%{filter:drop-shadow(0 0 22px #ffe591) brightness(1.12)}}
.memory-flying-photo{position:fixed;z-index:1000;pointer-events:none;object-fit:cover;object-position:50% 60%;transform-origin:0 0}
body.halloween-game #memory.frame-memory #photoTray{grid-column:2;grid-row:2;display:grid!important;grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));align-items:center;justify-items:center;gap:9px;width:100%;height:100%;min-height:0;margin:0;padding:3px;overflow:visible}
body.halloween-game #memory.frame-memory #photoTray .photo{width:100%;max-width:230px;height:100%;max-height:190px;min-height:44px;display:grid;grid-template-rows:minmax(0,1fr) auto;padding:6px 6px 4px;gap:2px;margin:0;transform:none;background:#fff6e4;border:3px solid transparent;border-radius:12px;box-shadow:0 5px 8px #20102e55;touch-action:none;overflow:hidden}
body.halloween-game #memory.frame-memory #photoTray .photo img{width:100%;height:100%;min-height:0;object-fit:contain;background:#f1dfc7;border-radius:5px}
body.halloween-game #memory.frame-memory #photoTray .photo span{display:block;color:#193f60;font-size:clamp(12px,1.4vw,18px);font-weight:800;line-height:1.2;padding:2px 0}
body.halloween-game #memory.frame-memory #photoTray .photo:before{display:none}
body.halloween-game #memory.frame-memory #photoTray .photo.selected{border-color:#ffe379;box-shadow:0 0 0 3px #b68ad7,0 6px 10px #20102e66;translate:0 -3px}
body.halloween-game #memory.frame-memory #photoTray .photo:disabled{opacity:.55}
body.halloween-game #memory.frame-memory #memories{grid-column:1/-1;grid-row:3;display:flex!important;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;padding:0;margin:0;position:static;transform:none}
.memory-keepsake{position:relative;aspect-ratio:3/2;width:64px;flex:none;filter:drop-shadow(0 3px 3px #24112d66)}
.keepsake-photo{position:absolute;left:12.5%;top:18%;width:75%;height:63%;object-fit:cover;object-position:50% 60%;border-radius:6px}
.keepsake-rim{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.memory-keepsake>span{display:none}
.memory-waiting{display:grid;place-items:center;width:34px;height:34px;border:2px solid #c29fda;border-radius:50%;background:#2e173f88;color:#e6caed;font-size:18px;font-weight:800}
body.halloween-game #memory.frame-memory #memoryFeedback{display:none!important}
body.halloween-game #memory.frame-memory .memory-finish-actions{display:none}
body.halloween-game #memory.frame-memory.complete:not([hidden]){grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr) auto}
body.halloween-game #memory.frame-memory.complete #book,body.halloween-game #memory.frame-memory.complete #photoTray{display:none!important}
body.halloween-game #memory.frame-memory.complete #memories{grid-row:2;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-content:center;justify-items:center}
body.halloween-game #memory.frame-memory.complete .memory-keepsake{width:100%;max-width:480px}
body.halloween-game #memory.frame-memory.complete .memory-keepsake>span{display:block;position:absolute;top:100%;left:0;right:0;text-align:center;color:#fff1c1;font-weight:800;font-size:clamp(14px,1.8vw,22px);padding:5px}
body.halloween-game #memory.frame-memory.complete .memory-finish-actions{grid-row:3;display:flex;flex-direction:column;align-items:center;gap:6px;padding-top:12px}
body.halloween-game #memory.frame-memory #claimTrophy{font-size:clamp(17px,2vw,25px);min-height:54px;margin:0;padding:10px 22px;max-width:100%}
body.halloween-game #memory.frame-memory #specialSweet{margin:0}
@media(max-width:800px){
 body.halloween-game.rrdd-adventure #memory.frame-memory:not([hidden]){grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) clamp(96px,17dvh,150px) 32px;gap:7px!important;padding:8px!important;border-radius:20px}
 body.halloween-game #memory.frame-memory>.mini-header{min-height:30px;gap:8px}
 body.halloween-game #memory.frame-memory h2{font-size:clamp(18px,4.8vw,25px)}
 body.halloween-game #memory.frame-memory #memoryProgress{font-size:13px}
 body.halloween-game #memory.frame-memory #book{grid-column:1;grid-row:2}
 body.halloween-game #memory.frame-memory #photoTray{grid-column:1;grid-row:3;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:6px;padding:0}
 body.halloween-game #memory.frame-memory #photoTray .photo{padding:4px;border-width:2px;max-height:none;border-radius:9px}
 body.halloween-game #memory.frame-memory #photoTray .photo span{font-size:clamp(10px,2.8vw,14px)}
 body.halloween-game #memory.frame-memory #memories{grid-row:4;gap:10px}
 .memory-keepsake{width:46px}.memory-waiting{height:25px;width:25px;font-size:14px}
 body.halloween-game #memory.frame-memory #memoryClue{font-size:clamp(15px,4.5vw,24px);line-height:1.2;padding:2px}
 body.halloween-game.rrdd-adventure #memory.frame-memory.complete:not([hidden]){grid-template-rows:auto minmax(0,1fr) auto}
 body.halloween-game #memory.frame-memory.complete #memories{grid-row:2;grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));gap:14px;align-items:center}
 body.halloween-game #memory.frame-memory.complete .memory-keepsake{width:auto;height:calc(100% - 18px);max-width:100%}
 body.halloween-game #memory.frame-memory.complete .memory-keepsake>span{font-size:13px;padding:0}
 body.halloween-game #memory.frame-memory.complete .memory-finish-actions{grid-row:3;padding-top:5px}
 body.halloween-game #memory.frame-memory #claimTrophy{font-size:16px;min-height:50px;padding:8px 12px}
}
@media(prefers-reduced-motion:reduce){.halloween-frame.frame-filled{animation:none}}

@media(orientation:landscape) and (max-height:500px){
 body.halloween-game.rrdd-adventure #memory.frame-memory:not(.complete):not([hidden]){grid-template-columns:minmax(0,1fr) minmax(130px,25%);grid-template-rows:28px minmax(0,1fr) 25px;gap:4px!important;padding:5px!important}
 body.halloween-game #memory.frame-memory:not(.complete) #photoTray{grid-column:2;grid-row:2;grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));gap:4px}
 body.halloween-game #memory.frame-memory:not(.complete) #photoTray .photo{display:grid;grid-template-columns:45% minmax(0,1fr);grid-template-rows:1fr;gap:3px;padding:2px}
 body.halloween-game #memory.frame-memory:not(.complete) #photoTray .photo span{font-size:11px;align-self:center}
 body.halloween-game #memory.frame-memory:not(.complete) #memories{grid-column:1/-1;grid-row:3}
 body.halloween-game #memory.frame-memory #memoryClue{font-size:clamp(13px,2.5vw,21px)}
 body.halloween-game #memory.frame-memory.complete #memories{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr}
 body.halloween-game #memory.frame-memory.complete .memory-keepsake{width:100%;height:auto}
}
