68 lines
5.5 KiB
CSS
68 lines
5.5 KiB
CSS
/* Special redeem visuals (see fx.js): giant emote, bouncing emote celebration, highlighted message. */
|
|
#fx-alert { --ink:#3a2a20; --red:#b74347; position:fixed; inset:0; pointer-events:none; visibility:hidden; z-index:55; }
|
|
#fx-alert * { box-sizing:border-box; }
|
|
|
|
/* name strip, same paper + tape look as the cassette */
|
|
#fx-alert .strip { position:absolute; display:inline-block; max-width:520px; padding:8px 22px 10px; background:#fffdf7;
|
|
box-shadow:0 6px 14px rgba(0,0,0,.35); font:700 30px/1.05 'Caveat', cursive; color:var(--ink); }
|
|
#fx-alert .strip .u { color:var(--red); }
|
|
#fx-alert .strip:before, #fx-alert .strip:after { content:''; position:absolute; top:-10px; width:70px; height:24px;
|
|
background:rgba(190,160,240,.85); background-image:repeating-linear-gradient(45deg,#fff6 0 7px,#0000 7px 14px); }
|
|
#fx-alert .strip:before { left:-22px; transform:rotate(-28deg); }
|
|
#fx-alert .strip:after { right:-22px; transform:rotate(24deg); }
|
|
|
|
/* gigantify */
|
|
#fx-alert .giant { position:absolute; left:85px; top:70px; width:380px; height:380px; display:flex; align-items:center; justify-content:center; }
|
|
#fx-alert .giant img { width:100%; height:100%; object-fit:contain; filter:drop-shadow(0 12px 24px rgba(0,0,0,.5)); }
|
|
|
|
/* celebration */
|
|
#fx-alert .bounce { position:absolute; left:0; top:0; will-change:transform; filter:drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
|
|
|
|
/* highlighted message / message effect: big taped paper note, tall rather than wide */
|
|
#fx-alert .note { position:absolute; left:90px; top:90px; width:440px; min-height:300px; padding:30px 32px 34px; background:#fffdf7;
|
|
box-shadow:0 14px 30px rgba(0,0,0,.45); transform-origin:50% 0;
|
|
background-image:repeating-linear-gradient(#0000 0 51px, #0000001a 51px 52px); background-position:0 79px; }
|
|
#fx-alert .note:before, #fx-alert .note:after { content:''; position:absolute; top:-14px; width:120px; height:34px;
|
|
background:rgba(190,160,240,.85); background-image:repeating-linear-gradient(45deg,#fff6 0 8px,#0000 8px 16px);
|
|
box-shadow:0 1px 2px rgba(0,0,0,.15); }
|
|
#fx-alert .note:before { left:-34px; transform:rotate(-32deg); }
|
|
#fx-alert .note:after { right:-34px; transform:rotate(28deg); }
|
|
#fx-alert .note .who { font:700 34px/1.1 'Caveat', cursive; color:var(--ink); margin-bottom:10px; }
|
|
#fx-alert .note .who .u { color:var(--red); }
|
|
#fx-alert .note .text { font:700 46px/52px 'Caveat', cursive; color:var(--ink); word-wrap:break-word;
|
|
overflow:hidden; display:-webkit-box; -webkit-line-clamp:9; -webkit-box-orient:vertical; }
|
|
|
|
/* TTS redeems: envelope letter (fx.js envelope()). The flap opens, the letter rises all the way out (its peak may
|
|
leave the screen), then comes down in front of the envelope and ends ~80px from the top; words ink in as spoken.
|
|
Coordinates are bottom-up inside .envl (360x560); the letter's slot is clipped at the envelope's bottom edge. */
|
|
#fx-alert .envl { position:absolute; left:90px; top:-146px; width:360px; height:560px; }
|
|
#fx-alert .envl .env { position:absolute; left:0; bottom:0; width:360px; height:216px; z-index:3; background:#e9d3b0; border-radius:6px;
|
|
box-shadow:0 10px 20px rgba(0,0,0,.45); }
|
|
#fx-alert .envl .env:before { content:''; position:absolute; inset:0; border-radius:6px; z-index:3;
|
|
background:linear-gradient(32deg, #dcc39b 50%, transparent 50%) left/50% 100% no-repeat,
|
|
linear-gradient(-32deg, #dcc39b 50%, transparent 50%) right/50% 100% no-repeat; }
|
|
#fx-alert .envl .flap { position:absolute; left:0; bottom:216px; width:360px; height:122px; transform-origin:bottom; z-index:1;
|
|
background:#d8bd93; clip-path:polygon(0 100%, 50% 0, 100% 100%); animation:fx-flap .6s .35s ease-out both; }
|
|
@keyframes fx-flap { from { transform:rotateX(180deg); z-index:4; } }
|
|
#fx-alert .envl .slot { position:absolute; left:-40px; right:-40px; bottom:0; top:-400px; overflow:hidden; z-index:2; animation:fx-zswap 1.6s .8s both; }
|
|
@keyframes fx-zswap { 0%, 54% { z-index:2; } 55%, 100% { z-index:6; } }
|
|
#fx-alert .envl .letter { --fs:24px; --lh:30px; position:absolute; left:62px; bottom:30px; width:316px; min-height:290px; background:#fffdf7; padding:18px 22px 22px;
|
|
box-shadow:0 4px 12px rgba(0,0,0,.3); animation:fx-rise 1.6s .8s both;
|
|
background-image:repeating-linear-gradient(transparent 0 calc(var(--lh) - 1px), rgba(110,150,200,.3) calc(var(--lh) - 1px) var(--lh));
|
|
background-position:0 calc(22px + var(--lh) - 6px); }
|
|
/* longer messages: smaller handwriting, the ruled lines follow */
|
|
#fx-alert .envl .letter.long { --fs:20px; --lh:25px; }
|
|
#fx-alert .envl .letter.longer { --fs:17px; --lh:21px; width:340px; }
|
|
#fx-alert .envl .letter.huge { --fs:15px; --lh:18px; width:356px; }
|
|
@keyframes fx-rise {
|
|
0% { transform:translateY(110px); animation-timing-function:cubic-bezier(.3,.7,.4,1); }
|
|
45% { transform:translateY(-200px) rotate(-1deg); }
|
|
55% { transform:translateY(-200px) rotate(-1deg); animation-timing-function:cubic-bezier(.4,0,.3,1.2); }
|
|
100% { transform:translateY(-14px) rotate(-2deg); }
|
|
}
|
|
#fx-alert .envl .to { font:700 22px/1 Caveat, cursive; color:var(--red); margin-bottom:6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
|
#fx-alert .envl .tx { font:700 var(--fs)/var(--lh) Caveat, cursive; color:var(--ink); word-wrap:break-word; }
|
|
#fx-alert .envl .w { opacity:.12; transition:opacity .25s; }
|
|
#fx-alert .envl .w.on { opacity:1; }
|
|
#fx-alert .envl .seal { position:absolute; left:157px; bottom:86px; width:46px; height:46px; z-index:5; border-radius:50%; background:#b74347;
|
|
box-shadow:inset 0 -3px 0 rgba(0,0,0,.2), 0 3px 6px rgba(0,0,0,.35); color:#ffd9d4; font:22px/46px sans-serif; text-align:center; }
|