.memory-gallery-page{--mg-ink:#28251f;--mg-paper:#f5eedf;--mg-paper-deep:#e8dcc8;--mg-line:#cabda7;position:absolute;top:0;right:0;bottom:0;left:0;z-index:10044;display:none;flex-direction:column;overflow:hidden;color:var(--mg-ink);background-color:#ded3c1;background-image:radial-gradient(circle at 18% 12%,rgba(255,255,255,.55) 0 1px,transparent 1.5px),radial-gradient(circle at 77% 35%,rgba(73,60,43,.07) 0 1px,transparent 1.5px);background-size:13px 13px,17px 17px;font-family:"Songti SC","STSong","Noto Serif SC",serif}
.memory-gallery-page.show{display:flex;animation:menuSlideIn .25s cubic-bezier(.22,.61,.36,1)}.memory-gallery-page.closing{display:flex;animation:menuSlideOut .22s ease-in forwards}
.mg-head{height:58px;flex:0 0 auto;display:grid;grid-template-columns:46px 1fr 46px;align-items:center;padding:0 10px;border-bottom:1px solid rgba(74,62,47,.16);background:rgba(245,238,223,.92);backdrop-filter:blur(16px)}
.mg-head button{width:38px;height:38px;border:1px solid rgba(86,70,50,.14);border-radius:5px;background:#f9f3e7;color:#332f28;font:400 28px/1 sans-serif}.mg-head h2{text-align:center;font-size:18px;font-weight:700;letter-spacing:4px}.mg-head-mark{justify-self:center;width:27px;height:27px;display:grid;place-items:center;border:1px solid #a14b3c;color:#a14b3c;font-size:11px;transform:rotate(-4deg)}
.mg-body{flex:1;min-height:0;overflow-y:auto;padding:12px 13px calc(92px + env(safe-area-inset-bottom,0px));scrollbar-width:none}.mg-body::-webkit-scrollbar{display:none}
.mg-canvas-hero{position:relative;min-height:158px;padding:14px;border:7px solid #564a3b;border-radius:3px;background:#8d775e;box-shadow:0 9px 22px rgba(54,43,30,.18),inset 0 0 0 2px #b39b79;overflow:hidden}
.mg-painting{position:absolute;top:8px;right:8px;bottom:8px;left:8px;overflow:hidden;background:linear-gradient(180deg,#b8c5bf 0 45%,#d6c19d 46% 100%)}
.mg-painting:before{content:"";position:absolute;left:-8%;right:-8%;bottom:20%;height:54%;background:linear-gradient(155deg,transparent 0 24%,#6f806f 25% 45%,transparent 46%),linear-gradient(25deg,transparent 0 35%,#8f9879 36% 59%,transparent 60%);opacity:.92}
.mg-painting:after{content:"";position:absolute;left:11%;right:8%;bottom:10%;height:24%;border-radius:50% 45% 42% 56%;background:#8d7960;box-shadow:65px -10px 0 #a6916f,-35px 4px 0 #786d5c;filter:blur(.3px)}
.mg-hero-copy{position:relative;z-index:2;min-height:116px;display:flex;flex-direction:column;justify-content:flex-end;padding:12px;color:#fff;text-shadow:0 1px 8px rgba(28,23,18,.8)}.mg-hero-copy small{font-size:10px;letter-spacing:3px}.mg-hero-copy strong{margin-top:5px;font-size:23px;letter-spacing:2px}.mg-hero-copy span{margin-top:5px;font:400 11px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}
.mg-tabs{position:sticky;top:-1px;z-index:4;display:flex;gap:5px;margin:12px 0 9px;padding:5px;border:1px solid rgba(91,74,53,.13);border-radius:6px;background:rgba(245,238,223,.94);backdrop-filter:blur(12px)}.mg-tabs button{flex:1;height:34px;border:0;border-radius:4px;background:transparent;color:#756956;font:600 11px/1 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}.mg-tabs button.active{background:#4d473d;color:#fff;box-shadow:0 3px 9px rgba(50,43,34,.15)}
.mg-filter{display:flex;gap:6px;margin-bottom:10px;overflow-x:auto;scrollbar-width:none}.mg-filter::-webkit-scrollbar{display:none}.mg-filter button{flex:0 0 auto;height:29px;padding:0 10px;border:1px solid #cabea8;border-radius:15px;background:rgba(250,245,235,.72);color:#756957;font:500 10px/1 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}.mg-filter button.active{border-color:#8c493d;color:#8c493d;background:#f6e8df}
.mg-list{display:grid;gap:10px}.mg-card{position:relative;padding:15px 14px 12px;border:1px solid rgba(96,78,55,.2);border-radius:3px;background-color:var(--mg-paper);background-image:linear-gradient(rgba(113,91,62,.045) 1px,transparent 1px);background-size:100% 22px;box-shadow:0 5px 15px rgba(71,57,39,.09);transform:rotate(var(--mg-rotate,0deg));overflow:hidden}.mg-card:nth-child(3n+1){--mg-rotate:-.35deg}.mg-card:nth-child(3n+2){--mg-rotate:.28deg}.mg-card.pinned{border-color:#b56e52;box-shadow:inset 4px 0 0 #b56e52,0 6px 17px rgba(71,57,39,.11)}.mg-card.paused{opacity:.68;filter:saturate(.72)}.mg-card.deleted{opacity:.58;filter:grayscale(.25)}
.mg-card-top{display:flex;align-items:center;gap:7px;margin-bottom:8px;font:600 10px/1 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}.mg-type{padding:5px 7px;border-radius:3px;background:#ddd0b9;color:#574c3d}.mg-source{color:#998b77}.mg-pin{margin-left:auto;border:0;background:transparent;color:#a14b3c;font-size:16px}.mg-card p{margin:0;color:#302c26;font-size:14px;line-height:1.8;white-space:pre-wrap;word-break:break-word}.mg-card-foot{display:flex;align-items:center;margin-top:9px;color:#9a8c78;font:400 9px/1.3 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}.mg-card-foot button{margin-left:auto;padding:4px 7px;border:0;background:transparent;color:#70634f;font-size:10px}.mg-card-foot button+button{margin-left:4px}.mg-restore{color:#8c493d!important;font-weight:700}
.mg-empty{padding:46px 20px;text-align:center;border:1px dashed #b9aa92;background:rgba(248,242,231,.55);color:#8c806f}.mg-empty i{display:block;margin:auto;width:46px;height:46px;border:1px solid #a5967e;transform:rotate(4deg);font-style:normal;font-size:24px;line-height:46px}.mg-empty b{display:block;margin-top:15px;font-size:15px}.mg-empty span{display:block;margin-top:7px;font:400 11px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}
.mg-add{position:absolute;right:18px;bottom:calc(19px + env(safe-area-inset-bottom,0px));z-index:6;width:55px;height:55px;border:2px solid #eadbc1;border-radius:50%;background:#423d35;color:#fff;box-shadow:0 8px 22px rgba(42,35,27,.28);font-size:27px;font-family:serif}
.mg-editor-mask{position:absolute;top:0;right:0;bottom:0;left:0;z-index:8;display:none;align-items:flex-end;background:rgba(34,29,23,.48);backdrop-filter:blur(3px)}.mg-editor-mask.show{display:flex}.mg-editor{width:100%;max-height:86%;overflow-y:auto;padding:16px 16px calc(24px + env(safe-area-inset-bottom,0px));border-radius:14px 14px 0 0;background-color:#f6eedf;background-image:linear-gradient(90deg,rgba(125,96,59,.06) 1px,transparent 1px),linear-gradient(rgba(125,96,59,.05) 1px,transparent 1px);background-size:22px 22px;box-shadow:0 -10px 35px rgba(40,32,23,.22)}
.mg-editor-head{display:flex;align-items:center}.mg-editor-head h3{font-size:18px;letter-spacing:2px}.mg-editor-head button{margin-left:auto;width:33px;height:33px;border:0;border-radius:50%;background:#e8dcc7;color:#51483b;font-size:20px}.mg-editor label{display:block;margin:14px 2px 7px;color:#756956;font:600 11px/1 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}.mg-editor textarea{width:100%;min-height:112px;padding:13px;resize:none;border:1px solid #cbbda6;border-radius:5px;background:rgba(255,252,244,.84);color:#302b24;font:400 14px/1.7 "Songti SC","STSong",serif;outline:none}.mg-editor textarea:focus{border-color:#8f6752;box-shadow:0 0 0 3px rgba(143,103,82,.1)}
.mg-type-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.mg-type-grid button{height:36px;border:1px solid #cdbfa9;border-radius:4px;background:rgba(255,252,244,.72);color:#716553;font:600 10px/1 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}.mg-type-grid button.active{border-color:#8d4d40;background:#8d4d40;color:#fff}.mg-editor-flags{display:flex;gap:8px;margin-top:12px}.mg-editor-flags button{flex:1;height:39px;border:1px solid #cabba3;border-radius:5px;background:#f9f2e6;color:#6e6250;font-size:11px}.mg-editor-flags button.active{border-color:#a35746;background:#f3dfd6;color:#913f33}.mg-editor-actions{display:flex;gap:8px;margin-top:15px}.mg-editor-actions button{height:45px;border:0;border-radius:5px;font-size:13px;font-weight:700}.mg-save{flex:1;background:#423d35;color:#fff}.mg-delete{width:76px;background:#ead9d2;color:#963f32}.mg-count{margin:8px 2px 0;text-align:right;color:#a09380;font:400 9px/1 sans-serif}
html.auto-night .memory-gallery-page{--mg-ink:#eee6d8;--mg-paper:#26231e;--mg-paper-deep:#1d1b18;--mg-line:#4b4439;background-color:#151411;background-image:radial-gradient(circle at 18% 12%,rgba(255,255,255,.04) 0 1px,transparent 1.5px)}html.auto-night .mg-head,html.auto-night .mg-tabs{background:rgba(35,32,27,.94);border-color:#494238}html.auto-night .mg-head button{background:#2a2722;color:#eee6d8;border-color:#4b4439}html.auto-night .mg-card{background-color:#26231e;border-color:#494238}html.auto-night .mg-card p{color:#eee6d8}html.auto-night .mg-type{background:#3c372f;color:#d8cab5}html.auto-night .mg-empty{background:#24211c;border-color:#50483c}html.auto-night .mg-editor{background-color:#24211c;color:#eee6d8}html.auto-night .mg-editor textarea,html.auto-night .mg-type-grid button,html.auto-night .mg-editor-flags button{background:#2d2923;color:#eee6d8;border-color:#51483c}
