#study-screen>.study-modes{grid-template-columns:repeat(3,minmax(0,1fr))}
#study-memos{display:flex;flex-direction:column;flex:none;min-width:0;min-height:0;width:100%;max-width:780px;box-sizing:border-box;margin:18px auto 0;padding:0;border:0;color:#f8edda}
#study-memos[hidden],#study-memos [hidden]{display:none!important}
.memo-heading{display:flex;flex:none;align-items:center;justify-content:space-between;gap:8px;margin:0 0 8px}
.memo-heading h2{margin:0;color:#ffe1a3;font-size:20px;line-height:1.4}
.memo-heading p{margin:5px 0 0;color:#cbbdd0;font-size:14px;line-height:1.5}
#study-memos .memo-icon{display:grid;place-items:center;min-width:44px;min-height:44px;padding:8px;border:0;background:transparent;color:#efd097}
.memo-icon svg{width:24px;height:24px}
/* A compact composer and shared feed sit directly below today's quote. */
.memo-feed{flex:none;min-width:0;margin-top:12px}
.memo-composer{flex:none;margin:0;padding:12px;border:0;border-radius:12px;background:#211d28}
.memo-input-row{display:flex;gap:8px;align-items:stretch}
#memo-body{width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid #ffffff12;border-radius:8px;background:#15121d;color:#fff2db;font:inherit;font-size:16px}
#memo-submit{min-height:44px;flex:none;padding:10px 18px;font-size:16px}
#memo-submit:disabled{opacity:.5}
.memo-form-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:4px;font-size:12px;line-height:1.5}
#memo-count{white-space:nowrap;font-variant-numeric:tabular-nums;color:#bcb1c5}
.memo-status{font-size:14px;line-height:1.6;color:#efd39f;margin:12px 0 0}
.memo-status:empty{display:none}
.memo-list{display:grid;gap:10px}
.memo-item{min-width:0;padding:14px;border:0;border-radius:12px;background:#201c27}
.memo-item header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;min-width:0}
.memo-item header strong{font-size:15px;color:#f2d396;overflow-wrap:anywhere;min-width:0}
.memo-item time{font-size:12px;color:#b9acbf;margin:0;white-space:normal}
.memo-mine{font-size:11px;color:#c8b888}
.memo-item p{font-size:16px;line-height:1.65;overflow-wrap:anywhere;word-break:normal;margin:9px 0 0;color:#fff1dc}
.memo-reactions{display:flex;justify-content:flex-end;margin-top:12px}
#study-memos .memo-delete{min-height:36px;padding:5px 8px;border:0;background:transparent;font-size:13px;color:#d2b5bd}
#study-memos .memo-edit{min-height:36px;padding:5px 8px;border:0;background:transparent;font-size:13px;color:#f3d79e}
#memo-edit-cancel{min-height:44px;margin-top:12px;font-size:14px}
.memo-empty{padding:24px 16px;margin:0;border:0;background:#211d28;border-radius:12px;text-align:center;line-height:1.7;color:#cdbed1;font-size:15px}
#memo-more{display:block;width:100%;min-height:44px;margin-top:14px;font-size:15px}
@media(max-width:420px){.memo-heading h2{font-size:19px}.memo-composer{padding:10px 12px}.memo-item{padding:13px}.memo-input-row{gap:6px}#memo-submit{padding-inline:13px}.memo-form-meta{font-size:11px}}
/* Reset the shared mobile footer layout so reactions do not stretch across a card. */
@media(max-width:740px){
 #study-memos .memo-reactions{flex-direction:row;align-items:center;justify-content:flex-end;gap:0;margin-top:6px;padding:0}
 #study-memos .memo-reactions .community-like{flex:0 0 auto;width:auto;min-width:0;min-height:36px;padding:6px 10px;gap:5px;font-size:14px;line-height:1.4}
 #study-memos .memo-reactions .community-like-icon{width:16px;height:16px}
}

/* Keep author metadata together and all occasional actions in one disclosure. */
.memo-author-info{display:flex;flex:1;flex-direction:column;gap:2px;min-width:0}
.memo-author-name{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;min-width:0}
#study-memos .community-author{width:100%;gap:9px}
.memo-tools{position:relative;align-self:start}
.memo-tools>summary{display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;list-style:none;cursor:pointer;font-size:24px;color:#c8b9cf}
.memo-tools>summary::-webkit-details-marker{display:none}
.memo-tools[open]>summary,.memo-tools>summary:hover{background:#ffffff0a;color:#ffe1a2}
.memo-tools-menu{position:absolute;top:calc(100% + 2px);right:0;z-index:20;display:grid;min-width:144px;padding:6px;border:1px solid #ffffff14;border-radius:10px;background:#302936;box-shadow:0 10px 28px #0007}
#study-memos .memo-tools-menu button{width:100%;min-height:44px;margin:0;padding:10px 14px;text-align:left;font-size:14px;border-radius:6px}
#study-memos .memo-tools-menu button:hover{background:#ffffff0a}
#study-memos :is(summary,input,button):focus-visible{outline:2px solid #ffe1a2;outline-offset:2px}
#memo-reward-guide .reward-guide-open{margin:0;padding:4px 0!important;min-height:32px;border:0!important;border-radius:0;color:#c8b8cd!important;font-size:12px!important;text-align:left;white-space:normal}
#memo-body::placeholder{color:#a99caf;opacity:1;font-size:14px}
.memo-tools:not([open])>.memo-tools-menu{display:none}
