.memory-hook{border:2px solid #b45b78;border-radius:14px;background:#090e0c;color:#fff4f6;padding:16px;margin:8px 0 14px;text-align:left}
.memory-hook-top{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.memory-hook h3{font:800 13px/1.4 'DM Sans',sans-serif;letter-spacing:1.5px;color:#ff9dc4;margin:0}
.memory-hook-stage{box-sizing:border-box;padding:10px 0 4px;min-height:130px}.memory-hook-stage p{margin:10px 0;font:500 15px/1.5 'DM Sans',sans-serif}
.memory-hook-phrase{display:block;font:800 clamp(22px,3vw,28px)/1.25 'DM Sans',sans-serif;color:#ff9dc4}
.memory-hook-stage.is-concealed{background:#10241e;color:#fff8ef;padding:20px;border-radius:8px;min-height:130px;display:flex;flex-direction:column;justify-content:center;user-select:none}.memory-hook-stage.is-concealed strong{font-size:20px}.memory-hook-stage.is-concealed p{font-style:italic}
#studyRatingDialog .memory-hook button,#studyRatingDialog #gradeRetry{background:#255b40;color:#fff;border:1px solid #255b40;border-radius:8px;min-height:44px;padding:8px 12px;cursor:pointer}
#studyRatingDialog .memory-hook button:hover,#studyRatingDialog #gradeRetry:hover{background:#19492f}.memory-hook details{margin-top:0}.memory-hook summary{color:#ff9dc4;font-weight:700;cursor:pointer;min-height:30px}.memory-hook details p{white-space:pre-line;font-size:14px}.memory-hook h4{margin-bottom:0}.memory-hook [role=status]{font-size:13px;font-weight:600}.memory-hook [hidden]{display:none!important}
.memory-hooks-library{width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;box-sizing:border-box;padding:24px;background:#f8f2e8;color:#24382d;border:2px solid #b45b78;border-radius:16px;font:15px/1.6 'DM Sans',sans-serif}.memory-hooks-library::backdrop{background:#06100bd9}.memory-hooks-library h2{font:600 28px 'Playfair Display',serif}.memory-hooks-library article{background:#f5e3e8;border:1px solid #b45b78;border-radius:12px;padding:16px;margin-top:16px}.memory-hooks-library h3{font-size:15px}.memory-hooks-library strong{font-size:20px}.memory-hooks-library article p{white-space:pre-line}.memory-hooks-library button{min-height:44px;background:#255b40;color:white;border:0;border-radius:8px;padding:8px 16px;cursor:pointer}.memory-hooks-library button:focus-visible,.memory-hook button:focus-visible{outline:3px solid #81324b;outline-offset:3px}
@media(max-width:620px){.memory-hook{padding:12px}.memory-hook-top{display:block}.memory-hook-top button{margin-top:8px}.memory-hooks-library{padding:18px}}
/* Icon picture between the hook phrase and its imagery line */
.memory-hook-picture{margin:12px 0 4px;padding:14px 10px 8px;border-radius:12px;background:#E9F1E6;color:#173D2C}
.memory-hook-picture.is-drawn{padding:0;overflow:hidden;background:#F3EBDD}
.memory-hook-picture.is-drawn{width:fit-content;max-width:100%;margin:8px 0 0}.memory-hook-picture.is-drawn img{display:block;width:auto;height:min(26dvh,220px);max-width:100%;aspect-ratio:1/1;object-fit:cover}
.memory-hook-row{display:grid;grid-template-columns:auto 1fr;gap:16px;align-items:center}.memory-hook-row p{margin:8px 0 0}
.memory-hook-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;margin-top:6px}.memory-hook-actions details{margin:0;flex:1 1 100%;order:2}.memory-hook-actions details[open]{flex-basis:100%}.memory-hook-actions details:not([open]){flex:0 1 auto;order:0}
.memory-hook #memoryHookStatus:empty{display:none}
@media(max-width:620px){.memory-hook-row{display:block}.memory-hook-picture.is-drawn{margin:8px auto 0}.memory-hook-picture.is-drawn img{height:min(32dvh,260px)}}
.mhp-row{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:10px 18px}
.mhp-item{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:86px;max-width:150px;text-align:center}
.mhp-icons{display:flex;gap:4px}.mhp-icons img{width:56px;height:56px;display:block}
.memory-hook-picture.is-vs .mhp-icons img{width:72px;height:72px}
.mhp-label{font:700 13px/1.25 'DM Sans',sans-serif}
.mhp-vs{align-self:center;margin-top:-18px;font:800 20px 'DM Sans',sans-serif;color:#6B1F3A}
.mhp-credit{margin-top:8px;text-align:right;font:400 10px 'DM Sans',sans-serif;opacity:.6}
@media(max-width:480px){.mhp-icons img{width:44px;height:44px}.memory-hook-picture.is-vs .mhp-icons img{width:58px;height:58px}.mhp-item{min-width:70px}}

/* Failed/empty responses retain the review, without reserving an empty picture area. */
.memory-hook[data-state=error],.memory-hook[data-state=loading]{padding:10px 12px}
.memory-hook[data-state=error] .memory-hook-stage,.memory-hook[data-state=loading] .memory-hook-stage{display:none!important;min-height:0}
.memory-hook[data-state=error] #memoryHookHelp,.memory-hook[data-state=loading] #memoryHookHelp{display:none!important}
.memory-hook[data-state=error] #memoryHookStatus{margin:6px 0}
/* With a hook showing, the popup gets a little wider and tighter so it fits on screen without scrolling. */
@media(min-width:700px){.study-modal:has(#memoryHook:not([hidden])){max-width:700px;padding:26px 32px}}
@media(min-width:700px){.study-modal:has(#memoryHook:not([hidden])) .memory-hook{padding:12px 16px;margin:6px 0 8px}.study-modal:has(#memoryHook:not([hidden])) #popupReinforce{min-height:0;height:68px}.study-modal:has(#memoryHook:not([hidden])) .memory-hook-stage{min-height:0;padding-top:6px}.memory-hook-picture.is-drawn img{height:min(23dvh,200px)}}
