#pal-wallet{position:fixed;z-index:35;top:max(76px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(680px,calc(100% - 24px));font-family:'Trebuchet MS',sans-serif;color:#795e47;direction:ltr}
#pal-wallet[hidden]{display:none}
#pal-wallet .wallet-panel{position:relative;height:164px;padding:20px 18px;background:url('/pal-wallet-assets/paper-panel.png') center/100% 100% no-repeat}
#pal-wallet .wallet-days{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px}
#pal-wallet .wallet-day{position:relative;height:124px;display:flex;align-items:center;flex-direction:column;padding:14px 0 12px;gap:6px;background:url('/pal-wallet-assets/day-tile.png') center/100% 100% no-repeat}
#pal-wallet .wallet-day.today{background-color:#eed7b540;border-radius:12px}
#pal-wallet .wallet-day.today:before{content:'';position:absolute;inset:0;background:#f1cc8b20;border-radius:12px;pointer-events:none}
#pal-wallet .wallet-day-label{font-size:11px;font-weight:bold;letter-spacing:.2px;line-height:15px}
#pal-wallet .wallet-coin{width:40px;height:40px;object-fit:contain}
#pal-wallet .wallet-amount{font-size:16px;line-height:20px;font-weight:bold}
#pal-wallet .received .wallet-coin{opacity:.4;filter:saturate(.6)}
#pal-wallet .wallet-cross{position:absolute;top:35px;left:0;right:0;text-align:center;font:39px/1 Georgia;color:#947961;transform:rotate(-10deg)}
#pal-wallet .wallet-claim{position:absolute;top:145.5px;left:50%;transform:translateX(-50%);width:119px;height:37px;border:0;background:url('/pal-wallet-assets/claim-button.png') center/100% 100% no-repeat;color:#4f593e;font:700 13px 'Trebuchet MS',sans-serif;letter-spacing:1px;cursor:pointer}
#pal-wallet .wallet-claim:disabled{cursor:default;filter:saturate(.45)}
#pal-wallet .wallet-claim:focus-visible,#pal-wallet button:focus-visible,#pal-wallet-toggle:focus-visible{outline:2px solid #55684b;outline-offset:4px}
#pal-wallet .pal-wallet-bar{margin-top:28px;display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;background:#faf4e7ed;border-radius:9px;padding:7px 10px}
#pal-wallet .pal-wallet-bar button{border:0;border-radius:5px;padding:5px 7px;background:#e4e7d8;color:#4f593e;font:inherit;cursor:pointer}
#pal-wallet-toggle{position:fixed;right:18px;bottom:84px;z-index:36;display:flex;align-items:center;gap:5px;border:1px solid #cbbca2;border-radius:24px;padding:8px 12px;background:#faf4e7;color:#795e47;font:14px 'Trebuchet MS',sans-serif;cursor:pointer}
#pal-wallet-toggle img{width:24px;height:24px}
@media(max-width:600px){#pal-wallet{top:76px}#pal-wallet .wallet-panel{padding:16px 12px;height:156px}#pal-wallet .wallet-days{gap:3px}#pal-wallet .wallet-day{padding-top:12px;gap:8px}#pal-wallet .wallet-day-label{max-width:24px;text-align:center;line-height:13px;letter-spacing:0}#pal-wallet .wallet-coin{width:min(32px,100%);height:32px}#pal-wallet .wallet-amount{font-size:13px}#pal-wallet .wallet-cross{top:42px;font-size:30px}#pal-wallet .wallet-claim{top:137.5px}}
@media(prefers-reduced-motion:no-preference){#pal-wallet .wallet-day.just-claimed .wallet-coin{animation:wallet-collect 350ms ease-out}@keyframes wallet-collect{0%{transform:translateY(0);opacity:1}50%{transform:translateY(-7px);opacity:.7}100%{transform:translateY(0);opacity:.4}}}

/* Compact test-wallet revision. Artwork and claim behavior are unchanged. */
#pal-wallet{width:min(540px,calc(100% - 24px))}
#pal-wallet .wallet-panel{height:124px;padding:16px 14px}
#pal-wallet .wallet-days{gap:3px}
#pal-wallet .wallet-day{height:92px;padding:9px 0;gap:4px}
#pal-wallet .wallet-day-label{font-size:11px;line-height:15px;letter-spacing:0}
#pal-wallet .wallet-coin{width:30px;height:30px}
#pal-wallet .wallet-amount{font-size:13px;line-height:17px}
#pal-wallet .wallet-cross{top:26px;font-size:30px}
#pal-wallet .wallet-claim{top:109px;width:96px;height:30px;font-size:11px;letter-spacing:.7px}
#pal-wallet .pal-wallet-bar{width:max-content;max-width:100%;margin:22px auto 0;padding:4px 7px;gap:6px;font-size:11px;border-radius:7px;background:#faf4e7d9}
#pal-wallet .pal-wallet-bar button{padding:3px 5px}
@media(max-width:600px){#pal-wallet .wallet-day{padding-top:6px;gap:4px}#pal-wallet .wallet-day-label{max-width:24px;line-height:13px}#pal-wallet .wallet-coin{width:min(24px,100%);height:24px}#pal-wallet .wallet-cross{top:33px;font-size:26px}}

/* Centered, fixed ten-day pages. Mobile keeps every day legible in two rows. */
.account-entry{display:flex!important}
#pal-wallet-toggle{position:static;display:flex;width:max-content;max-width:100%;margin:12px 0;z-index:auto;padding:7px 11px;gap:7px}
#pal-wallet-toggle[hidden]{display:none!important}
#pal-wallet-toggle small{font-size:11px;font-weight:400;color:#85745f}
#pal-wallet{top:50%;left:50%;transform:translate(-50%,-50%);width:min(540px,calc(100% - 28px))}
#pal-wallet .wallet-panel{isolation:isolate}
#pal-wallet .wallet-claim{min-height:30px}
#pal-wallet .wallet-celebration{position:absolute;inset:0;pointer-events:none;display:none;z-index:2}
#pal-wallet.completing .wallet-celebration{display:block}
#pal-wallet .wallet-celebration img{position:absolute;left:calc(50% - 11px);top:45%;width:22px;height:22px;opacity:0}
#pal-wallet .wallet-celebration img:nth-child(1){--drift:-45px;--turn:-18deg}
#pal-wallet .wallet-celebration img:nth-child(2){--drift:0px;--turn:12deg}
#pal-wallet .wallet-celebration img:nth-child(3){--drift:45px;--turn:24deg}
@media(prefers-reduced-motion:no-preference){
 #pal-wallet.completing .wallet-celebration img{animation:paw-celebrate 750ms ease-out both}
 #pal-wallet.completing .wallet-celebration img:nth-child(2){animation-delay:50ms}
 #pal-wallet.completing .wallet-celebration img:nth-child(3){animation-delay:100ms}
 #pal-wallet.completing .wallet-day:last-child .wallet-coin{animation:paw-hop 650ms ease-in-out}
 #pal-wallet.page-enter .wallet-days{animation:paw-page-enter 260ms ease-out}
 @keyframes paw-celebrate{0%{transform:translate(0,10px) scale(.5);opacity:0}20%{opacity:1}100%{transform:translate(var(--drift),-55px) rotate(var(--turn)) scale(.8);opacity:0}}
 @keyframes paw-hop{0%,100%{transform:translateY(0)}40%{transform:translateY(-9px) rotate(-8deg)}70%{transform:translateY(-2px) rotate(5deg)}}
 @keyframes paw-page-enter{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
}
@media(max-width:600px){
 #pal-wallet{top:50%}
 #pal-wallet .wallet-panel{height:228px;padding:16px 14px}
 #pal-wallet .wallet-days{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px 5px}
 #pal-wallet .wallet-day{height:92px;padding:9px 0;gap:4px}
 #pal-wallet .wallet-day-label{max-width:none;font-size:11px;line-height:15px;white-space:nowrap}
 #pal-wallet .wallet-coin{width:30px;height:30px}
 #pal-wallet .wallet-amount{font-size:14px;line-height:17px}
 #pal-wallet .wallet-cross{top:26px;font-size:30px}
 #pal-wallet .wallet-claim{top:213px}
 #pal-wallet .pal-wallet-bar{gap:5px;justify-content:center}
 #pal-wallet .pal-wallet-bar button{min-height:30px;min-width:30px}
}
@media(min-width:480px) and (max-width:600px) and (max-height:480px){
 #pal-wallet .wallet-panel{height:124px}
 #pal-wallet .wallet-days{grid-template-columns:repeat(10,minmax(0,1fr));gap:3px}
 #pal-wallet .wallet-amount{font-size:13px}
 #pal-wallet .wallet-claim{top:109px}
}

/* Explicit current-day marker, separate from collected and upcoming states. */
#pal-wallet .wallet-day.today{background-color:#dee6cf80}
#pal-wallet .wallet-day.today:before{inset:1px;border:2px solid #899a70;background:#e0e8d02b;border-radius:10px;box-sizing:border-box}
#pal-wallet .wallet-today{position:absolute;z-index:1;top:-10px;left:50%;transform:translateX(-50%);padding:1px 4px;border:1px solid #899a70;border-radius:5px;background:#eef1df;color:#4e623c;font:700 10px/13px 'Trebuchet MS',sans-serif;letter-spacing:.2px;white-space:nowrap}

/* Quiet balance in the linked animal profile: original coin + amount only. */
#pal-wallet-toggle{border:0;background:transparent;box-shadow:none;border-radius:0;padding:4px 0;gap:6px;margin:10px 0;color:#795e47;min-height:32px}
#pal-wallet-toggle small{display:none}
#pal-wallet-toggle:hover{background:transparent;box-shadow:none}

#pal-wallet .pal-wallet-bar{position:absolute;top:100%;left:0;right:0;margin-top:20px;display:flex;justify-content:center;gap:8px;color:#665b4e;font-size:12px;}
#pal-wallet [data-action="close"]{position:absolute;right:4px;top:0;}

/* Focus the opened region, not CLAIM. Keep a rounded cue for keyboard navigation. */
#pal-wallet:focus{outline:none}
#pal-wallet .wallet-claim{border-radius:999px;-webkit-tap-highlight-color:transparent}
#pal-wallet .pal-wallet-bar{width:100%;max-width:100%;margin:24px 0 0;padding:0;background:transparent;border:0;box-shadow:none;pointer-events:none;text-align:center}
#pal-wallet .pal-wallet-bar [role="status"]:empty{display:none}
#pal-wallet > [data-action="close"]{position:absolute;top:-42px;right:0;width:40px;height:40px;min-width:40px;min-height:40px;padding:0;display:grid;place-items:center;border:0;border-radius:50%;background:transparent;box-shadow:none;color:#795e47;font:24px/1 'Trebuchet MS',sans-serif;cursor:pointer;-webkit-tap-highlight-color:transparent}
#pal-wallet > [data-action="close"]:hover{background:#faf4e780}

/* Leave room for the search bar, overlapping CLAIM, and award status. */
#pal-wallet{top:auto;bottom:calc(max(30px,env(safe-area-inset-bottom)) + 104px);transform:translateX(-50%)}
@media (max-width:700px), (max-width:950px) and (max-height:500px), (max-height:500px) and (pointer:coarse){
 #pal-wallet{top:auto;bottom:calc(max(24px,env(safe-area-inset-bottom)) + 84px)}
}
