.activity-preview { position: fixed; z-index: 45; left: 18px; bottom: 22px; display: flex; align-items: center; gap: 12px; width: 326px; max-width: calc(100vw - 28px); padding: 15px 40px 16px 14px; overflow: hidden; border: 1px solid #5877a3; border-radius: 16px; background: linear-gradient(125deg, #17365b, #0a1934 75%); box-shadow: 0 12px 28px #0008; color: #f4f9ff; font-family: system-ui, sans-serif; }
.activity-preview[hidden] { display: none; }
body:has(dialog[open]) .activity-preview { visibility: hidden; }
body:has(.dock) .activity-preview { bottom: calc(90px + env(safe-area-inset-bottom)); }
.activity-preview-icon { position: relative; flex: 0 0 47px; width: 47px; height: 47px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(#ffe99b, #ffb21a); color: #142b4a; box-shadow: inset 0 1px 0 #fff9, 0 3px 7px #0004; }
.activity-preview-icon svg { width: 33px; height: 33px; }
.activity-preview-coin { position: absolute; right: -5px; bottom: -4px; width: 22px; height: 22px; border: 2px solid #fff1aa; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #fff2aa, #ffce43 50%, #d88b00); box-shadow: 0 2px 4px #0007; }
.activity-preview-coin::after { content: ''; position: absolute; inset: 4px; border: 1px solid #a76000; border-radius: 50%; }
.activity-preview-copy { flex: 1; min-width: 0; }
.activity-preview-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; }
.activity-preview-name { font-size: 14px; line-height: 1.25; font-weight: 800; }
.activity-preview-label { padding: 3px 5px; border-radius: 4px; background: #ffe08f; color: #13254f; font-size: 11px; line-height: 1; font-weight: 800; }
.activity-preview p { margin: 0; font-size: 13px; line-height: 1.45; font-weight: 600; }
.activity-preview-value { color: #73f1bb; font-size: 15px; white-space: nowrap; }
.activity-preview[data-kind=coins] .activity-preview-value { color: #ffe08f; }
.activity-preview-detail { display: block; margin-top: 2px; color: #bdd0eb; font-size: 11px; line-height: 1.4; }
.activity-preview-close { position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: #bdd0eb; cursor: pointer; }
.activity-preview-close svg { display: block; width: 100%; height: 100%; }
.activity-preview-close:hover { background: #ffffff16; color: #fff; }
.activity-preview-close:focus-visible { outline: 2px solid #ffe08f; outline-offset: -2px; }
.activity-preview-time { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #43d4ff, #ffb21a); transform-origin: left; }
.activity-preview.is-visible { animation: activity-arrive .4s cubic-bezier(.16,1,.3,1); }
.activity-preview.is-visible .activity-preview-time { animation: activity-time 6.5s linear forwards; }
@keyframes activity-arrive { from { opacity: 0; transform: translateX(-22px) translateY(6px); } }
@keyframes activity-time { to { transform: scaleX(0); } }
@media (max-width: 600px) { .activity-preview { left: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .activity-preview.is-visible, .activity-preview.is-visible .activity-preview-time { animation: none !important; } .activity-preview-time { display: none; } }

/* Temas locais: o selo de prévia acompanha o nome em ambos. */
.activity-theme-minions { background: linear-gradient(125deg, #123d68, #071a36 80%); border-color: #487fa6; }
.activity-theme-minions .activity-preview-icon { background: linear-gradient(#fff3a2, #ffce24); color: #574009; }
.activity-theme-minions .activity-preview-label { background: #ffe257; }
.activity-theme-minions .activity-preview-time { background: linear-gradient(90deg, #ffdf42, #49d9ff); }
.activity-theme-candy { background: linear-gradient(125deg, #fff2fd, #f1e6fc); color: #4c285c; border-color: #d5a2d6; box-shadow: 0 12px 28px #54215833; }
.activity-theme-candy .activity-preview-icon { background: linear-gradient(#ff9fdf, #f746ad); color: #65104b; box-shadow: inset 0 1px 0 #fff9, 0 3px 7px #9c357744; }
.activity-theme-candy .activity-preview-label { background: #efd0ee; color: #722764; }
.activity-theme-candy .activity-preview-value { color: #167448; }
.activity-theme-candy[data-kind=coins] .activity-preview-value { color: #a02a80; }
.activity-theme-candy .activity-preview-detail { color: #745078; }
.activity-theme-candy .activity-preview-close { color: #745078; }
.activity-theme-candy .activity-preview-close:hover { background: #96287a12; color: #722764; }
.activity-theme-candy .activity-preview-time { background: linear-gradient(90deg, #e437a5, #8160dc); }
body:has(.bottom-nav) .activity-preview, body:has(.mr-mobile-nav) .activity-preview, .activity-theme-minions { bottom: calc(92px + env(safe-area-inset-bottom)); }
