/* Memory menus own their viewport. Gallery pages contain one complete row. */
:root{--reel-columns:3}#memory-home{grid-column:1/-1}
#modal.screen-menu[data-kind^="memory-"]{width:min(1240px,calc(100vw - 24px));height:calc(var(--menu-height,100dvh) - 24px);max-height:980px}
#modal.screen-menu[data-kind^="memory-"] #modal-content{padding:clamp(12px,2vw,24px);gap:12px;min-height:0}
#modal.screen-menu[data-kind^="memory-"] #modal-content .menu-header{flex:0 0 auto}
#modal.screen-menu[data-kind^="memory-"] #modal-content .menu-header h2{font-size:clamp(24px,3vw,36px);letter-spacing:.06em}
#modal.screen-menu[data-kind^="memory-"] #modal-content .menu-footer{flex:0 0 auto}
#modal.screen-menu[data-kind^="memory-"] #modal-content .modal-actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
#modal.screen-menu[data-kind^="memory-"] #modal-content .modal-actions button{font-size:21px;min-height:46px;padding:8px;line-height:1.3;white-space:normal}
#modal.screen-menu[data-kind^="memory-"] #modal-content .reel-scroll{flex:1 1 0;min-height:0;max-height:none;width:100%;overflow:auto;overscroll-behavior:contain;padding:2px 6px 8px;font-size:20px;line-height:1.6;box-sizing:border-box}
#modal.screen-menu[data-kind="memory-album"] #modal-content .reel-scroll{display:flex;flex-direction:column;gap:12px;overflow:hidden}
.reel-page-nav{display:grid;grid-template-columns:minmax(70px,1fr) auto minmax(70px,1fr);gap:10px;align-items:center;flex:0 0 auto}
.reel-page-nav>span{text-align:center;color:#214f40;font-size:18px}
#modal.screen-menu #modal-content .reel-page-nav button{font-size:20px;min-height:44px;padding:5px}
.reel-gallery{display:grid;grid-template-columns:repeat(var(--reel-columns),minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:14px;flex:1 1 0;min-height:0}
#modal.screen-menu[data-kind^="memory-"] #modal-content .reel-scroll :is(.reel-frame,.reel-album,.reel-tool){background:#15382f!important;color:#f3e6c8!important;text-shadow:none!important;border-radius:4px 14px!important}
#modal.screen-menu[data-kind^="memory-"] #modal-content .reel-scroll :is(.reel-frame,.reel-album,.reel-tool) :is(strong,small,span){color:#f3e6c8!important;text-shadow:none!important}
#modal.screen-menu[data-kind^="memory-"] #modal-content .reel-frame{display:grid;grid-template-rows:minmax(0,1fr) auto auto;align-content:stretch;width:100%;height:100%;min-width:0;min-height:0;padding:10px!important;gap:8px;text-align:left;overflow:visible}
.reel-frame strong{font-size:22px;line-height:1.45;overflow-wrap:anywhere}.reel-frame small{font-size:16px;line-height:1.45;overflow-wrap:anywhere}
.reel-preview{display:grid;place-items:center;width:100%;height:100%;min-height:0;overflow:hidden;background:#0b2026;color:#e9cb88}
.reel-preview img{display:block;width:100%;height:100%;min-height:0;object-fit:contain}
.reel-full-media{display:block;width:100%;max-height:58vh;object-fit:contain;background:#091a21}
.reel-albums,.reel-tool-grid{display:grid;gap:14px}.reel-album,.reel-tool{display:flex;flex-direction:column;gap:7px;text-align:left;padding:18px!important;min-height:90px}.reel-album strong,.reel-tool strong{font-size:24px;line-height:1.5}.reel-album span,.reel-tool span{font-size:18px;line-height:1.5}.reel-story{font-size:23px;line-height:1.7;color:#184d3c}.reel-empty{padding:16px;border:1px solid #9e884e}
@media(max-width:959px){:root{--reel-columns:2}}
@media(max-width:599px){:root{--reel-columns:1}#modal.screen-menu[data-kind^="memory-"]{width:calc(100vw - 12px);height:calc(var(--menu-height,100dvh) - 12px)}#modal.screen-menu[data-kind^="memory-"] #modal-content{padding:10px;gap:8px}#modal.screen-menu[data-kind^="memory-"] #modal-content .modal-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}#modal.screen-menu[data-kind^="memory-"] #modal-content .modal-actions button{font-size:19px;min-height:44px;padding:6px}.reel-page-nav{gap:6px}.reel-page-nav>span{font-size:16px}.reel-gallery{gap:8px}.reel-frame strong{font-size:21px}.reel-frame small{font-size:16px}}
@media(max-height:550px){#modal.screen-menu[data-kind^="memory-"] #modal-content{padding:8px;gap:6px}#modal.screen-menu[data-kind^="memory-"] #modal-content .modal-kicker{display:none}#modal.screen-menu[data-kind^="memory-"] #modal-content .menu-header h2{font-size:23px}#modal.screen-menu[data-kind^="memory-"] #modal-content .menu-header{padding-bottom:4px}#modal.screen-menu #modal-content .reel-page-nav button{min-height:36px;font-size:18px}.reel-frame strong{font-size:18px}.reel-frame small{font-size:14px}.reel-full-media{max-height:46vh}}
