/* A pocket-sized treasure shortcut replaces the left quest card. */
body #app .realm-chest-shortcut{position:absolute;z-index:6;top:164px;left:26px;width:78px;padding:0;background:none;border:0}
body #app .realm-mastery{position:absolute;z-index:6;top:108px;left:26px;width:178px}
body #app .mastery-notice{width:100%;display:flex;align-items:center;gap:8px;padding:7px 9px;min-height:46px;background:#f5ecd5f5;border:1px solid #c5ae78;box-shadow:inset 3px 0 #bfa66c,0 2px 0 #31515a22;color:#244f5b;text-align:left;font:inherit;cursor:pointer;transition:transform .15s,background .15s;touch-action:manipulation}
body #app .mastery-notice:hover{background:#fff4d7;transform:translateY(-1px)}body #app .mastery-notice:active{transform:translateY(1px)}body #app .mastery-notice:focus-visible{outline:3px solid #197f97;outline-offset:3px}
body #app .mastery-emblem{display:grid;place-items:center;flex:0 0 21px;color:#937133}body #app .mastery-emblem .icon{width:21px;height:21px}
body #app .mastery-copy{min-width:0;flex:1;line-height:1.25}body #app .mastery-copy strong{display:block;font-size:12px;color:#244f5b}body #app .mastery-copy small{display:block;font-size:10px;margin-top:2px;color:#496368}
body #app .mastery-track{display:block;height:3px;margin-top:4px;background:#d6d9c2;overflow:hidden}body #app .mastery-track i{display:block;height:100%;background:#439b94}
body.training-open #app .realm-mastery{visibility:hidden!important}
body #app .chest-shortcut{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;width:78px;min-height:88px;padding:0 5px 6px;border:0;background:transparent;color:#234c58;box-shadow:none;cursor:pointer;touch-action:manipulation;font:inherit}
body #app .chest-shortcut:focus-visible{outline:3px solid #197f97;outline-offset:4px;border-radius:8px}
body #app .chest-shortcut-art{display:block;width:78px;height:65px;transform-origin:50% 80%;animation:pocket-chest-shake 6s ease-in-out infinite}
body #app .chest-shortcut .tidal-chest{display:block;width:100%;height:100%;filter:drop-shadow(0 3px 1px #234b4933)}
body #app .chest-shortcut .chest-body,body #app .chest-shortcut .chest-lid,body #app .chest-shortcut .chest-sparks{animation:none!important}
body #app .chest-shortcut-track{display:block;width:60px;height:7px;background:#315b64;border:1px solid #e9d29b;box-shadow:0 1px 2px #173c4333;overflow:hidden;border-radius:3px}
body #app .chest-shortcut-track>span{display:block;height:100%;background:linear-gradient(90deg,#57c5ba,#b4e3b1,#f2d979);transition:width .3s ease-out}
body #app .chest-shortcut-count{font-size:10px;font-weight:900;line-height:1.3;padding:1px 5px;background:#fff6dbeb;border-radius:3px;font-variant-numeric:tabular-nums}
body #app .chest-shortcut-alert{position:absolute;top:3px;right:1px;display:grid;place-items:center;width:21px;height:23px;background:#cd343d;color:#fff9e8;border:2px solid #ffeac5;border-radius:8px 8px 8px 2px;font-size:16px;line-height:1;font-weight:900;box-shadow:0 2px 0 #7f2928}
body #app .chest-shortcut[aria-expanded=true] .chest-shortcut-art{animation-play-state:paused}
body #app .chest-shortcut[aria-expanded=true]{background:#fff2d450;border-radius:10px}
body #app .realm-main.chest-guidance .realm-mini{visibility:visible}
body #app .realm-main.chest-guidance .kingdom-place-label[data-place=chest]{border-color:#f4c968!important;color:#193f4b!important;background:#fff0b4!important;box-shadow:0 0 0 2px #9e7832,0 3px 0 #234d4c44!important}
body #app .minimap-chest-route{pointer-events:none}
body #app .chest-guide-note{display:flex;gap:8px;align-items:center;margin:0 0 12px;font-size:.8rem;color:#405e60;line-height:1.4}
body #app .chest-guide-note>span{font-size:20px;color:#a47924}
@keyframes pocket-chest-shake{0%,82%,100%{transform:rotate(0)}85%,91%{transform:rotate(-6deg)}88%,94%{transform:rotate(6deg)}97%{transform:rotate(-2deg)}}
@media(max-width:760px){body #app .realm-mastery{top:calc(154px + env(safe-area-inset-top));left:10px;width:min(186px,calc(100% - 204px))}body #app .mastery-notice{gap:5px;padding:6px 7px}body #app .realm-chest-shortcut{top:calc(214px + env(safe-area-inset-top));left:10px;width:68px}body #app .chest-shortcut{width:68px;min-height:82px}body #app .chest-shortcut-art{width:68px;height:58px}body #app .chest-shortcut-track{width:54px}body #app .chest-shortcut-alert{right:-1px;top:2px}body #app .realm-panel[data-route=rewards]{top:calc(310px + env(safe-area-inset-top))}body #app .realm-main.chest-guidance .realm-mini{pointer-events:none}}
@media(max-height:600px) and (min-width:761px){body #app .realm-chest-shortcut{top:164px;left:20px}}
@media(max-height:600px) and (max-width:760px) and (orientation:landscape){body #app .realm-mastery{top:88px;width:160px}body #app .realm-chest-shortcut{top:150px;left:10px}body #app .realm-panel[data-route=rewards]{top:72px;left:42%;right:12px;width:auto}body #app .realm-main.chest-guidance .realm-mini{visibility:hidden}}
@media(prefers-reduced-motion:reduce){body #app .chest-shortcut-art{animation:none}body #app .chest-shortcut-track>span,body #app .mastery-notice{transition:none}}
html.chest-motion-paused body #app .chest-shortcut-art,body.account-open #app .chest-shortcut-art,body.training-open #app .chest-shortcut-art{animation-play-state:paused}

@media(max-width:370px){body #app .mastery-emblem{flex-basis:16px}body #app .mastery-emblem .icon{width:16px;height:16px}body #app .mastery-copy strong{font-size:11px}body #app .mastery-copy small{font-size:9px}}

/* Short portrait phones keep the ledger below the hero, clear of both tool icons. */
@media(max-width:360px) and (orientation:portrait){body #app .realm-mastery{width:128px}body #app .mastery-emblem{flex-basis:16px}body #app .mastery-emblem .icon{width:16px;height:16px}body #app .mastery-copy strong{font-size:11px}body #app .mastery-copy small{font-size:9px}}
