.memoryScreen{position:fixed;inset:0;z-index:110;overflow:auto;background:radial-gradient(circle at 50% 0,rgba(231,181,31,.13),transparent 42%),var(--bg);color:var(--text);font-family:Arial,sans-serif;padding:16px max(12px,env(safe-area-inset-right)) 34px max(12px,env(safe-area-inset-left))}
.memoryScreen[hidden]{display:none}
.memoryShell{max-width:1040px;margin:auto}
.memoryHeader{display:flex;align-items:center;gap:12px;justify-content:space-between;margin-bottom:18px}
.memoryBrand{display:flex;align-items:center;gap:10px;min-width:0}.memoryBrand img{width:48px;height:48px;object-fit:contain}.memoryBrand span{font-size:14px;font-weight:800;letter-spacing:.06em}
.memoryHeaderActions{display:flex;gap:8px;align-items:center}
.memoryScreen button{font:inherit;cursor:pointer}
.memoryScreen button:focus-visible,.memoryLesson button:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.memoryTextButton,.memoryPrimary,.memorySecondary{border:1px solid var(--border);border-radius:12px;min-height:48px;padding:10px 15px;background:var(--panel);color:var(--text);font-size:14px;font-weight:700}
@media (hover:hover){.memoryTextButton:hover,.memorySecondary:hover{border-color:var(--gold)}}.memoryPrimary{background:var(--gold);color:#14110a;border-color:var(--gold);font-weight:900}@media (hover:hover){.memoryPrimary:hover{filter:brightness(1.08)}}
.memoryIntro{text-align:center;max-width:730px;margin:clamp(12px,5vh,46px) auto 20px}.memoryEyebrow{font-size:13px;color:var(--gold2);font-weight:800;letter-spacing:.18em;text-transform:uppercase}.memoryIntro h1{font-size:clamp(30px,7vw,58px);line-height:1.05;margin:12px 0;color:var(--text)}.memoryIntro p{font-size:17px;line-height:1.5;color:var(--muted);margin:0}
.memoryModes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;max-width:880px;margin:30px auto}
.memoryMode{min-height:188px;text-align:left;border:1px solid var(--border);border-radius:20px;background:var(--panel);color:var(--text);padding:22px;box-shadow:0 15px 35px var(--shadow);display:flex;flex-direction:column;justify-content:space-between}
.memoryMode:focus-visible{border-color:var(--gold);transform:translateY(-2px)}@media (hover:hover){.memoryMode:hover{border-color:var(--gold);transform:translateY(-2px)}}.memoryMode strong{font-size:25px}.memoryMode .memoryCount{font-size:16px;color:var(--gold2);font-weight:800}.memoryMode small{font-size:14px;color:var(--muted);line-height:1.45}
.memoryPlayHead{text-align:center;margin:0 auto 16px;max-width:720px}.memoryPlayHead h1{font-size:clamp(24px,5vw,38px);margin:7px 0}.memoryPlayHead p{margin:0;color:var(--muted);font-size:16px;line-height:1.45}.memoryProgress{height:8px;max-width:620px;background:var(--panel2);border-radius:99px;margin:16px auto 8px;overflow:hidden}.memoryProgress span{display:block;height:100%;background:var(--gold);transition:width .25s}.memoryProgressText{font-size:14px;color:var(--muted);font-weight:700}
.memoryBoard{--mobile-cols:3;--wide-cols:4;display:grid;grid-template-columns:repeat(var(--mobile-cols),minmax(0,1fr));gap:8px;width:min(100%,690px);margin:12px auto 28px}.memoryBoard[data-difficulty="medium"]{--mobile-cols:4;--wide-cols:5}.memoryBoard[data-difficulty="hard"]{--mobile-cols:5;--wide-cols:6}
.memoryCard{aspect-ratio:4/5;min-height:55px;position:relative;padding:0;border:0;background:transparent;perspective:700px;border-radius:12px}.memoryCardInner{display:block;position:absolute;inset:0;transform-style:preserve-3d;transition:transform .48s cubic-bezier(.2,.72,.25,1)}.memoryCard.is-up .memoryCardInner{transform:rotateY(180deg)}
.memoryFace{position:absolute;inset:0;backface-visibility:hidden;border-radius:12px;display:flex;align-items:center;justify-content:center;overflow:hidden}.memoryBack{background:linear-gradient(145deg,#1d3a42,#071c26);border:2px solid #d6ad41;box-shadow:0 5px 12px var(--shadow)}.memoryBack img{width:68%;height:68%;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(0,0,0,.3))}.memoryFront{transform:rotateY(180deg);background:#fffaf0;border:2px solid #cba65b;box-shadow:0 5px 12px var(--shadow)}
.memoryArt{display:block;width:100%;aspect-ratio:1;background-image:var(--art-url,url("bible-memory-icons.webp?v=20261003"));background-repeat:no-repeat;background-size:500% 300%;background-position:var(--art-x) var(--art-y);border-radius:9px}
.memoryVolumeName{font-size:14px;font-weight:800;color:var(--gold2);margin-top:5px}
.memoryCard .memoryArt{width:92%}.memoryCard.is-matched{opacity:.48}.memoryCard.is-matched .memoryFront{border-color:var(--gold)}.memoryCard:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.memoryCard.is-celebrating .memoryFront{box-shadow:0 0 0 4px var(--gold),0 0 25px rgba(231,181,31,.55)}
.memoryMessage{text-align:center;min-height:24px;color:var(--gold2);font-weight:800;font-size:15px}
.memoryQuiz,.memoryResults{max-width:710px;margin:28px auto;background:var(--panel);border:1px solid var(--border);border-radius:22px;padding:clamp(18px,4vw,34px);box-shadow:0 15px 45px var(--shadow)}.memoryQuiz h2,.memoryResults h2{font-size:clamp(24px,5vw,36px);line-height:1.15;margin:8px 0 12px}.memoryQuiz .memoryArt{width:100px;margin:0 auto 12px}.memoryQuestion{text-align:center;font-size:21px;font-weight:800;line-height:1.35}.memoryAnswers{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:22px 0}.memoryAnswer{min-height:56px;text-align:left;border:1px solid var(--border);background:var(--control);color:var(--text);border-radius:12px;padding:12px 15px;font-size:16px}@media (hover:hover){.memoryAnswer:hover:not(:disabled){border-color:var(--gold)}}.memoryAnswer.correct{border-color:#2e9863;background:#174634;color:#fff}.memoryAnswer.wrong{border-color:#bd5c58;background:#5a2527;color:#fff}.memoryAnswer:disabled{cursor:default}.memoryFeedback{border-left:4px solid var(--gold);padding:10px 14px;background:var(--panel2);font-size:16px;line-height:1.5;margin-bottom:18px}.memoryResults{text-align:center}.memoryScore{font-size:clamp(42px,10vw,72px);font-weight:900;color:var(--gold2);margin:12px 0}.memoryResultActions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.memoryBadge{border:1px solid var(--gold);border-radius:14px;display:inline-flex;align-items:center;gap:10px;padding:10px 14px;margin:8px 0 22px;font-weight:800}.memoryBadge .memoryArt{width:48px}
.memoryAnswer.symbol{text-align:center;display:flex;flex-direction:column;align-items:center;gap:5px;font-weight:800}.memoryAnswer.symbol .memoryArt{width:min(100%,125px);margin:0}.memoryAnswer.symbol span:last-child{font-size:15px}
.memoryLesson{width:min(92vw,580px);max-height:min(90dvh,850px);overflow:auto;border:1px solid var(--gold);border-radius:22px;padding:0;background:var(--panel);color:var(--text);box-shadow:0 25px 85px #0009}.memoryLesson::backdrop{background:rgba(0,0,0,.72);backdrop-filter:blur(3px)}.memoryLessonInner{padding:clamp(18px,4vw,30px)}.memoryLessonTop{display:flex;gap:18px;align-items:center}.memoryLessonTop .memoryArt{width:118px;flex:none;border:1px solid var(--border)}.memoryLesson h2{font-size:clamp(23px,5vw,31px);line-height:1.15;margin:0 0 8px}.memoryLesson .memoryRef{font-size:15px;font-weight:800;color:var(--gold2)}.memoryVerse{font:19px/1.5 Georgia,serif;border-left:3px solid var(--gold);padding-left:15px;margin:20px 0}.memoryVerse mark{background:rgba(231,181,31,.28);color:inherit;border-radius:3px}.memoryLesson p{font-size:16px;line-height:1.55}.memoryRemember{font-weight:800;color:var(--gold2)}.memoryLessonActions{display:flex;gap:10px;margin-top:20px}.memoryLessonActions button{flex:1}.memoryScreen [hidden],.memoryLesson [hidden]{display:none!important}
@media(min-width:750px){.memoryBoard{grid-template-columns:repeat(var(--wide-cols),minmax(0,1fr));gap:10px}}
@media(max-width:600px){.memoryModes{grid-template-columns:1fr;gap:10px;margin:24px auto}.memoryMode{min-height:0;padding:16px;gap:7px}.memoryMode strong{font-size:21px}.memoryHeader{margin-bottom:10px}.memoryBrand span{font-size:12px}.memoryHeaderActions{gap:5px}.memoryTextButton{padding:8px 10px;font-size:13px}.memoryAnswers{grid-template-columns:1fr}.memoryLessonTop .memoryArt{width:88px}.memoryLessonActions{flex-direction:column}.memoryBoard{gap:6px}.memoryCard{border-radius:8px}.memoryFace{border-radius:8px}}
@media(max-width:360px){.memoryBrand img{width:36px;height:36px}.memoryBrand span{display:none}.memoryBoard{gap:4px}}
@media(prefers-reduced-motion:reduce){.memoryCardInner,.memoryProgress span,.memoryMode{transition:none!important;animation:none!important}}
