/* Shared geometry; six deliberate visual systems. */
*{box-sizing:border-box}html,body{margin:0;min-height:100%;color:#20221f}body{font-family:"PingFang SC","Hiragino Sans GB",sans-serif;background:#f1f1ed}button,a,input{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible{outline:3px solid #e37635;outline-offset:4px}button{-webkit-tap-highlight-color:transparent}button:active:not(:disabled){translate:0 1px}a{color:inherit}.icon-sprite{position:absolute;width:0;height:0}.icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}img{max-width:100%;display:block}.studio{--paper:#fffef7;--page:#fffef7;--ink:#20221f;--muted:#64645b;--line:#20221f;--brand:#fff94c;--accent:#30bfe8;--cta:#232421;--cta-ink:#fff94c;--canvas:#e7f8fc;--ground:#30bfe8;--onboard:#fff94c;--header:#fff94c;--detail:#fff94c;--card:#fffef9;--caption:#fffef9;--yellow:#ffd150;--blue:var(--accent);--mint:var(--ground);--coral:#e77f40;--surface:var(--paper);--radius:19px 23px 17px 21px / 21px 18px 23px 17px;--display:"Hannotate SC","Wawati SC","KaiTi","STKaiti",cursive;display:grid;grid-template-columns:300px 1fr;min-height:100vh;color:var(--ink)}
.studio[data-theme=peach]{--page:#fff2e4;--paper:#fff9ee;--brand:#ffce61;--accent:#e77f40;--cta:#e77f40;--cta-ink:#251e18;--canvas:#ffead8;--ground:#ffce61;--onboard:#ffd6be;--header:#ffd6be;--detail:#fff0dd;--card:#fff7eb;--caption:#ffd6be}
.studio[data-theme=butter]{--page:#fffef8;--paper:#fffdf4;--brand:#f9e8a0;--accent:#b85339;--cta:#b85339;--cta-ink:#fff;--canvas:#fffdf6;--ground:#f9e8a0;--onboard:#fffef8;--header:#fffef8;--detail:#fffef8;--card:#fffef8;--caption:#fffef8}
.studio[data-theme=doodle]{--page:#fffdf1;--paper:#fffef7;--brand:#fff36e;--accent:#f63183;--cta:#f63183;--cta-ink:#211e1e;--canvas:#b8e9f6;--ground:#fff36e;--onboard:#fff36e;--header:#fff36e;--detail:#fffdf1;--card:#fffef7;--caption:#fffef7;--radius:23px 19px 25px 17px / 19px 26px 18px 23px}
.studio[data-theme=collage]{--page:#fffdf3;--paper:#fffdf3;--brand:#d8f66d;--accent:#3157d5;--cta:#3157d5;--cta-ink:#fff;--canvas:#afd0f8;--ground:#d8f66d;--onboard:#d8f66d;--header:#fffdf3;--detail:#fffdf3;--card:#fffdf3;--caption:#fffdf3;--radius:16px;--display:"PingFang SC","Hiragino Sans GB",sans-serif}
.studio[data-theme=journal]{--page:#faf6eb;--paper:#fffaf0;--ink:#293e33;--line:#455247;--muted:#60685d;--brand:#b8cdb5;--accent:#33483e;--cta:#33483e;--cta-ink:#fffaf0;--canvas:#cbe6f4;--ground:#b8cdb5;--onboard:#faf6eb;--header:#faf6eb;--detail:#faf6eb;--card:#fffaf0;--caption:#fffaf0;--radius:12px;--display:"Songti SC","STSong",serif}
.studio-side{padding:28px 28px 22px;border-right:1px solid #d7d8d1;background:#f7f7f2;display:flex;flex-direction:column;gap:24px}.side-logo{font-family:var(--display);font-size:25px;font-weight:800;display:flex;align-items:center;gap:8px}.side-top p{font-size:11px;color:#77786e;margin:6px 0 0}.side-heading>span{font-size:11px;color:#7b7c74}.side-heading h1{font-size:26px;line-height:1.5;letter-spacing:-.8px;margin:10px 0;font-weight:650}.side-heading p{font-size:12px;line-height:1.8;color:#73756d;margin:0}.side-section h2{font-size:11px;font-weight:600;color:#71736a;margin:0 0 10px}.theme-picker{display:grid;gap:6px}.theme-option{display:flex;align-items:center;gap:10px;border:1px solid transparent;background:transparent;text-align:left;padding:9px 11px;border-radius:12px;min-height:53px}.theme-option[aria-pressed=true]{background:#fff;border-color:#282a23;box-shadow:2px 2px 0 #d7d9cf}.theme-option strong{display:block;font-size:13px;font-weight:650}.theme-option em{font-style:normal;font-size:10px;color:#7a7c70;margin-right:4px}.theme-option small{font-size:10px;color:#7a7c70;display:block;margin-top:3px}.theme-swatch{width:30px;height:32px;background:linear-gradient(135deg,var(--swatch-a) 50%,var(--swatch-b) 50%);border:1px solid #282a23;border-radius:8px 10px 7px 9px;flex:none}.route-section{margin-top:0}#route-picker,.preview-controls{display:flex;gap:6px;flex-wrap:wrap}#route-picker button,.preview-controls button{border:1px solid #d0d2c7;background:#fff;padding:8px 10px;border-radius:7px;font-size:11px;min-height:36px}#route-picker button[aria-pressed=true]{background:#272a22;color:#fff;border-color:#272a22}.preview-section small{display:block;color:#8a8b80;font-size:10px;line-height:1.5;margin-top:9px}.side-foot{margin-top:auto;display:flex;gap:12px;flex-wrap:wrap}.side-foot a{font-size:10px;color:#777b6d;text-decoration:none}.preview-area{padding:24px;display:flex;align-items:center;flex-direction:column;justify-content:center;background:#eeefe9}.preview-caption{display:flex;align-items:center;width:390px;gap:7px;font-size:11px;margin-bottom:14px;color:#606456}.live-dot{width:6px;height:6px;background:var(--accent);border-radius:50%}.preview-hint{margin-left:auto;color:#999d90}.device{width:390px;height:min(844px,calc(100vh - 100px));min-height:660px;border:2px solid var(--ink);border-radius:35px 38px 32px 36px / 36px 33px 37px 34px;overflow:hidden;background:var(--page);box-shadow:0 10px 35px #30392612;position:relative}.phone-screen{height:100%;display:flex;flex-direction:column;position:relative;background:var(--page)}.status-bar{display:flex;align-items:center;justify-content:space-between;height:36px;min-height:36px;padding:0 26px;font:600 12px sans-serif;background:var(--header)}.device[data-route=onboard] .status-bar{background:var(--onboard)}.home-indicator{position:absolute;bottom:6px;left:50%;width:100px;height:4px;background:var(--ink);opacity:.8;border-radius:4px;transform:translateX(-50%);pointer-events:none;z-index:12}.preview-note{font-size:10px;color:#8a8e7e;margin:13px 0 0}.screen{flex:1;min-height:0;position:relative;overflow:hidden}.app-view{height:100%;display:flex;flex-direction:column;background:var(--page)}.view-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;padding-bottom:16px}.view-scroll::-webkit-scrollbar{display:none}.screen-pad{padding:0 20px}.brand{font:700 23px var(--display)}.clip-mini{display:inline-block;vertical-align:middle;width:13px;height:25px;border:2px solid var(--ink);background:var(--yellow);border-radius:4px;transform:rotate(-16deg)}.topbar,.editor-top{height:54px;min-height:54px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;background:var(--header)}.top-title,.editor-title strong{font-size:14px;font-weight:650}.icon-btn{border:0;background:transparent;display:grid;place-items:center;min-width:44px;min-height:44px;padding:0}.icon-btn.strong{background:var(--brand);border:2px solid var(--ink);border-radius:var(--radius)}.quiet-btn{border:0;background:transparent;padding:8px 0;min-height:44px;min-width:44px;font-size:12px}.primary-btn,.secondary-btn{min-height:49px;padding:10px 17px;display:flex;align-items:center;justify-content:center;gap:8px;border:2px solid var(--ink);border-radius:var(--radius);font-family:var(--display);font-size:17px;font-weight:600;text-decoration:none;position:relative;background:var(--cta);color:var(--cta-ink);box-shadow:none}.secondary-btn{background:var(--paper);color:var(--ink)}.primary-btn .icon,.secondary-btn .icon{width:19px;height:19px}.wide{width:100%}.text-link{border:0;background:transparent;min-height:44px;padding:6px 0;font-size:12px;display:inline-flex;gap:4px;align-items:center}.danger{color:#a33326}.bottom-nav{flex:none;min-height:77px;padding:5px 17px 15px;background:var(--paper);border-top:1.5px solid var(--line);display:flex;justify-content:space-around}.bottom-nav button{border:0;background:transparent;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;width:68px;min-height:54px;font-size:11px;border-radius:48% 45% 44% 42%;position:relative}.bottom-nav button[aria-current=page]{background:var(--accent);color:var(--ink)}.bottom-nav .icon{width:23px;height:23px}.studio[data-theme=butter] .bottom-nav button[aria-current],.studio[data-theme=collage] .bottom-nav button[aria-current],.studio[data-theme=journal] .bottom-nav button[aria-current]{color:#fff}.studio[data-theme=doodle] .bottom-nav button[aria-current]{background:var(--brand)}.studio[data-theme=peach] .bottom-nav button[aria-current]{background:var(--brand)}
/* One illustration language, composed of actual transparent character assets. */
.line-illustration{position:relative;min-height:170px;isolation:isolate}.mascot{position:relative;object-fit:contain;pointer-events:none;user-select:none}.line-illustration .mascot{position:absolute;left:8%;bottom:3%;height:76%;width:81%;object-position:center bottom;z-index:2}.line-illustration .mascot-sleep{height:65%}.illustration-rope{position:absolute;top:24%;left:-10%;width:120%;height:40px;border-bottom:2px solid var(--ink);border-radius:0 0 48% 54%;transform:rotate(-3deg)}.ground-drawing{position:absolute;bottom:0;left:0;width:100%;height:54px;pointer-events:none;z-index:0}.line-illustration .ground-drawing{height:32%;bottom:0}.doodle-flower{position:absolute;bottom:9%;right:7%;width:40px;height:66px;color:var(--ink);z-index:3;pointer-events:none}.drawn-sun{position:absolute;left:16%;top:5%;width:31px;height:31px;border-radius:45% 49% 44% 48%;background:var(--yellow);outline:6px dashed var(--yellow);outline-offset:7px}.onboard{height:100%;background:var(--onboard);display:flex;flex-direction:column;padding:0 22px 26px;overflow:hidden}.onboard-top{display:flex;align-items:center;justify-content:space-between;min-height:49px}.onboard .line-illustration{flex:1;margin:0 -22px 6px;min-height:170px}.onboard-copy h1{font:700 clamp(27px,3.2vh,35px)/1.55 var(--display);letter-spacing:1px;text-align:center;margin:9px 0 6px}.onboard-copy h1:after{content:"";display:block;width:72px;border-top:4px solid var(--accent);transform:rotate(-3deg);border-radius:50%;margin:6px auto}.onboard-copy p{text-align:center;font:13px/1.7 var(--display);margin:8px 0 0}.onboard-dots{display:flex;justify-content:center;margin:8px 0;gap:0}.onboard-dots button{width:34px;height:34px;display:grid;place-items:center;border:0;background:none}.onboard-dots i{width:7px;height:7px;border:1.5px solid var(--ink);border-radius:45%;background:transparent}.onboard-dots [aria-pressed=true] i{background:var(--accent)}.onboard .primary-btn{background:var(--paper);color:var(--ink);min-height:53px}.studio[data-theme=butter] .onboard .primary-btn,.studio[data-theme=journal] .onboard .primary-btn,.studio[data-theme=collage] .onboard .primary-btn,.studio[data-theme=doodle] .onboard .primary-btn{background:var(--cta);color:var(--cta-ink)}.studio[data-theme=peach] .onboard .primary-btn{background:var(--brand)}.studio[data-theme=journal] .onboard .line-illustration{background:var(--brand);border-radius:0 0 50% 6%/0 0 8% 3%}.studio[data-theme=collage] .onboard-copy{order:-1;margin-top:10px}.studio[data-theme=collage] .onboard-top{order:-2}.studio[data-theme=collage] .onboard-copy h1{text-align:left;font-weight:900;line-height:1.4}.studio[data-theme=collage] .onboard-copy p{text-align:left}.studio[data-theme=collage] .onboard-copy h1:after{display:none}
/* The canvas owns the editor. */
.editor-title{display:flex;align-items:center;gap:6px}.editor-top{padding:0 13px}.template-switch{display:flex;align-items:center;gap:4px;font-size:11px}.template-switch .icon{width:13px;height:13px;transform:rotate(90deg)}.editor-body{flex:1;display:flex;flex-direction:column;min-height:0;background:var(--canvas)}.editor-scene{position:relative;flex:1;min-height:180px;margin:0;overflow:hidden;background:var(--canvas);touch-action:pan-y;user-select:none;cursor:grab;isolation:isolate}.editor-scene.dragging{cursor:grabbing}.scene-rope{position:absolute;top:-17px;left:-8%;width:116%;height:53px;border-bottom:2px solid var(--ink);border-radius:0 0 48% 53%;transform:rotate(-1deg);z-index:1}.photo-rail{position:absolute;inset:18px 0 47px;display:flex;width:100%;transform:translateX(calc(-73% + var(--drag-x,0px)));will-change:transform;z-index:2}.photo-slot{position:relative;flex:0 0 82%;height:100%;min-width:0}.photo-hanger{position:absolute;inset:0;transform-origin:50% 16px;transform:rotate(calc(var(--rest-angle,-2deg) + var(--drag-angle,0deg)));transition:transform 350ms ease-out}.dragging .photo-hanger{transition:none}.scene-peg{position:absolute;z-index:4;left:50%;top:0;width:18px;height:51px;background:var(--yellow);border:2px solid var(--ink);border-radius:3px 4px 2px 4px;transform:translateX(-50%) rotate(7deg)}.scene-peg:after{content:"";position:absolute;left:4px;top:22px;width:6px;height:6px;border:1.5px solid var(--ink);border-radius:50%;background:var(--paper)}.hanging-photo{position:absolute;left:50%;top:31px;bottom:0;transform:translateX(-50%);width:94%;height:auto;padding:10px 10px 27px;border:2px solid var(--ink);border-radius:8px 6px 9px 5px/7px 10px 5px 8px;background:var(--paper);cursor:inherit;max-height:none;box-shadow:none}.hanging-photo>img{width:100%;height:100%;object-fit:cover;border-radius:2px;pointer-events:none}.remove-photo{position:absolute;right:-4px;top:-5px;width:29px;height:29px;padding:4px;display:grid;place-items:center;background:var(--paper);border:1.5px solid var(--ink);border-radius:48%;z-index:5}.remove-photo:after{content:"";position:absolute;inset:-7px}.remove-photo .icon{width:17px;height:17px}.editor-scene .ground-drawing{height:32px;bottom:0;z-index:0}.editor-meta{height:26px;flex-shrink:0;position:relative;display:flex;justify-content:center;align-items:center;font-size:11px;letter-spacing:1px}.photo-more{position:absolute;right:13px;top:-9px;width:44px;height:44px;display:grid;place-items:center;padding:0;z-index:3}.photo-more .icon{width:19px;height:19px}.editor-actions{display:flex;gap:12px;padding:6px 18px 25px}.editor-actions .secondary-btn{flex:1;font-size:15px;padding:8px}.editor-actions .primary-btn{flex:1.1;font-size:15px;padding:8px}.scene-empty{position:absolute;inset:60px 20px 40px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px}.scene-empty .mascot{width:80%;max-height:75%}.scene-empty p{font:15px var(--display);text-align:center}.editor-scene[data-style=check],.detail-scene[data-style=check]{background:#ffe6ef}.editor-scene[data-style=night],.detail-scene[data-style=night]{background:#e7e0f6}.editor-scene[data-style=meadow],.detail-scene[data-style=meadow]{background:#f4edd7}.editor-scene[data-style=check] .hanging-photo,.detail-scene[data-style=check] .hanging-photo,.studio[data-theme=collage] .hanging-photo{background:conic-gradient(#fff0f6 25%,#f6a5c1 0 50%,#fff0f6 0 75%,#f6a5c1 0) 0 0/20px 20px;padding:12px 12px 22px}.studio[data-theme=collage] .editor-scene{margin:2px 10px 0;border:1.5px solid var(--ink);border-radius:18px}.studio[data-theme=collage] .editor-body{background:var(--page)}.studio[data-theme=doodle] .editor-scene{margin:2px 8px 0;border-radius:var(--radius)}.studio[data-theme=doodle] .editor-body{background:var(--page)}.studio[data-theme=journal] .hanging-photo{border:0;box-shadow:0 2px 4px #48594115}.photo-hanger.settling{animation:photo-settle 650ms ease-out both}@keyframes photo-settle{0%{transform:rotate(calc(var(--rest-angle) + var(--arrival-angle)))}45%{transform:rotate(calc(var(--rest-angle) - var(--arrival-angle)*.4))}75%{transform:rotate(calc(var(--rest-angle) + var(--arrival-angle)*.15))}100%{transform:rotate(var(--rest-angle))}}
/* Albums and saved-story view. */
.memories-header{padding:13px 22px 22px;display:flex;align-items:baseline;gap:13px;background:var(--header);border-radius:0 0 45% 5%/0 0 10% 4%;flex:none}.memories-header h1{font:700 33px var(--display);margin:0;position:relative}.heading-rays{font-size:26px;position:absolute;right:-9px;top:-13px;transform:rotate(28deg)}.memories-header>span{font-size:11px;color:var(--muted)}.memories-header .text-link{margin-left:auto;font-size:10px}.memory-list{padding:0 19px 12px}.month-heading{font-size:13px;font-weight:600;margin:16px 2px 10px}.memory-card{display:block;position:relative;width:100%;padding:10px 10px 8px;margin:0 0 13px;border:2px solid var(--ink);border-radius:var(--radius);background:var(--card);text-align:left;overflow:visible}.album-cover{display:flex;gap:5px;height:129px;overflow:hidden;border-radius:8px 6px 9px 4px}.album-cover img{min-width:0;width:65%;height:100%;object-fit:cover}.album-cover img:only-child{width:100%}.album-cover img+img{width:35%;object-position:center}.album-caption{display:block;background:var(--caption);padding:8px 3px 0}.album-caption strong{font:700 18px var(--display);display:block;line-height:1.4}.album-caption small{display:flex;gap:8px;align-items:center;font-size:10px;color:var(--muted);line-height:1.5;margin-top:3px}.album-caption small span{margin-left:auto}.album-tape{position:absolute;left:44%;top:-9px;width:12px;height:22px;background:var(--accent);border:1.5px solid var(--ink);border-radius:2px;transform:rotate(13deg)}.album-spine{display:none}.memory-empty{height:100%;padding:14px 25px 35px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.memory-empty .line-illustration{width:100%;height:260px;flex-shrink:1}.memory-empty h2{font:700 25px var(--display);margin:20px 0 8px}.memory-empty p{font-size:13px;margin:0 0 22px;color:var(--muted)}.studio[data-theme=peach] .album-caption small{background:var(--brand);border-radius:30px;width:max-content;padding:2px 9px;color:var(--ink);gap:12px}.studio[data-theme=collage] .memory-card{padding-left:35px;overflow:hidden}.studio[data-theme=collage] .album-spine{display:block;position:absolute;inset:0 auto 0 0;width:27px;background:var(--accent);color:#fff;padding-top:18px;text-align:center;font:bold 12px sans-serif}.studio[data-theme=collage] .album-tape{display:none}.studio[data-theme=collage] .album-caption strong{font-size:17px;font-weight:800}.studio[data-theme=journal] .memory-card{border:1px solid #d9d5c8;border-radius:9px;padding:9px}.studio[data-theme=journal] .album-tape{left:auto;right:10px;top:-3px;height:11px;width:29px;background:#edc1a7;border:0;transform:rotate(22deg)}.studio[data-theme=journal] .album-caption strong{font-family:"PingFang SC",sans-serif;font-size:16px}.studio[data-theme=journal] .album-cover{border-radius:6px}.detail-view{background:var(--detail)}.detail-view .topbar{background:var(--canvas)}.device[data-route=detail] .status-bar{background:var(--canvas)}.detail-scene{position:relative;flex:1;min-height:200px;background:var(--canvas);overflow:hidden;isolation:isolate;touch-action:pan-y;user-select:none}.detail-scene>.photo-hanger{inset:16px 21px 23px}.detail-scene .hanging-photo{width:90%;padding-bottom:22px;cursor:zoom-in}.detail-scene>.mascot{position:absolute;width:115px;height:88px;object-fit:contain;right:4px;bottom:0;z-index:4}.detail-scene>.doodle-flower{height:46px;width:28px;right:4px;bottom:14px}.detail-scene .ground-drawing{height:34px;z-index:3}.detail-page{position:absolute;bottom:4px;left:22px;font-size:10px;z-index:4}.detail-bottom{flex:none;background:var(--detail);padding:7px 22px 23px}.detail-copy{text-align:center;padding:4px 0 13px}.detail-copy h1{font:700 27px var(--display);margin:0 0 5px}.detail-copy p{font-size:11px;margin:0;color:var(--muted)}.detail-actions{display:flex;flex-direction:column;gap:8px}.detail-actions .primary-btn,.detail-actions .secondary-btn{min-height:43px;font-size:16px}.studio[data-theme=journal] .detail-copy{text-align:left}.studio[data-theme=collage] .detail-scene{margin:0 10px;border:1.5px solid var(--ink);border-radius:15px}.studio[data-theme=collage] .detail-copy{text-align:left}.studio[data-theme=journal] .device{border-width:1.5px}
/* Supporting routes carry the same visual grammar. */
.hero-title{font:700 28px/1.4 var(--display);margin:18px 0}.hero-card{height:240px;position:relative;background:var(--onboard);border-radius:var(--radius);overflow:hidden;border:1.5px solid var(--line);isolation:isolate}.hero-copy{position:relative;z-index:3;padding:20px}.hero-copy strong{font:700 25px/1.5 var(--display)}.hero-card .mascot{position:absolute;width:73%;height:83%;bottom:0;right:-4%;z-index:2}.hero-card .ground-drawing{height:80px}.hero-peg{display:none}.home-start{margin-top:15px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-top:15px}.section-heading h2{font:700 19px var(--display);margin:10px 0}.draft-card{width:100%;display:flex;align-items:center;gap:12px;background:var(--paper);border:1.5px solid var(--line);border-radius:var(--radius);padding:10px;text-align:left}.draft-visual{width:65px;height:72px;flex:none;overflow:hidden;border-radius:5px}.draft-visual img{width:100%;height:100%;object-fit:cover}.draft-copy strong{display:block;font:700 16px var(--display)}.draft-copy small{display:block;font-size:10px;color:var(--muted);margin-top:5px}.draft-card>.icon{margin-left:auto;width:16px}.template-mini-row{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.template-mini{border:0;padding:0;background:none;text-align:left}.template-mini strong{font-size:11px;display:block;margin-top:8px}.mini-cover{height:92px;border:1.5px solid var(--line);border-radius:12px;display:grid;place-items:center;background:var(--canvas)}.mini-cover img{width:56%;height:74%;object-fit:cover;border:4px solid var(--paper);transform:rotate(-5deg)}.template-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.template-item{background:var(--paper);border:1.5px solid var(--line);border-radius:var(--radius);padding:8px;text-align:left}.template-item.active{outline:3px solid var(--accent);outline-offset:2px}.template-item>strong{display:block;font:700 17px var(--display);margin:12px 0 3px}.template-item>small{display:block;color:var(--muted);font-size:10px;line-height:1.6}.template-art{position:relative;height:175px;background:var(--canvas);border-radius:10px;display:grid;place-items:center;overflow:hidden}.template-art[data-style=check],.mini-cover[data-style=check]{background:#ffdce8}.template-art[data-style=meadow],.mini-cover[data-style=meadow]{background:#eee5cb}.template-art[data-style=night],.mini-cover[data-style=night]{background:#d9d0ed}.sample-frame{display:block;width:75%;height:77%;padding:5px 5px 14px;border:1.5px solid var(--ink);background:var(--paper);transform:rotate(-4deg);border-radius:4px}.sample-frame img{width:100%;height:100%;object-fit:cover}.peg{position:absolute;top:5px;left:48%;width:13px;height:29px;background:var(--yellow);border:1.5px solid var(--ink);z-index:2}.mini-kicker{font-size:11px;color:var(--muted)}.profile-banner{margin:20px;border-radius:var(--radius);padding:22px;height:250px;position:relative;background:var(--brand);overflow:hidden}.profile-banner h2{font:700 23px var(--display);margin:9px 0}.profile-banner p{font-size:12px}.profile-banner .mascot{position:absolute;right:10px;bottom:0;width:180px;height:130px}.setting-row{display:flex;width:calc(100% - 40px);margin:0 20px;border:0;border-bottom:1px solid #82816e38;background:none;align-items:center;gap:10px;min-height:59px;text-align:left;font-size:13px}.setting-row .icon:last-child{margin-left:auto;width:15px}.setting-row small{font-size:10px;color:var(--muted);margin-left:auto}
/* Sheets and full-screen viewer stay inside the phone. */
.modal-layer{position:absolute;inset:0;background:#21221855;z-index:20;display:flex;align-items:flex-end}.modal-sheet{background:var(--paper);padding:13px 23px 30px;width:100%;max-height:90%;overflow:auto;border:2px solid var(--ink);border-bottom:0;border-radius:25px 21px 0 0}.modal-handle{width:36px;height:4px;border-radius:5px;background:#b7b6a9;margin:0 auto 20px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.modal-sheet h2{font:700 24px var(--display);margin:8px 0}.modal-head .icon-btn{margin-right:-10px}.save-choice{display:flex;width:100%;align-items:center;gap:12px;padding:15px 0;border:0;border-bottom:1px solid #c4c2b5;background:none;text-align:left}.choice-icon{width:42px;height:42px;display:grid;place-items:center;border:1.5px solid var(--ink);background:var(--brand);border-radius:var(--radius);flex:none}.save-choice strong{display:block;font:700 18px var(--display)}.save-choice small{display:block;font-size:11px;line-height:1.6;color:var(--muted);margin-top:4px}.save-choice>.icon{margin-left:auto;width:15px}.modal-note{font-size:12px;color:var(--muted);line-height:1.8}.video-options{display:flex;gap:9px;margin:20px 0}.video-options button{flex:1;min-height:44px;background:var(--paper);border:1.5px solid var(--ink);border-radius:var(--radius)}.video-options [aria-pressed=true]{background:var(--brand)}.photo-tools{display:flex;justify-content:space-between;gap:8px;padding:10px 0 18px}.photo-tools button{border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);padding:10px;min-height:44px;font-size:13px}.modal-image{position:absolute;inset:0;background:#191b19f5;color:#fff;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:58px 16px 28px;touch-action:pan-y}.modal-image>img{object-fit:contain;max-width:100%;width:auto;height:auto;max-height:calc(100% - 78px);flex-shrink:1;min-height:0;border-radius:3px}.round-btn{width:44px;height:44px;display:grid;place-items:center;border:1px solid currentColor;border-radius:48%;background:var(--paper);color:var(--ink);padding:0}.image-close{position:absolute;top:8px;right:14px;background:transparent;color:#fff}.image-nav{display:flex;gap:22px;align-items:center;margin-top:16px;flex:none}.image-nav span{font-size:13px}.global-toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,15px);background:#252720;color:#fff;padding:12px 20px;border-radius:24px;font-size:13px;z-index:60;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}.global-toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:900px){.studio{grid-template-columns:250px 1fr}.studio-side{padding:22px 18px;gap:18px}.side-heading h1{font-size:22px}}
@media(max-width:700px){.studio{display:flex;flex-direction:column;height:100dvh;min-height:0}.studio-side{padding:8px 12px;display:block;flex:none;border-right:0;border-bottom:1px solid #d7d8d1}.side-top,.side-heading,.route-section,.preview-section,.side-foot{display:none}.side-section h2{display:none}.theme-picker{display:flex;overflow:auto;gap:6px;scrollbar-width:none}.theme-option{min-height:40px;padding:5px 9px;flex:none;gap:6px}.theme-option strong{font-size:11px}.theme-option small{display:none}.theme-swatch{width:22px;height:24px}.preview-area{padding:0;flex:1;min-height:0;display:flex;align-items:stretch}.preview-caption,.preview-note{display:none}.device{width:100%;height:100%;min-height:0;max-width:none;border:0;border-radius:0;box-shadow:none;flex:1}.phone-screen{padding-top:env(safe-area-inset-top)}.status-bar{height:29px;min-height:29px;padding:0 23px}.home-indicator{bottom:max(6px,env(safe-area-inset-bottom))}.onboard{padding-bottom:max(23px,env(safe-area-inset-bottom))}.onboard-copy h1{font-size:29px}.editor-actions{padding-bottom:max(23px,env(safe-area-inset-bottom))}.detail-bottom{padding-bottom:max(23px,env(safe-area-inset-bottom))}.album-cover{height:135px}}
@media(max-height:740px){.device{min-height:570px}.onboard-copy h1{font-size:27px;line-height:1.4}.onboard-copy p{font-size:11px}.onboard-dots{margin:3px 0}.onboard .line-illustration{min-height:120px}.detail-copy h1{font-size:23px}.detail-copy{padding-bottom:8px}.detail-actions .primary-btn,.detail-actions .secondary-btn{min-height:39px}.detail-bottom{padding-bottom:22px}.hero-card{height:195px}}
@media(max-height:740px) and (max-width:700px){.device{min-height:0}.onboard-top{min-height:42px}.onboard .primary-btn{min-height:46px}.topbar,.editor-top{min-height:46px;height:46px}.detail-scene{min-height:140px}.editor-scene{min-height:130px}}
@media(max-height:480px) and (max-width:700px){.screen{overflow-y:auto}.app-view,.onboard{min-height:580px}.device{overflow:auto}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.photo-hanger{transform:rotate(var(--rest-angle,-2deg))}}
/* Editing and saved memories share the same measured stage. Video uses its aspect ratio. */
.screen{container-type:size}
.editor-body{background:var(--page)}
.editor-scene.shared-scene,.detail-scene.shared-scene,.studio[data-theme=collage] .shared-scene,.studio[data-theme=doodle] .shared-scene{flex:none;position:relative;width:100%;height:min(134cqw,calc(100cqh - 230px));min-height:200px;margin:0;border:0;border-radius:0;overflow:hidden;touch-action:pan-y;isolation:isolate;background:var(--canvas)}
.scene-art{display:block;width:100%;height:100%;pointer-events:none}
.scene-hit{position:absolute;left:5%;top:15%;width:66%;height:78%;transform-origin:50% -3.205%;transform:rotate(-2deg);cursor:zoom-in;z-index:2;border-radius:6px}
.scene-hit[data-action=add-photo]{cursor:pointer}
.scene-hit:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.scene-remove{left:calc(71% - 20px);right:auto;top:calc(15% - 10px);width:32px;height:32px;z-index:3}
.shared-scene.moving .scene-hit,.shared-scene.moving .scene-remove{pointer-events:none;opacity:0}
.empty-frame-label{position:absolute;inset:0;display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center;color:var(--ink);font:17px var(--display)}
.empty-frame-label .icon{width:36px;height:36px;stroke-width:1.5}
.editor-actions{margin-top:auto;padding-top:12px}
.editor-meta{margin-top:4px}
.detail-bottom{flex:1;min-height:0;padding:0 22px 22px;display:flex;flex-direction:column;justify-content:space-between}
.detail-meta{text-align:center;font-size:11px;line-height:26px;letter-spacing:1px}
.detail-copy{padding:0 0 8px}
.detail-copy h1{font-size:23px;margin:0 0 4px}
.detail-actions .primary-btn,.detail-actions .secondary-btn{min-height:42px}
.template-sheet{padding:12px 18px 26px;max-height:94%}
.template-sheet .modal-head{margin-bottom:0}
.template-sheet .modal-handle{margin-bottom:8px}
.template-sheet .template-grid{gap:14px;padding:5px 4px 4px}
.template-sheet .template-art{height:126px}
.template-sheet .template-item>strong{font-size:16px;margin-top:9px}
.template-sheet .template-item>small{font-size:11px}
@media(max-width:700px){.detail-bottom{padding-bottom:max(22px,env(safe-area-inset-bottom))}}
.device[data-route=home] .editor-actions{padding-bottom:13px;margin-top:auto}
.scene-hit[data-action=start-create]{cursor:pointer}

/* Restore the two-frame invitation and compact navigation from the original editor. */
.editor-meta,.detail-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;height:44px;min-height:44px;flex:none;padding:0 18px;margin:4px 0 0;font-size:11px;letter-spacing:1px}
.scene-navigation{display:flex;align-items:center;gap:8px}
.scene-arrow{width:44px;height:40px;min-height:44px;display:grid;place-items:center;background:var(--paper);border:1.5px solid var(--ink);border-radius:13px 15px 12px 14px;padding:0}
.scene-arrow .icon{width:19px;height:19px}
.scene-arrow:disabled{opacity:.3}
.scene-navigation .photo-more{position:static;inset:auto;min-width:44px;margin-right:2px}
.scene-hit-next .empty-frame-label{transform:rotate(4deg)}
.device[data-route=home] .bottom-nav{min-height:56px;padding:3px 17px 9px}
.device[data-route=home] .bottom-nav button{min-height:44px;gap:2px;font-size:10px}
.device[data-route=home] .editor-actions{padding-top:6px;padding-bottom:13px}
.detail-bottom{padding-top:0}
.detail-meta{padding:0;margin-top:4px}
.detail-view .detail-actions{flex-direction:row;gap:9px}
.detail-view .detail-actions>button{flex:1;min-width:0;font-size:15px;min-height:45px;padding:8px}
/* One compact tab bar across creation, memories and profile. */
.bottom-nav,.device[data-route=home] .bottom-nav{height:calc(47px + max(9px,env(safe-area-inset-bottom)));min-height:calc(47px + max(9px,env(safe-area-inset-bottom)));padding:1px 17px max(9px,env(safe-area-inset-bottom));align-items:center}
.bottom-nav button,.device[data-route=home] .bottom-nav button{height:44px;min-height:44px;gap:2px;padding:0;font-size:10px;line-height:1.2}
.bottom-nav .icon{width:22px;height:22px}
.template-preview{display:block;width:100%;height:100%;border-radius:inherit}
.template-sheet .template-art{height:150px}
.shared-scene[data-style=check] .scene-hit:not(.scene-hit-next) .empty-frame-label,.shared-scene[data-style=scribble] .scene-hit:not(.scene-hit-next) .empty-frame-label{justify-content:flex-end;padding-bottom:18px;font-size:13px}
.shared-scene[data-style=check] .scene-hit:not(.scene-hit-next) .empty-frame-label .icon,.shared-scene[data-style=scribble] .scene-hit:not(.scene-hit-next) .empty-frame-label .icon{display:none}
.shared-scene[data-style=kawaii] .scene-hit{color:#3c427e}
.shared-scene[data-style=check] .scene-remove{background:#ff4050;border-color:#fff;color:#fff;border-radius:7px;box-shadow:2px 2px 0 #282630}
.shared-scene[data-style=kawaii] .scene-remove{background:#fff1d4;border-color:#6065ae;color:#6065ae}
.shared-scene[data-style=scribble] .scene-remove{background:#ffda69;border-color:#34322d;color:#34322d;border-radius:5px}
.shared-scene[data-style=flat] .scene-remove{background:#ed8794;border-color:#fff;color:#fff}
/* Fixed template cells: image height is independent of copy length. */
.template-grid{grid-auto-rows:auto;align-items:start}
.template-item{min-width:0;display:grid;grid-template-rows:150px 25px 18px;gap:5px;height:224px;padding:8px}
.template-item .template-art,.template-sheet .template-item .template-art{height:150px;min-height:150px;width:100%;flex:none}
.template-item>strong,.template-sheet .template-item>strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;font-size:15px;line-height:25px}
.template-item>small,.template-sheet .template-item>small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;line-height:18px;margin:0}
.guide-photos{position:absolute;top:16%;left:0;width:100%;height:58%;display:flex;align-items:center;justify-content:center;gap:12px}
.guide-photo{position:relative;display:block;flex:0 0 42%;height:92%;background:var(--paper);padding:7px 7px 20px;border:2px solid var(--ink);border-radius:7px;transform:rotate(-8deg)}
.guide-photo img{width:100%;height:100%;object-fit:cover;border-radius:3px}
.guide-photo-0{margin-left:-32%;height:83%}.guide-photo-1{transform:rotate(4deg)}.guide-photo-2{transform:rotate(-5deg);height:85%;margin-right:-32%}
.guide-clip{position:absolute;top:-16px;left:46%;width:13px;height:34px;border:2px solid var(--ink);border-radius:3px;background:var(--yellow);transform:rotate(8deg)}
.guide-swipe .mascot{width:42%;height:38%;left:4%;bottom:-2%}
.guide-swipe-arrows{position:absolute;right:17%;bottom:8%;display:flex;gap:35px;background:var(--paper);border:2px solid var(--ink);border-radius:30px;padding:9px 15px;transform:rotate(-5deg)}
.guide-film{position:absolute;left:12%;right:12%;top:15%;height:51%;border:2px solid var(--ink);border-top:14px solid var(--ink);border-bottom:14px solid var(--ink);border-radius:11px;background:var(--paper);padding:10px;transform:rotate(-5deg)}
.guide-film:before,.guide-film:after{content:"";position:absolute;left:8px;right:8px;height:5px;background:repeating-linear-gradient(90deg,var(--paper) 0 10px,transparent 10px 20px)}
.guide-film:before{top:-10px}.guide-film:after{bottom:-10px}
.guide-film-photos{height:100%;display:flex;gap:7px;overflow:hidden;border-radius:4px}.guide-film-photos img{width:46%;height:100%;object-fit:cover;flex:none}
.guide-play{position:absolute;left:42%;top:36%;width:45px;height:45px;display:grid;place-items:center;background:var(--yellow);border:2px solid var(--ink);border-radius:50%}
.guide-share-bubble{position:absolute;right:8%;bottom:21%;display:flex;align-items:center;gap:7px;background:var(--paper);border:2px solid var(--ink);border-radius:18px;padding:10px 12px;transform:rotate(4deg);font:13px var(--display);z-index:3}
.guide-share .mascot{left:2%;width:64%;height:41%;bottom:-1%}
.guide-share>.doodle-flower{right:9%;bottom:4%}
/* First-version editing surface: native horizontal scrolling and a composited photo layer. */
.editor-scene.shared-scene,.detail-scene.shared-scene,.studio[data-theme=collage] .shared-scene,.studio[data-theme=doodle] .shared-scene{height:min(134cqw,calc(100cqh - 226px));touch-action:pan-x}
.native-rope-viewport{position:absolute;inset:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;touch-action:pan-x;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scroll-padding-left:var(--live-left);cursor:grab;z-index:2;-webkit-overflow-scrolling:touch}
.native-rope-viewport::-webkit-scrollbar{display:none}
.native-rope-viewport.dragging{cursor:grabbing;scroll-snap-type:none}
.native-rope-track{position:relative;height:100%;display:flex;align-items:flex-start;padding-left:var(--live-left);gap:var(--live-gap);--sway-angle:0deg}
.native-rope{position:absolute;inset:0 auto auto 0;width:100%;height:calc(160px * var(--live-scale));overflow:visible;pointer-events:none}
.live-hanger{position:relative;flex:0 0 var(--live-width);width:var(--live-width);height:100%;padding-top:var(--live-top);transform-origin:50% var(--live-origin);transform:rotate(var(--sway-angle));will-change:transform;scroll-snap-align:start}
.native-rope-track .live-photo.scene-hit{position:relative;display:block;left:auto;top:auto;bottom:auto;width:100%;height:var(--live-height);padding:calc(9px * var(--live-scale));border:calc(2px * var(--live-scale)) solid var(--frame-ink);border-radius:calc(var(--frame-radius) * var(--live-scale));background:var(--frame-paper);transform-origin:50% 50%;transform:rotate(var(--photo-tilt));box-shadow:calc(4px * var(--live-scale)) calc(5px * var(--live-scale)) 0 var(--frame-shadow);cursor:inherit;user-select:none;-webkit-user-select:none}
.live-photo>img{width:100%;height:100%;object-fit:cover;border-radius:calc(2px * var(--live-scale));pointer-events:none;user-select:none;-webkit-user-drag:none}
.native-rope-track .live-empty .live-photo{background:rgba(255,255,255,.55);border-style:dashed;opacity:.58;box-shadow:none}
.live-clip{position:absolute;top:calc(31px * var(--live-scale));left:50%;width:calc(38px * var(--live-scale));height:calc(67px * var(--live-scale));transform:translateX(-50%);z-index:4;pointer-events:none}
.live-clip:before,.live-clip:after{content:"";position:absolute;top:0;width:45%;height:90%;background:var(--clip-fill);border:calc(2px * var(--live-scale)) solid var(--clip-ink);border-radius:calc(6px * var(--live-scale));box-sizing:border-box}
.live-clip:before{left:2%;transform:rotate(6deg)}.live-clip:after{right:2%;transform:rotate(-6deg)}
.live-clip i{position:absolute;left:26%;top:33%;width:48%;height:20%;background:var(--frame-paper);border:calc(2.5px * var(--live-scale)) solid var(--clip-ink);border-radius:50%;z-index:2}
.live-remove{right:calc(-2px * var(--live-scale));top:calc(var(--live-top) - 10px);width:34px;height:34px;background:var(--paper);z-index:6}
.native-charm{position:absolute;top:var(--charm-top);width:var(--charm-width);height:var(--charm-height);transform-origin:50% 0;transform:translateX(-50%) rotate(calc(var(--charm-rest) + var(--sway-angle) * var(--charm-sway)));pointer-events:none}
.native-charm img{width:100%;height:100%;object-fit:contain;object-position:center top;pointer-events:none}
.shared-scene[data-style=flat] .live-photo.scene-hit{border:1.5px solid #c8d4d7;box-shadow:0 8px 18px #617e8f21}.shared-scene[data-style=flat] .live-photo>img{border-radius:8px}
.shared-scene[data-style=warmjournal] .live-photo.scene-hit{border:0;box-shadow:0 12px 25px #36312a26}.shared-scene[data-style=warmjournal] .live-empty .live-photo.scene-hit{border:1px dashed #b7b2a7;box-shadow:none}
.shared-scene[data-style=flat] .live-empty .live-photo.scene-hit{box-shadow:none}
.shared-scene[data-style=check] .live-photo.scene-hit{background:conic-gradient(#ff4050 25%,#ffa0bd 0 50%,#ff4050 0 75%,#ffa0bd 0) 0 0/calc(20px * var(--live-scale)) calc(20px * var(--live-scale));padding:calc(14px * var(--live-scale));border:0;box-shadow:5px 6px 0 #ff4050,7px 8px 0 #25232c}
.shared-scene[data-style=check] .live-empty .live-photo.scene-hit{opacity:1;box-shadow:3px 4px 0 #ff647e}.shared-scene[data-style=check] .live-empty .live-photo:before{content:"";position:absolute;inset:10px;background:#ffe4ed;border-radius:12px;z-index:-1}
.shared-scene[data-style=check] .live-empty .live-photo[data-index="0"]:after{content:"";position:absolute;inset:28px 25px 64px;background:url('assets/legacy/checker-bunny.svg') center/contain no-repeat;pointer-events:none}
.shared-scene[data-style=scribble] .live-empty .live-photo[data-index="0"]{background:#fff8d6 url('assets/legacy/scribble-cow.svg') center 35px/78% 60% no-repeat;opacity:.9}
.shared-scene[data-style=hand] .live-photo>img{filter:saturate(.65) sepia(.12)}.shared-scene[data-style=sketch] .live-photo>img{filter:grayscale(1) contrast(1.08)}.shared-scene[data-style=scribble] .live-photo>img{filter:saturate(.7) contrast(1.05)}
@media(prefers-reduced-motion:reduce){.live-hanger{transform:none}.native-charm{transform:translateX(-50%) rotate(var(--charm-rest))}.native-rope-viewport{scroll-behavior:auto}}

.shared-scene[data-style=hand] .live-empty .live-photo.scene-hit{background:rgba(255,249,232,.52)}
