@import url('/assets/fonts.css');
:root{--cream:#f0e6d7;--muted:#c1ad93;--gold:#d9ad6b;--panel:#21180f;--line:#69503a;--mobile-scale:1;--mobile-x:114px}
[hidden]{display:none!important}
body{background:#0e0906;color:var(--cream);font-family:Inter,"Microsoft YaHei",system-ui,sans-serif}
button,a,input,textarea{ -webkit-tap-highlight-color:transparent}
button,input,textarea{font:inherit}
input,textarea,[contenteditable=true]{user-select:text}
button{cursor:pointer}
button:disabled{opacity:.35;cursor:default}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,[contenteditable=true]:focus-visible{outline:2px solid #efc886;outline-offset:4px}
.app-header{position:fixed;z-index:48;top:0;left:0;right:0;min-height:86px;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:15px 36px;background:linear-gradient(#0e0906 25%,rgba(14,9,6,.92) 70%,transparent);}
.album-wordmark{text-align:left;color:#f1dbc0;font:30px/1 Caveat,cursive;background:none;border:0;white-space:nowrap}
.album-wordmark span{display:block;font:10px/1.7 "Microsoft YaHei",sans-serif;letter-spacing:3px;color:#c1a887;margin:4px 0 0 2px}
.anniversary-button{background:transparent;color:#e4d2b9;display:flex;flex-direction:column;gap:5px;text-align:center;border:0;font-size:12px}
.anniversary-detail{font-size:11px;color:#c5ae91}.anniversary-detail strong{color:#f0c580;font-weight:500}
.header-actions{display:flex;align-items:center;gap:14px}.sync-status{font-size:11px;color:#c5b396;background:none;border:0;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis}
.sync-status::before{content:'';display:inline-block;width:5px;height:5px;border-radius:50%;background:#a3b18c;margin-right:7px;vertical-align:middle}
.sync-status[data-state=error],.sync-status[data-state=conflict]{color:#ffc9a5}.sync-status[data-state=error]::before,.sync-status[data-state=conflict]::before{background:#e8a07f}
.sync-status[data-state=saving]::before{background:#e4c07d}
.quiet-button,.primary-button,.icon-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;border-radius:8px;padding:9px 15px;font-size:13px;line-height:1.4;transition:background .15s,color .15s}
.quiet-button,.primary-button{white-space:nowrap}.album-wordmark{flex-shrink:0}.header-actions{min-width:0}.header-actions .quiet-button,.header-actions .icon-button{flex-shrink:0}
.quiet-button{background:#2b2016;color:#efdfc7;border:1px solid #70553c}.quiet-button:hover{background:#3b2b1d}.primary-button{background:#dbb37a;color:#25170b;border:1px solid transparent;font-weight:600}.primary-button:hover{background:#edc68b}.icon-button{background:none;color:#e0c6a4;border:0;min-width:42px;padding:6px;font-size:24px}
.icon-button:hover{background:#ffffff0c}.full-width{width:100%}
.editing-tools{position:fixed;z-index:47;top:92px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;background:#21170f;border:1px solid #685039;padding:6px;border-radius:12px;box-shadow:0 12px 30px #0005;white-space:nowrap}
.tool-divider{height:20px;border-left:1px solid #70553c;margin:0 2px}
.guestbook-entry{position:fixed;right:34px;bottom:32px;z-index:46;color:#ddc9ad;font-size:12px;background:none;border:0;display:flex;gap:10px;align-items:center;min-height:44px}.guestbook-entry:hover{color:#ffe1b2}
#guestbookBadge{display:inline-flex;align-items:center;justify-content:center;background:#3c2c1b;color:#e7cda8;min-width:23px;height:23px;border-radius:50%;font-size:10px}
.desk-stage{min-height:100svh;padding:110px 12px 90px;background:radial-gradient(ellipse at 20% 20%,#2a1b1044,transparent 65%),#0e0906}
.book-shell{position:relative;width:1000px;height:723px;flex-shrink:0;transform-origin:top center}
.book-viewport{transform-origin:top left;border-radius:0;box-shadow:none}
.photoreal-plate-bg{filter:brightness(1.06)}
.spotlight-cone{background:linear-gradient(125deg,rgba(255,226,186,.035),transparent 65%,rgba(4,2,1,.1))}
.polaroid-card{box-shadow:3px 5px 6px #190e0780,8px 11px 15px #190e0738,0 0 1px #0005}
.polaroid-inner-photo img{filter:none}
.note-yellow{box-shadow:3px 5px 5px #190e075c,7px 9px 12px #190e0726}.note-cream{box-shadow:3px 5px 6px #190e0760}
.font-hand-title{font-family:Kalam,"Microsoft YaHei",cursive}.font-hand-script{font-family:Caveat,"Microsoft YaHei",cursive}.font-cn-hand{font-family:"Ma Shan Zheng","Microsoft YaHei",cursive}
.scrapbook-item:not(.selected-item){cursor:pointer}body:not(.edit-mode) .scrapbook-item{cursor:pointer}body:not(.edit-mode) .item-action-bar{display:none!important}body:not(.edit-mode) [contenteditable]{cursor:inherit}
.edit-mode .scrapbook-item{touch-action:none}.edit-mode .desk-stage{padding-top:155px}.edit-mode .book-shell{margin-top:10px}
.album-footer{position:fixed;bottom:23px;left:50%;transform:translateX(-50%);z-index:46;display:flex;align-items:center;gap:23px;padding:5px 12px;color:#e6cfb0;background:#191109eb;border:1px solid #604a35;border-radius:12px;max-width:calc(100% - 24px)}
.album-footer>div{text-align:center;font-size:11px;min-width:88px;white-space:nowrap}.side-label{display:block;font-size:10px;color:#bd9e76;margin-top:3px}.side-label:empty{display:none}.page-arrow{min-width:44px;min-height:44px;color:#e9cc9e;background:none;border:0;font-size:22px}.page-arrow:hover{color:white}.add-page{font-size:12px;min-height:44px;white-space:nowrap;border:0;background:none;color:#e7c388}
.corner-flip-zone span{font-size:11px!important}.corner-flip-zone{opacity:.65}
.login-screen{position:fixed;inset:0;z-index:100;display:none;grid-template-columns:1.08fr 1fr;background:#17110c;overflow:auto;color:#efe1cf}.is-locked .login-screen{display:grid}.is-locked .app-header,.is-locked .editing-tools,.is-locked .guestbook-entry,.is-locked .desk-stage{visibility:hidden}
.login-scene{position:relative;min-height:650px;overflow:hidden;background:#0b0704;display:flex;align-items:center;justify-content:center}.login-scene>img{position:absolute;max-width:none;width:1100px;height:100%;object-fit:cover;object-position:52% center;opacity:.95}.cover-note{position:relative;z-index:1;color:#49382a;transform:rotate(-3deg);width:310px;margin:35px 0 0 28px}.cover-heart{font:46px/1 Caveat,cursive;color:#985c4c}.cover-note h1{font:104px/.9 Caveat,cursive;letter-spacing:-1px;margin:18px 0 32px;font-weight:600}.cover-note p{font:15px/2 "Microsoft YaHei",sans-serif;color:#675344}.cover-signature{display:block;font:27px Caveat,cursive;margin-top:54px;color:#865e3d}
.login-panel{display:flex;flex-direction:column;justify-content:center;padding:70px max(45px,11%);max-width:650px;width:100%;margin:auto}.login-heart{font:38px Caveat,cursive;color:#d5ab76;margin-bottom:28px}.login-panel h2{font:400 27px/1.6 "Microsoft YaHei",sans-serif;margin:0 0 12px;letter-spacing:1px}.login-intro{font-size:13px;line-height:1.8;color:#c3ab8d;margin:0 0 40px}.login-panel form{display:flex;flex-direction:column}.login-panel label{font-size:12px;color:#d5bea0;margin:0 0 10px}.login-panel input{background:#21180f;color:#f3e5d2;border:1px solid #68513b;border-radius:7px;padding:13px 14px;min-height:48px;font-size:15px;margin-bottom:24px;width:100%}.login-panel input::placeholder{color:#b39c7e}.form-error{font-size:12px;color:#ffc2a2;min-height:18px;margin:-8px 0 12px}.login-panel .primary-button{min-height:48px;font-size:14px}.private-note{font-size:11px;color:#bca689;margin-top:30px;display:flex;align-items:center;gap:8px}
.app-dialog{color:#efe0ca;background:#241a11;border:1px solid #72563c;border-radius:16px;padding:26px;width:min(520px,calc(100% - 32px));max-height:85svh;overflow:auto;margin:auto;box-shadow:0 24px 90px #0008}.app-dialog::backdrop,.photo-dialog::backdrop{background:#080503bb}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:10px}.dialog-heading h2{font-size:19px;font-weight:500;line-height:1.5;margin:0}.dialog-description{color:#d0b99b;font-size:13px;line-height:1.9;margin:0 0 20px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px;flex-wrap:wrap}.settings-section{margin:23px 0}.settings-section h3{color:#bc9e78;font-size:11px;margin-bottom:9px}.settings-row{width:100%;background:none;border:0;color:#efddc2;text-align:left;min-height:54px;display:flex;justify-content:space-between;align-items:center;gap:14px;padding:10px 0;font-size:13px}.settings-row:hover{color:#ffe5bf}.settings-row small{display:block;color:#c3a887;font-size:11px;margin-top:5px;line-height:1.6}.danger{color:#f2b39e}.settings-row input{accent-color:#d9ad6b;width:18px;height:18px}.settings-dialog{width:min(470px,calc(100% - 28px))}.history-list{display:flex;flex-direction:column;gap:0}.history-entry{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #57422e;padding:15px 0;font-size:13px}.history-entry small{display:block;color:#c6ac89;font-size:11px;line-height:1.7;margin-top:5px}.history-entry button{flex-shrink:0}.conflict-list{font-size:13px;line-height:1.9;color:#efcc9d;padding-left:18px;overflow-wrap:anywhere}
.photo-dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;background:#0e0a07f5;border:0;color:#f6e7d1;margin:0;padding:22px 30px;overflow:auto}.photo-toolbar{display:flex;justify-content:flex-end;align-items:center;gap:16px;font-size:12px}.photo-toolbar>span{margin-right:auto;color:#c7ae8d}.photo-toolbar a{text-decoration:none}.photo-viewer{display:flex;align-items:center;justify-content:space-between;gap:16px;height:calc(100svh - 160px)}.photo-viewer img{max-width:calc(100% - 120px);max-height:100%;object-fit:contain}.viewer-arrow{border:0;background:none;color:#f2d7ae;font-size:28px;min-width:44px;min-height:60px}#photoCaption{text-align:center;color:#d7c0a0;font-size:14px;margin:15px;white-space:pre-wrap}#fullNote{font-size:19px;line-height:2;white-space:pre-wrap;overflow-wrap:anywhere;color:#f2e0c4}.upload-progress{position:fixed;z-index:120;bottom:96px;left:50%;transform:translateX(-50%);background:#ead8ba;color:#3f2d1b;padding:12px 18px;border-radius:10px;font-size:12px;box-shadow:0 10px 30px #0005;max-width:90%;text-align:center}
#scrapbookToast{bottom:100px!important;max-width:calc(100% - 28px);text-align:center;white-space:normal;font-size:12px;line-height:1.7;z-index:120!important}
.item-inspector{position:fixed;right:24px;top:165px;z-index:47;width:220px;display:flex;gap:6px;flex-wrap:wrap;padding:14px;background:#261b11;border:1px solid #74583e;border-radius:12px;box-shadow:0 12px 35px #0005}.inspector-label{width:100%;font-size:11px;color:#c5aa87;margin-bottom:4px}.inspector-button{min-height:38px;padding:6px 9px;background:#3b2b1c;color:#f0dcc0;border:0;border-radius:6px;font-size:12px}.inspector-button.danger{color:#ffc1aa}.scrapbook-item .item-action-bar{display:none!important}
@media(max-width:700px){.item-inspector{top:auto;right:auto;left:12px;bottom:87px;width:calc(100% - 24px);flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:5px;max-width:none;border-radius:10px}.inspector-label{display:none}.inspector-button{min-height:44px;flex-shrink:0;padding:8px 12px}.edit-mode .guestbook-entry{display:none}}
@media(max-width:380px){.sync-status{max-width:45px}.app-header{gap:6px;padding-left:12px;padding-right:12px}.album-wordmark{font-size:23px}}

/* Photo controls use the scrapbook's own materials, with explicit choices. */
.item-inspector{width:278px;top:160px;right:20px;display:block;padding:16px;max-height:calc(100svh - 220px);overflow:auto;background:#251b12}
.editor-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:12px}.editor-heading strong{display:block;font-size:14px;font-weight:500;color:#f0dec4;line-height:1.7}.editor-heading span{display:block;font-size:11px;color:#cab08c;line-height:1.7}.editor-heading .icon-button{min-width:28px;min-height:30px;font-size:20px;padding:0}
.editor-toolbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.editor-toolbar .inspector-button{font-size:12px;min-height:40px;padding:8px 4px;white-space:nowrap;border:1px solid transparent;background:#3c2c1e;color:#f0ddc0;line-height:1.3}.editor-toolbar .inspector-button[aria-pressed=true],.editor-toolbar .inspector-button.is-active{border-color:#dcb579;background:#5b4229;color:#fff0d7}.editor-toolbar .inspector-button.danger{color:#ffbfaa;background:#4b2720}.editor-toolbar .inspector-button:hover{background:#59412a}
.editor-options{margin-top:18px}.editor-options h3{font-size:12px;color:#dfc39f;font-weight:400;margin:0 0 12px}.editor-option-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.editor-options:has([data-value="tape-pin"]) .editor-option-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-option{background:#2e2116;color:#e2cbac;border:1px solid #715335;border-radius:8px;min-height:122px;padding:9px 3px 8px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;font-size:11px;line-height:1.5}.editor-option[aria-pressed=true]{background:#4c3622;border-color:#ecc58b;color:#ffebcc}.editor-option:hover{border-color:#c6a071}.editor-material-preview{position:relative;display:block;width:74px;height:88px;overflow:visible;pointer-events:none}.editor-material-preview .polaroid-card{position:absolute;left:50%;top:7px;transform-origin:top left;margin-left:-29px;pointer-events:none}.editor-material-preview .polaroid-card[style*="138px"]{margin-left:-34.5px}.editor-material-preview .polaroid-card[style*="125px"]{margin-left:-31.25px}.editor-material-preview .polaroid-card[style*="102px"]{margin-left:-25.5px}.editor-material-preview [contenteditable]{pointer-events:none}.editor-material-preview .font-hand-title{font-size:13.5px!important}
.editor-slider{margin-top:16px;min-width:0}.editor-slider label{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:11px;color:#d9bf9c;margin-bottom:7px}.editor-slider output{font-variant-numeric:tabular-nums;color:#f3d5a8}.editor-slider input[type=range]{display:block;width:100%;height:28px;accent-color:#d9ad6b;cursor:ew-resize}.editor-rotation{display:flex;gap:12px;align-items:flex-end;margin-top:0}.editor-rotation .editor-slider{flex:1}.editor-text-button{background:none;border:0;color:#f1c988;font-size:11px;min-width:38px;min-height:35px;text-decoration:underline;white-space:nowrap}.editor-current{font-size:10px;color:#c7ab87;line-height:1.8;margin:12px 0 0;overflow-wrap:anywhere}
.photo-library-dialog{width:min(650px,calc(100% - 24px))}.library-count{font-size:12px;color:#cdb18c;margin:22px 0 12px}.photo-library{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.library-photo{display:flex;flex-direction:column;gap:8px;padding:7px 7px 10px;background:#ece3d5;color:#513d29;border:2px solid transparent;box-shadow:2px 4px 6px #0004;font-size:11px;line-height:1.6;transform:rotate(-1deg)}.library-photo:nth-child(even){transform:rotate(1deg)}.library-photo[aria-pressed=true]{border-color:#e2b16a}.library-photo img{width:100%;height:105px;object-fit:cover;pointer-events:none}.library-photo span{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.library-photo:hover{border-color:#f6ce93}
@media(min-width:1001px){.edit-mode .desk-stage{padding-left:20px;padding-right:320px}}
@media(max-width:1000px){.item-inspector{top:auto;bottom:86px;left:12px;right:12px;width:auto;max-height:44svh;padding:13px 14px;z-index:47}.editor-heading{margin-bottom:9px}.editor-toolbar{grid-template-columns:repeat(8,minmax(0,1fr))}.editor-toolbar .inspector-button{min-height:44px;font-size:11px;padding:8px 2px}.editor-options{margin-top:14px}.editor-option-grid,.editor-options:has([data-value="tape-pin"]) .editor-option-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.editor-option{min-height:108px}.editor-material-preview{height:75px}.editor-rotation{margin-top:4px}.editor-current{margin-top:5px}.edit-mode .guestbook-entry{display:none}}
@media(max-width:700px){.item-inspector{bottom:85px;max-height:42svh;border-radius:12px;overflow-x:hidden}.editor-toolbar{grid-template-columns:repeat(4,minmax(0,1fr))}.editor-toolbar .inspector-button{font-size:12px}.editor-heading strong{font-size:13px}.editor-heading span{font-size:10px}.editor-option-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.editor-options:has([data-value="tape-pin"]) .editor-option-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-option{min-height:112px}.editor-options h3{margin-bottom:9px}.editor-slider{margin-top:11px}.photo-library{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.library-photo img{height:93px}.library-photo{font-size:10px}.editor-current{font-size:10px}}
body.reduced-motion *,body.reduced-motion *::before,body.reduced-motion *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important}}
@media(max-width:1100px){.app-header{padding:14px 20px;gap:14px}.desktop-countdown{display:none}.header-actions{gap:8px}.album-wordmark{font-size:27px}.guestbook-entry{right:18px;bottom:28px}}
@media(max-width:700px){
 .app-header{padding:12px 15px;min-height:78px;gap:10px;align-items:center}.album-wordmark{font-size:25px}.album-wordmark span{font-size:9px;letter-spacing:2px;margin-top:4px}.anniversary-summary{position:fixed;top:83px;left:0;right:0;pointer-events:none;display:flex;justify-content:center}.anniversary-button{pointer-events:auto;flex-direction:row;align-items:center;gap:8px;font-size:10px}.anniversary-detail{font-size:10px}.sync-status{max-width:96px;font-size:10px}.header-actions{gap:3px}.header-actions .quiet-button{padding:7px 10px;min-height:40px;font-size:11px}.header-actions .icon-button{min-width:30px;padding:2px}.desk-stage{padding:120px 14px 124px;justify-content:flex-start;min-height:100svh}.book-shell{width:calc(414px * var(--mobile-scale));height:calc(582px * var(--mobile-scale));overflow:hidden;transform:none!important;border-radius:3px;box-shadow:2px 10px 24px #0006;margin:auto 0}.book-viewport{transform:translate(calc(-1 * var(--mobile-x) * var(--mobile-scale)),calc(-84px * var(--mobile-scale))) scale(var(--mobile-scale))!important;transform-origin:top left}.corner-flip-zone{display:none}.album-footer{bottom:max(16px,env(safe-area-inset-bottom));gap:17px;padding:3px 8px}.album-footer>div{font-size:11px;min-width:82px}.page-arrow{min-height:42px;min-width:38px}.guestbook-entry{bottom:81px;left:50%;right:auto;transform:translateX(-50%);min-height:33px;white-space:nowrap;font-size:11px}.editing-tools{top:113px;padding:4px;gap:4px}.editing-tools .quiet-button,.editing-tools .primary-button{min-height:42px;padding:8px 12px;font-size:12px}.editing-tools .icon-button{min-width:38px;min-height:42px}.edit-mode .desk-stage{padding-top:176px}.edit-mode .book-shell{margin-top:0;margin-bottom:auto}.item-action-bar{display:none!important}.scrapbook-item.selected-item{outline-width:2px}.app-dialog{padding:21px;border-radius:16px;width:calc(100% - 22px);max-height:88svh}.settings-dialog{margin:auto auto 0;border-radius:18px 18px 0 0;padding-bottom:calc(24px + env(safe-area-inset-bottom));width:100%;max-height:88svh}.dialog-heading h2{font-size:18px}.dialog-actions button{flex:1}.photo-dialog{padding:12px}.photo-toolbar{gap:7px}.photo-toolbar a{font-size:11px;min-height:40px;padding:6px 10px}.photo-viewer{gap:0;height:calc(100svh - 145px);position:relative}.photo-viewer img{max-width:100%;width:100%;max-height:100%}.viewer-arrow{position:absolute;z-index:2;bottom:0;background:#20160cbf;min-height:42px;font-size:22px}.viewer-arrow:first-child{left:0}.viewer-arrow:last-child{right:0}.login-screen{grid-template-columns:1fr;align-content:start}.login-scene{min-height:270px;height:33svh;max-height:350px}.login-scene>img{width:100%;height:100%;object-fit:cover;object-position:center 38%}.cover-note{width:240px;margin:0 0 0 32px;transform:rotate(-2deg)}.cover-note h1{font-size:70px;margin:4px 0 12px;line-height:.82}.cover-heart{font-size:25px}.cover-note p{font-size:10px;line-height:1.7}.cover-signature{position:absolute;bottom:8px;right:-5px;font-size:21px;margin:0}.login-panel{padding:30px 30px 36px;max-width:480px}.login-heart{display:none}.login-panel h2{font-size:22px;letter-spacing:0}.login-intro{font-size:11px;margin-bottom:25px}.login-panel input{margin-bottom:18px;min-height:46px}.login-panel label{font-size:11px}.private-note{margin-top:22px;font-size:10px}.upload-progress{bottom:128px}
}
