#story-guide,#story-dialog{color:#4a5a3a;font:14px/1.55 "Microsoft YaHei",system-ui,sans-serif;letter-spacing:0;isolation:isolate}
#story-guide{position:fixed;z-index:46;top:104px;left:16px;width:322px;padding:28px 23px 18px;border:0;background:none;box-shadow:none;filter:drop-shadow(0 7px 9px #253f382e)}
#story-guide::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border-style:solid;border-color:transparent;border-image:url('../assets/ui/quest-board.png') 52 72 32 72 fill / 32px 42px 22px stretch}
#story-guide header{display:flex;align-items:center;gap:6px;min-height:49px}
.story-guide-avatar{width:48px;height:52px;flex-shrink:0;overflow:hidden;border-radius:50%;background:url('../assets/ui-user/goal-icon-bg.png') center/100% 100% no-repeat;filter:drop-shadow(0 2px 1px #695c3430)}
.story-guide-avatar>.story-ahe-mini{width:48px;height:71px;object-fit:cover;object-position:center top}
.story-guide-kicker{font-size:13px;font-weight:800;color:#567248;flex:1;min-width:0;line-height:1.5}
.story-guide-kicker b{display:block;color:#ad6849;font-size:11px;font-weight:600;font-variant-numeric:tabular-nums}
#story-guide header button{width:29px;height:29px;min-width:29px;padding:5px;border:0;background:url('../assets/ui-user/system-button.png') center/contain no-repeat;box-shadow:none;border-radius:50%;font-size:20px;color:#648464;line-height:1;flex-shrink:0}
#story-guide header button img{width:21px;height:21px}
#story-guide h2{font-size:17px;line-height:1.45;margin:9px 0 6px;color:#486744}
#story-guide p{font-size:13px;line-height:1.7;color:#6b644d}
#story-guide small{display:block;margin-top:9px;color:#a76147;font-size:12px;line-height:1.6}
#story-guide footer{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-top:10px}
#story-guide-primary,.story-primary{min-height:42px;padding:9px 18px;background:url('../assets/ui/button-primary.png') center/100% 100% no-repeat;color:#fff9d7;border:0;border-radius:0;box-shadow:none;font-size:13px;text-shadow:0 1px 1px #254427;filter:drop-shadow(0 3px 2px #273a2b22)}
#story-guide-primary:hover,.story-primary:hover{filter:brightness(1.1) drop-shadow(0 4px 3px #273a2b33)}
#story-guide .story-skip{margin-left:auto;padding:5px 0;min-height:30px;background:none;border:0;box-shadow:none;color:#8c826a;font-size:11px;white-space:nowrap}
.story-steps{display:flex;gap:5px;margin-top:10px;padding:0 1px}.story-steps i{flex:1;height:6px;border-radius:3px;background:url('../assets/ui-user/goal-progress-empty.png') center/100% 100%;box-shadow:inset 0 1px 2px #657a4833;overflow:hidden}
.story-steps i[data-complete=true]{background-image:url('../assets/ui-user/goal-progress-filled.png')}
body[data-story-guide=true] :is(#main-quest,#garden-record){display:none!important}
body[data-story-guide=true] #garden-hint{visibility:hidden}
#story-guide[data-collapsed=true]{width:248px;padding:14px 20px 10px}
#story-guide[data-collapsed=true]::before{border-image:url('../assets/ui/hud-pill.png') 34 70 fill / 16px 32px stretch}
#story-guide[data-collapsed=true] :is(.story-guide-copy,footer,.story-steps){display:none}
#story-guide[data-collapsed=true] .story-guide-avatar{width:32px;height:34px}#story-guide[data-collapsed=true] .story-ahe-mini{width:32px;height:47px}
#story-guide[data-collapsed=true] header{min-height:34px}.story-target{outline:3px solid #ffdf71!important;outline-offset:5px}
#story-world-marker{position:fixed;z-index:21;pointer-events:none;translate:-50% -100%;display:flex;flex-direction:column;align-items:center;filter:drop-shadow(0 3px 3px #25493666)}
#story-world-marker span{padding:7px 20px;background:url('../assets/ui/button-primary.png') center/100% 100% no-repeat;color:#fff9cf;font-size:13px;font-weight:800;white-space:nowrap;text-shadow:0 1px 1px #1e5229}
#story-world-marker b{display:block;width:30px;height:28px;margin-top:3px;font-size:0;background:url('../assets/ui-user/catalog-arrow-right.png') center/19px 27px no-repeat;rotate:90deg;animation:story-point 1.25s ease-in-out infinite}
#story-world-marker::after{content:"";position:absolute;bottom:-12px;left:50%;width:76px;height:23px;border:2px solid #ffe89b;border-radius:50%;translate:-50% 0;box-shadow:0 0 9px #ffd75d66;animation:story-ground-ring 1.7s ease-out infinite;z-index:-1}
@keyframes story-ground-ring{0%{scale:.65;opacity:.9}100%{scale:1.35;opacity:0}}
@keyframes story-point{50%{translate:0 8px;filter:brightness(1.2)}}
#story-dialog{width:min(800px,calc(100vw - 32px));max-width:800px;max-height:calc(100dvh - 32px);margin:auto;padding:22px 28px 18px;border:0;background:none;box-shadow:none;overflow:hidden;filter:drop-shadow(0 18px 28px #153a393b)}
#story-dialog::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border-style:solid;border-color:transparent;border-image:url('../assets/ui/panel.png') 38 fill / 30px stretch}
#story-dialog::backdrop{background:#143e3d80;backdrop-filter:blur(3px)}
#story-dialog[open]{display:flex;flex-direction:column}
#story-dialog>header,#story-dialog>footer,.story-letter-pages{flex-shrink:0}
#story-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:0 1px 7px;color:#fff6cf;font-size:15px;font-weight:800}
#story-dialog>header>span{display:grid;place-items:center;min-width:135px;min-height:42px;padding:8px 20px;background:url('../assets/ui-user/catalog-name.png') center/100% 100% no-repeat;text-shadow:0 1px 1px #8c3c2a55}
#story-dialog>header button{width:38px;height:38px;min-width:38px;padding:0;border:0;border-radius:50%;font-size:0;background:url('../assets/ui-user/shop-close.png') center/17px 17px no-repeat,url('../assets/ui-user/shop-close-circle.png') center/100% 100% no-repeat;box-shadow:0 2px 0 #bd8142;flex-shrink:0}
.story-letter-layout{display:grid;grid-template-columns:224px minmax(0,1fr);gap:30px;padding:14px 8px 8px;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c6a870 transparent}
.story-letter-art{position:relative;display:flex;flex-direction:column;align-items:center;align-self:center;margin:0;padding-top:8px;min-width:0}
.story-letter-art>.story-ahe{width:100%;height:auto;max-height:300px;object-fit:contain;filter:drop-shadow(0 5px 3px #65533122)}
.story-ahe-name{position:relative;margin-top:-3px;min-width:96px;padding:5px 18px;text-align:center;background:url('../assets/ui/button-secondary.png') center/100% 100% no-repeat;font-size:16px;font-weight:800;color:#627d4d}
.story-letter-keepsake{position:absolute;right:-4px;bottom:34px;width:65px;height:65px;background:url('../assets/ui-user/system-button.png') center/100% 100% no-repeat;rotate:8deg;filter:drop-shadow(0 3px 2px #715e3b33)}
.story-letter-keepsake>.crop-icon{width:100%;height:100%;padding:8px;object-fit:contain}
.story-letter-subtitle{color:#b06d4c;font-size:12px}.story-letter-layout h2{font-size:26px;line-height:1.4;margin:8px 0 16px;color:#4f6c43}
#story-letter-title:focus{outline:none}
.story-letter-body p{font-size:14px;line-height:1.9;margin-bottom:13px;color:#6b6048;overflow-wrap:anywhere}
.story-letter-signature{text-align:right;margin-top:16px;font-size:13px;color:#77845e}
.story-letter-pages{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;padding:12px 6px 8px}
.story-letter-pages button{width:32px;height:34px;min-width:32px;padding:0;border:0;border-radius:0;background:url('../assets/ui/button-secondary.png') center/100% 100% no-repeat;color:#819065;font-size:12px;box-shadow:none}
.story-letter-pages button[aria-current=true]{background-image:url('../assets/ui/button-primary.png');color:#fff6cc;filter:drop-shadow(0 2px 1px #53612c44)}
#story-dialog>footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 4px 0;border:0;background:none}
.story-letter-count{color:#8b8064;font-size:12px}#story-dialog .story-primary{font-size:14px;min-height:45px;padding:10px 24px;white-space:nowrap}
.story-settings-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.story-settings-buttons button{font-size:14px}
#story-guide[data-panel=true]{top:7px;left:50%;translate:-50% 0;width:min(790px,calc(100% - 24px));padding:9px 22px 12px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 18px}
#story-guide[data-panel=true]::before{border-image:url('../assets/ui/panel.png') 38 fill / 20px stretch}
#story-guide[data-panel=true] header{grid-column:1/-1;min-height:28px;height:28px}
#story-guide[data-panel=true] .story-guide-avatar{width:28px;height:30px}#story-guide[data-panel=true] .story-ahe-mini{width:28px;height:41px}
#story-guide[data-panel=true] .story-guide-kicker b{display:inline;margin-left:7px}
#story-guide[data-panel=true] h2{font-size:14px;margin:2px 0}#story-guide[data-panel=true] p{font-size:12px;line-height:1.5}
#story-guide[data-panel=true] small,#story-guide[data-panel=true] .story-steps{display:none}
#story-guide[data-panel=true] footer{margin:0;align-self:center;flex-direction:column;gap:0}
#story-guide[data-panel=true] #story-guide-primary{min-height:32px;padding:5px 12px}
body[data-story-panel=true] #panel-overlay{top:126px;bottom:0;height:calc(100% - 126px);padding-top:0;padding-bottom:0}
body[data-story-panel=true] #game-window{max-height:100%}
body[data-story-panel=true] #game-window[data-panel=shop]{--su:min(.0520833333vw,calc((100dvh - 126px)/1080))}
body[data-story-panel=true] #game-window[data-panel=bag]{--iu:min(.078125vw,calc((100dvh - 126px)/720),1.2px)}
@media(max-width:600px){
 #story-guide{top:84px;left:7px;width:calc(100% - 82px);max-width:310px;padding:25px 20px 17px}
 #story-guide header{min-height:40px;gap:4px}.story-guide-avatar{width:40px;height:44px}.story-guide-avatar>.story-ahe-mini{width:40px;height:59px}.story-guide-kicker{font-size:12px}
 #story-guide h2{font-size:15px;margin-top:6px}#story-guide p{font-size:12px}#story-guide small{font-size:11px;margin-top:6px}#story-guide footer{margin-top:6px}#story-guide-primary{min-height:37px;padding:8px 12px}
 #story-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 24px);padding:17px 19px 18px}
 #story-dialog>header{min-height:38px;padding-bottom:5px}#story-dialog>header>span{min-width:112px;min-height:35px;font-size:14px}#story-dialog>header button{width:34px;height:34px;min-width:34px}
 .story-letter-layout{display:block;padding:6px 4px 4px}
 .story-letter-art{float:left;width:90px;margin:0 14px 5px 0;padding:0}.story-letter-art>.story-ahe{width:90px;max-height:119px}.story-ahe-name{min-width:64px;padding:4px 12px;font-size:12px}
 .story-letter-keepsake{width:38px;height:38px;bottom:21px;right:-5px}.story-letter-keepsake>.crop-icon{padding:4px}
 .story-letter-subtitle{font-size:11px}.story-letter-layout h2{font-size:21px;margin:7px 0 14px}.story-letter-body p{font-size:13px;line-height:1.85}.story-letter-signature{clear:both;margin-top:10px}
 #story-dialog>footer{padding:8px 2px 0;gap:8px}.story-letter-count{font-size:11px}#story-dialog .story-primary{font-size:12px;padding:9px 15px;min-height:40px}.story-letter-pages{padding:8px 3px 4px;gap:5px}
 #story-guide[data-panel=true]{top:4px;width:calc(100% - 12px);max-width:none;grid-template-columns:minmax(0,1fr) auto;gap:0 7px;padding:9px 16px 12px}
 #story-guide[data-panel=true] p{font-size:11px}#story-guide[data-panel=true] h2{font-size:13px}#story-guide[data-panel=true] #story-guide-primary{font-size:11px;padding:5px 10px;max-width:100px}
 body[data-story-panel=true] #game-window[data-panel=shop]{--su:1px}body[data-story-panel=true] #game-window[data-panel=bag]{--iu:1px}
}
@media(max-height:550px){
 #story-guide{top:69px;left:7px;width:255px;padding:23px 19px 14px}#story-guide header{min-height:31px}.story-guide-avatar{width:32px;height:34px}.story-guide-avatar>.story-ahe-mini{width:32px;height:47px}.story-guide-kicker{font-size:11px}.story-guide-kicker b{font-size:10px;display:inline;margin-left:4px}
 #story-guide h2{font-size:14px;margin:5px 0}#story-guide p{font-size:11px;line-height:1.5}#story-guide small{font-size:10px;margin-top:5px}#story-guide footer{margin-top:5px}.story-steps{margin-top:6px}#story-guide-primary{min-height:31px;padding:5px 12px;font-size:12px}
 #story-dialog{width:min(720px,calc(100vw - 28px));padding:14px 24px 14px;max-height:calc(100dvh - 24px)}
 #story-dialog>header{min-height:33px;padding-bottom:4px}#story-dialog>header>span{min-height:31px;min-width:120px;padding:5px 18px;font-size:13px}#story-dialog>header button{width:30px;height:30px;min-width:30px}
 .story-letter-layout{display:grid;grid-template-columns:130px minmax(0,1fr);padding:7px 6px 5px;gap:24px}.story-letter-art{float:none;width:auto;margin:0;align-self:start}.story-letter-art>.story-ahe{width:130px;max-height:178px}.story-ahe-name{font-size:12px;padding:3px 14px}.story-letter-keepsake{width:42px;height:42px;bottom:25px;right:0}
 .story-letter-layout h2{font-size:21px;margin:4px 0 10px}.story-letter-body p{font-size:13px;line-height:1.7;margin-bottom:10px}.story-letter-signature{margin-top:8px}#story-dialog>footer{padding-top:6px}#story-dialog .story-primary{min-height:36px;font-size:13px;padding:7px 18px}.story-letter-pages{padding:5px 4px 2px}.story-letter-pages button{height:27px;width:28px;min-width:28px}
 #story-guide[data-panel=true]{top:2px;padding:9px 18px;width:min(740px,calc(100% - 24px))}#story-guide[data-panel=true] header{display:none}
 body[data-story-panel=true] #panel-overlay{top:84px;height:calc(100% - 84px)}body[data-story-panel=true] #game-window[data-panel=shop]{--su:.72px}
}
body[data-reduced-motion=true] #story-world-marker b,body[data-reduced-motion=true] #story-world-marker::after{animation:none}
#story-guide[data-panel=true][data-collapsed=true] header{display:flex}
#story-guide :is(button,a):focus-visible,#story-dialog button:focus-visible{outline:3px solid #cf8b29;outline-offset:2px}
@media(prefers-reduced-motion:reduce){#story-world-marker b,#story-world-marker::after{animation:none}}
