/* LEFT ON READ: 2:14am, a bedroom lit mostly by a phone.
   Light: a weak warm lamp off-screen top-left, and the phone screen, which is the
   brightest thing in the room (cool blue). Shadows are deep violet, skin stays warm. */
.tx { background: #0c0a1a;
  /* worn rubber-stamp ink: mostly solid, with blotchy gaps */
  --tx-grunge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5.2 0 0 0 -1.38'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23g)'/%3E%3C/svg%3E"); }

/* ---------------- the room ---------------- */
.tx-room { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tx-wallpaper { position: absolute; inset: 0; background:
  radial-gradient(58% 60% at 44% 50%, rgba(64, 140, 255, .2), rgba(64, 140, 255, .06) 55%, transparent 75%),
  radial-gradient(45% 55% at -4% -6%, rgba(255, 166, 92, .13), transparent 70%),
  repeating-linear-gradient(90deg, rgba(255, 255, 255, .02) 0 2px, transparent 2px 46px),
  linear-gradient(180deg, #1b1735 0%, #131029 55%, #0b0a1a 100%); }
/* fairy lights, out of focus */
.tx-bokeh { position: absolute; inset: 0; }
.tx-bokeh i { position: absolute; border-radius: 50%; opacity: var(--o);
  background: radial-gradient(circle closest-side, color-mix(in srgb, var(--c), white 50%) 0%, var(--c) 34%, color-mix(in srgb, var(--c), transparent 60%) 68%, transparent 100%);
}
/* static on purpose: out-of-focus lights don't need to twinkle, and every animated
   light costs a composite per frame on weak GPUs */
.tx-bokeh i.near { background: radial-gradient(circle closest-side, color-mix(in srgb, var(--c) 34%, transparent) 0%, color-mix(in srgb, var(--c) 42%, transparent) 70%, color-mix(in srgb, var(--c) 70%, transparent) 88%, color-mix(in srgb, var(--c) 30%, transparent) 95%, transparent 100%); }
.tx-bokeh i.far { background: radial-gradient(circle closest-side, var(--c), transparent); }
.tx-spill { position: absolute; left: 260px; width: 900px; bottom: -40px; height: 300px; background: radial-gradient(closest-side, rgba(90, 170, 255, .26), rgba(90, 170, 255, .08) 60%, transparent); }
.tx-duvet { position: absolute; left: 0; right: 0; bottom: -12px; height: 220px; }
.tx-duvet svg { display: block; width: 100%; height: 100%; }
/* vignette and film grain, baked into the static room layer (an overlay above the
   animated phone would have to be re-composited every frame) */
.tx-vig { position: absolute; inset: 0; background: radial-gradient(120% 100% at 46% 44%, transparent 45%, rgba(6, 4, 16, .62) 100%); }
.tx-room::after { content: ""; position: absolute; inset: 0; background-image: var(--tex-noise); background-size: 180px; opacity: .06; }

/* ---------------- left: an index card taped up, who + what you're trying to do ---------------- */
.tx-left { position: absolute; left: 34px; top: 92px; width: 404px; }
.tx-card { position: relative; color: var(--ink); }
.tx-mission { display: flex; flex-direction: column; gap: 14px; padding: 24px 22px 18px; border: 3px solid var(--ink); border-radius: 9px; transform: rotate(-1.4deg);
  background: var(--tex-paper) 0 0 / 300px, linear-gradient(172deg, #fffbf3 0%, #f8eedc 58%, #ecdcbd 100%); background-blend-mode: multiply, normal;
  box-shadow: inset 0 1px 0 #fff, inset -22px 0 34px -22px rgba(70, 150, 255, .4), 0 2px 3px rgba(var(--shadow-tint), .4), 0 22px 44px rgba(var(--shadow-tint), .6);
  transition: box-shadow .3s; }
.tx-tape { position: absolute; left: 50%; top: -17px; width: 128px; height: 34px; margin-left: -64px; transform: rotate(-3.5deg); z-index: 2;
  background: linear-gradient(180deg, rgba(255, 251, 236, .78), rgba(236, 226, 200, .66)), var(--tex-noise) 0 0 / 120px;
  clip-path: polygon(0 6%, 4% 0, 7% 9%, 10% 2%, 90% 0, 94% 8%, 97% 1%, 100% 7%, 98% 50%, 100% 93%, 96% 100%, 93% 92%, 89% 100%, 8% 98%, 5% 91%, 2% 100%, 0 94%, 2% 50%);
  filter: drop-shadow(0 2px 2px rgba(var(--shadow-tint), .35)); }
.tx-cnum { position: absolute; right: 18px; top: -15px; z-index: 3; padding: 3px 11px 5px; border: 2.5px solid var(--ink); border-radius: 7px; transform: rotate(3deg);
  background: linear-gradient(180deg, #8ae0ff, #38c6ff 55%, #1fa3db); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(0, 0, 0, .15), 0 3px 6px rgba(var(--shadow-tint), .35);
  font-family: var(--font-display); font-size: 15px; letter-spacing: .04em; }
.tx-lbl { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-size: 19px; letter-spacing: .03em; }
.tx-contact { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 2px solid rgba(214, 72, 86, .55); }
/* contact photo: a lit disc, the flat avatar sits inside and catches the same light */
.tx-cav { position: relative; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; border: 3px solid var(--ink);
  background: radial-gradient(circle at 36% 28%, #fffdf8, #ece2cf 62%, #d3c3a4); box-shadow: 0 6px 12px rgba(var(--shadow-tint), .35); }
.tx-cav .av { margin-top: 8px; }
.tx-cav .av svg { display: block; }
.tx-cav::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .42), transparent 42%), radial-gradient(circle at 74% 86%, rgba(40, 18, 80, .32), transparent 58%);
  box-shadow: inset 0 -5px 10px rgba(40, 18, 80, .25), inset 0 3px 4px rgba(255, 255, 255, .5); }
.tx-cname { font-family: var(--font-display); font-size: 30px; line-height: 1; letter-spacing: .01em; }
.tx-crole { margin-top: 7px; font-size: 14.5px; font-weight: 500; color: #5c5266; line-height: 1.25; }
/* the goal, on a strip of black label tape */
.tx-goalbox { position: relative; padding: 11px 15px 13px; border-radius: 7px; color: #fff6e6;
  background: linear-gradient(180deg, #2d2638 0%, #19141f 46%, #100c16 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -2px 0 rgba(0, 0, 0, .55), 0 2px 0 rgba(var(--shadow-tint), .25), 0 6px 10px rgba(var(--shadow-tint), .25); }
.tx-glbl { font-size: 11.5px; font-weight: 800; letter-spacing: .18em; color: var(--volt); }
.tx-goal { margin-top: 4px; font-family: var(--font-display); font-size: 25px; line-height: 1.12; letter-spacing: .01em; text-shadow: 0 1px 0 rgba(0, 0, 0, .7); }
/* mood meter, recessed into the card */
.tx-icons { display: flex; gap: 3px; font-size: 22px; line-height: 1; }
.tx-icons span { color: #cdbfa3; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); transition: color .2s, transform .2s; }
.tx-icons span.on { color: #e8336b; text-shadow: 0 1px 0 rgba(120, 10, 40, .45), 0 0 1px #7a0c2c; transform: scale(1.06); }
.tx-mood[data-lvl="mid"] .tx-icons span.on { color: #ec8a10; text-shadow: 0 1px 0 rgba(110, 50, 0, .45); }
.tx-mood[data-lvl="low"] .tx-icons span.on { color: #e0262b; animation: tx-throb .5s ease-in-out infinite alternate; }
@keyframes tx-throb { to { transform: scale(1.2); } }
.tx-moodbar { height: 18px; margin-top: 7px; border: 2.5px solid var(--ink); border-radius: 9px; overflow: hidden;
  background: linear-gradient(180deg, #c9b994, #e7d9bc); box-shadow: inset 0 3px 4px rgba(70, 44, 16, .4); }
.tx-moodbar i { display: block; height: 100%; border-radius: 0 6px 6px 0; background-color: #e8336b; transition: width .3s, background-color .3s;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .55) 0, rgba(255, 255, 255, .14) 42%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .18) 100%);
  box-shadow: inset -2px 0 0 rgba(0, 0, 0, .15); }
.tx-mood[data-lvl="high"] .tx-moodbar i { background-color: #14b07f; }
.tx-mood[data-lvl="mid"] .tx-moodbar i { background-color: #f08f12; }
.tx-mood[data-lvl="low"] .tx-moodbar i { background-color: #e0262b; }
.tx-mood.drop { animation: wobble .45s; }
.tx-mood.rise { animation: punch .35s var(--ease-pop); }
.tx-ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; }
.tx-end.lose { color: #c4202a; } .tx-end.lose::before { content: "LOSE: "; color: #8a7f8f; }
.tx-end.win { color: #0f8f66; } .tx-end.win::before { content: "WIN: "; color: #8a7f8f; }
.tx-how { font-size: 14px; font-weight: 500; color: #6a6070; line-height: 1.35; }
.tx-beats { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6a6070; }
.tx-beats span { margin-right: auto; }
.tx-beats i { width: 19px; height: 19px; border-radius: 50%; border: 2.5px solid var(--ink);
  background: radial-gradient(circle at 50% 30%, #c4b38f, #e7d9bc); box-shadow: inset 0 2px 3px rgba(70, 44, 16, .45); }
.tx-beats i.done { background: radial-gradient(circle at 34% 28%, #b8ffe0 0, #1cc08c 42%, #0b7a58 100%); box-shadow: 0 1px 2px rgba(var(--shadow-tint), .3); }
.tx-beats i.cur { background: radial-gradient(circle at 34% 28%, #d9f5ff 0, #38c6ff 42%, #1478b8 100%); box-shadow: 0 0 10px rgba(56, 198, 255, .7); animation: tx-throb .6s ease-in-out infinite alternate; }
.tx-mission[data-result="win"] { box-shadow: 0 0 0 4px #14b07f, 0 0 30px rgba(20, 176, 127, .55), 0 22px 44px rgba(var(--shadow-tint), .6); }
.tx-mission[data-result="lose"] { box-shadow: 0 0 0 4px #e0262b, 0 0 30px rgba(224, 38, 43, .55), 0 22px 44px rgba(var(--shadow-tint), .6); animation: wobble .45s; }

/* ---------------- the phone ---------------- */
.tx-phonewrap { position: absolute; left: 470px; top: 6px; width: 460px; height: 800px; }
.tx-glow { position: absolute; inset: -150px -230px -60px; pointer-events: none;
  background: radial-gradient(closest-side at 50% 54%, rgba(96, 178, 255, .3), rgba(96, 178, 255, .1) 56%, transparent); }
/* rose-titanium frame: lit left edge, specular top, darker right */
.tx-phone { position: absolute; inset: 0; border-radius: 68px; border: 3px solid var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, .55) 0, rgba(255, 255, 255, 0) 2.4%, rgba(0, 0, 0, 0) 95.5%, rgba(20, 6, 20, .4) 100%),
    linear-gradient(90deg, #4b2c3f 0%, #f9e1ea 2.3%, #d9a8bc 4.2%, #a87390 9%, #8b5c75 50%, #9a6982 90%, #d7aabd 96.4%, #f3d4df 97.8%, #3d2232 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 6px 10px 16px rgba(var(--shadow-tint), .5), 22px 36px 60px rgba(var(--shadow-tint), .65); }
.tx-bezel { position: absolute; inset: 7px; border-radius: 61px; background: #040406; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .08), inset 0 0 0 4px #000; }
.tx-btn { position: absolute; width: 9px; border: 2px solid var(--ink); border-radius: 3px;
  background: linear-gradient(90deg, #5b3449, #f1cdd9 35%, #b07e97 62%, #6c4459); }
.tx-btn.b1 { left: -6px; top: 150px; height: 44px; } .tx-btn.b2 { left: -6px; top: 208px; height: 74px; } .tx-btn.b3 { right: -6px; top: 196px; height: 104px; }
.tx-island { position: absolute; top: 29px; left: 50%; width: 112px; height: 32px; margin-left: -56px; border-radius: 18px; background: #000; z-index: 3;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.tx-island i { position: absolute; right: 11px; top: 9px; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #8fa6e6 0 1.2px, #2a3770 2.6px, #10152d 5px, #000 7px); box-shadow: 0 0 0 1px #171a2b; }
.tx-screen { position: absolute; inset: 17px; z-index: 1; border-radius: 52px; overflow: hidden; background: #fff; display: flex; flex-direction: column; color: #000; font-family: var(--font-ui); }
.tx-glare { position: absolute; inset: 7px; z-index: 5; border-radius: 61px; pointer-events: none;
  background: linear-gradient(116deg, rgba(255, 255, 255, .15) 0%, rgba(255, 255, 255, .04) 21%, transparent 21.5% 60%, rgba(255, 255, 255, .055) 60.5%, rgba(255, 255, 255, .015) 71%, transparent 71.5%);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .1); }
.tx-crack { position: absolute; right: 7px; top: 7px; width: 200px; height: 200px; z-index: 4; pointer-events: none; border-top-right-radius: 61px; overflow: hidden; }
.tx-crack svg { display: block; width: 100%; height: 100%; }

/* status bar */
.tx-status { height: 50px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 8px 34px 0 46px; font-size: 16px; font-weight: 600; letter-spacing: .01em; }
.tx-time { font-weight: 700; }
.tx-icons-r { display: flex; gap: 6px; align-items: center; color: #000; }
.tx-icons-r svg { display: block; height: 12px; width: auto; fill: currentColor; }
.tx-icons-r svg:last-child { height: 13px; }
/* conversation header: back, centred contact, video */
.tx-head { height: 80px; flex: none; display: grid; grid-template-columns: 70px 1fr 70px; align-items: start; padding: 0 12px;
  background: linear-gradient(180deg, rgba(250, 250, 252, .98), rgba(243, 243, 246, .98)); border-bottom: 1px solid rgba(60, 60, 67, .16); }
.tx-back { display: flex; align-items: center; gap: 4px; margin-top: 14px; color: #0a84ff; }
.tx-back svg { width: 11px; height: 19px; }
.tx-back b { min-width: 30px; padding: 1px 6px; border-radius: 10px; background: #0a84ff; color: #fff; font-size: 12px; font-weight: 600; text-align: center; }
.tx-hmid { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding-top: 2px; }
.tx-hav { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(180deg, #a9afbd, #858b99); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.tx-hav .av { margin-top: 6px; }
.tx-hav .av svg { display: block; }
.tx-hname { display: flex; flex-direction: column; align-items: center; line-height: 1.15; max-width: 100%; }
.tx-hname b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tx-hname small { font-size: 11px; color: #8e8e93; }
.tx-hicons { justify-self: end; margin-top: 16px; margin-right: 6px; color: #0a84ff; }
.tx-hicons svg { display: block; width: 26px; height: 16px; }
/* messages */
.tx-msgs { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; padding: 8px 16px 10px; }
.tx-screen.newchat .tx-msgs { animation: tx-slide .35s var(--ease-out); }
@keyframes tx-slide { from { transform: translateX(60px); opacity: 0; } }
.tx-day { align-self: center; margin-bottom: 6px; font-size: 11.5px; font-weight: 600; color: #8e8e93; }
.tx-b { position: relative; max-width: 76%; padding: 8px 14px 9px; border-radius: 19px; font-size: 16.5px; font-weight: 400; line-height: 1.28; letter-spacing: .005em;
  animation: tx-pop .28s var(--ease-pop); word-break: break-word; flex: none; }
@keyframes tx-pop { from { transform: scale(.4) translateY(14px); opacity: 0; } }
.tx-b.in { align-self: flex-start; background: #e9e9eb; color: #000; transform-origin: left bottom; }
.tx-b.out { align-self: flex-end; background: linear-gradient(180deg, #2b96ff, #0a7cff); color: #fff; transform-origin: right bottom; }
.tx-b.in + .tx-b.out, .tx-b.out + .tx-b.in, .tx-receipt + .tx-b.in { margin-top: 8px; }
/* iMessage tails, on the last bubble of a run */
.tx-b::before, .tx-b::after { content: ""; position: absolute; bottom: 0; height: 20px; }
.tx-b.in::before { left: -7px; width: 20px; background: #e9e9eb; border-bottom-right-radius: 16px 14px; }
.tx-b.in::after { left: -10px; width: 10px; background: #fff; border-bottom-right-radius: 10px; }
.tx-b.out::before { right: -7px; width: 20px; background: #0a7cff; border-bottom-left-radius: 16px 14px; }
.tx-b.out::after { right: -10px; width: 10px; background: #fff; border-bottom-left-radius: 10px; }
.tx-b.in:has(+ .tx-b.in)::before, .tx-b.in:has(+ .tx-b.in)::after,
.tx-b.out:has(+ .tx-b.out)::before, .tx-b.out:has(+ .tx-b.out)::after { display: none; }
.tx-btext { position: relative; z-index: 1; }
.tx-sender { position: relative; z-index: 1; font-size: 11.5px; font-weight: 700; margin-bottom: 1px; }
.tx-ac { text-decoration: underline wavy #ff3b30 2px; text-underline-offset: 3px; background: rgba(255, 59, 48, .32); border-radius: 4px; padding: 0 2px; }
.tx-b.out .tx-ac { background: rgba(255, 80, 70, .55); text-decoration-color: #ffd5d1; }
.tx-photo { display: grid; place-items: end start; width: 168px; height: 112px; padding: 6px 8px; border-radius: 13px; font-size: 11.5px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  background: radial-gradient(16px 16px at 76% 28%, #fff4c4 30%, #ffd23f 60%, transparent 100%), radial-gradient(120% 60% at 30% 100%, #1f8a58 40%, transparent 41%),
    radial-gradient(90% 50% at 85% 100%, #2ea76b 45%, transparent 46%), linear-gradient(#5ab6f0, #bfe6ff); }
.tx-receipt { align-self: flex-end; margin: 1px 4px 0 0; flex: none; font-size: 11.5px; font-weight: 500; color: #8e8e93; }
.tx-dots { display: flex; gap: 5px; padding: 13px 15px; }
.tx-dots i { width: 9px; height: 9px; border-radius: 50%; background: #8e8e93; animation: tx-dot 1s ease-in-out infinite; }
.tx-dots i:nth-child(2) { animation-delay: .15s; } .tx-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tx-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }
/* compose row */
.tx-inputrow { position: relative; flex: none; display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center; padding: 6px 12px 9px; background: #fff; }
.tx-plus { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #e9e9eb; color: #7c7c82; }
.tx-plus svg { width: 18px; height: 18px; }
.tx-field { height: 38px; padding: 0 44px 0 14px; display: flex; align-items: center; white-space: pre; overflow: hidden; border: 1px solid #c7c7cc; border-radius: 19px; background: #fff;
  font-size: 16.5px; font-weight: 400; transition: border-color .15s; }
.tx-field.has { border-color: #a9cdf5; }
.tx-field.wobble { animation: wobble .4s; }
.tx-typed { flex: none; color: #000; }
.tx-typed .bad { color: #ff3b30; text-decoration: underline wavy #ff3b30 2px; }
.tx-caret { flex: none; width: 2px; height: 21px; background: #0a84ff; border-radius: 1px; animation: caret 1s steps(1) infinite; }
.tx-ghost { flex: none; color: #b9b9c0; }
.tx-ghost.ph { color: #a1a1a8; }
.tx-send { position: absolute; right: 16px; top: 50%; width: 30px; height: 30px; margin-top: -16px; border-radius: 50%; display: grid; place-items: center; background: #c7c7cc;
  transition: background .15s, transform .15s; }
.tx-send svg { width: 18px; height: 18px; }
.tx-send.ready { background: #0a84ff; animation: tx-ready 1s ease-out infinite; }
@keyframes tx-ready { from { box-shadow: 0 0 0 0 rgba(10, 132, 255, .55); } to { box-shadow: 0 0 0 11px rgba(10, 132, 255, 0); } }
.tx-send.nudge { animation: punch .3s var(--ease-pop); }
/* keyboard */
.tx-kb { flex: none; padding: 8px 4px 30px; background: linear-gradient(180deg, #d6d8de, #cdd0d7); border-top: 1px solid rgba(0, 0, 0, .07); }
.tx-row { display: flex; gap: 6px; margin-bottom: 9px; padding: 0 3px; }
.tx-row:nth-child(3) { padding: 0 19px; }
.tx-key { position: relative; flex: 1 1 0; height: 41px; display: grid; place-items: center; border-radius: 6px; background: #fff; color: #000;
  box-shadow: 0 1px 0 #8a8b8f, 0 1.5px 1px rgba(0, 0, 0, .1); font-size: 21px; font-weight: 400; transition: background .2s; }
.tx-key.num { height: 31px; font-size: 15px; background: #f5f6f8; }
.tx-key.mod { flex: 1.35 1 0; background: #abb0bb; }
.tx-key svg { width: 22px; height: 18px; }
.tx-key.w12 { flex: 1.3 1 0; font-size: 14.5px; }
.tx-key.space { flex: 4.4 1 0; font-size: 14.5px; }
.tx-key.ret { background: #0a84ff; color: #fff; }
.tx-key.pop { background: #fff; transition: none; }
.tx-key.mod.pop, .tx-key.space.pop { background: #e2e4e9; }
.tx-key.mod.pop { background: #c6cad3; }
/* the pop-up balloon over a pressed letter */
.tx-key:not(.mod):not(.space).pop::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; bottom: 0; z-index: 6; background: #fff; border-radius: 0 0 6px 6px;
  box-shadow: 0 1px 0 #8a8b8f; animation: tx-keypop .28s forwards; }
.tx-key:not(.mod):not(.space).pop::after { content: attr(data-c); position: absolute; left: 50%; bottom: calc(100% + 12px); width: 56px; height: 58px; margin-left: -28px; z-index: 7;
  display: grid; place-items: center; background: #fff; border-radius: 12px; box-shadow: 0 -1px 0 rgba(0, 0, 0, .05), 0 8px 16px rgba(0, 0, 0, .26);
  font-size: 36px; font-weight: 400; color: #000; animation: tx-keypop .28s forwards; }
@keyframes tx-keypop { 0% { transform: translateY(6px); opacity: 0; } 20% { transform: none; opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
.tx-homebar { position: absolute; left: 50%; bottom: 9px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: #0b0b0d; }
/* rubber stamp: ink pressed onto the screen, worn and uneven */
.tx-stamp { position: absolute; left: 50%; top: 40%; z-index: 8; max-width: 380px; padding: 12px 24px 14px; border: 6px solid currentColor; border-radius: 10px;
  font-family: var(--font-display); font-size: 52px; line-height: 1; letter-spacing: .06em; text-align: center; white-space: normal; pointer-events: none;
  transform: translate(-50%, -50%) rotate(-13deg) scale(0); opacity: 0; mix-blend-mode: multiply;
  -webkit-mask-image: var(--tx-grunge); mask-image: var(--tx-grunge); -webkit-mask-size: 260px; mask-size: 260px; }
.tx-stamp::before { content: ""; position: absolute; inset: 5px; border: 2px solid currentColor; border-radius: 5px; }
.tx-stamp.show { animation: tx-stamp .45s cubic-bezier(.3, 1.6, .5, 1) forwards; }
.tx-stamp.bad { color: #d4141f; } .tx-stamp.good { color: #08865c; }
.tx-stamp.long { font-size: 40px; padding: 10px 20px 12px; }
@keyframes tx-stamp { from { transform: translate(-50%, -50%) rotate(-28deg) scale(2.6); opacity: 0; } to { transform: translate(-50%, -50%) rotate(-13deg) scale(1); opacity: .92; } }

/* the goal drops in as a notification when a chat opens */
.tx-notif { position: absolute; left: 10px; right: 10px; top: 52px; z-index: 7; padding: 11px 16px 13px 62px; border-radius: 22px; pointer-events: none;
  background: rgba(247, 247, 249, .98); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .12), 0 16px 32px rgba(0, 0, 0, .26);
  transform: translateY(-160%); opacity: 0; }
.tx-notif.show { animation: tx-notif 3.4s cubic-bezier(.2, .9, .3, 1.2) forwards; }
@keyframes tx-notif { 0% { transform: translateY(-160%); opacity: 0; } 9% { transform: none; opacity: 1; } 86% { transform: none; opacity: 1; } 100% { transform: translateY(-160%); opacity: 0; } }
.tx-nhead { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .06em; color: #6e6e73; }
.tx-nhead i { position: absolute; left: 14px; top: 14px; width: 38px; height: 38px; border-radius: 10px;
  background: radial-gradient(circle, #fff 0 2.6px, #e4323c 3.2px 6.6px, #fff 7.2px 10.6px, #e4323c 11.2px 14.6px, transparent 15.2px), linear-gradient(160deg, #ffe680, #ffb81a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(150, 80, 0, .25), 0 1px 2px rgba(0, 0, 0, .2); }
.tx-nhead small { margin-left: auto; font-size: 12px; font-weight: 400; letter-spacing: 0; }
.tx-notif b { display: block; margin-top: 2px; font-size: 15px; font-weight: 600; color: #000; }
.tx-notif span { display: block; font-size: 15px; line-height: 1.28; color: #1c1c1e; }

/* ---------------- hands ---------------- */
.tx-grip { position: absolute; top: 452px; width: 62px; height: 262px; }
.tx-grip.l { left: -44px; } .tx-grip.r { right: -44px; }
.tx-grip svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tx-thumb { position: absolute; left: 0; top: 0; width: 120px; height: 352px; z-index: 9; pointer-events: none; transform-origin: 60px 34px; will-change: transform;
  transition: transform .09s cubic-bezier(.2, .8, .3, 1); }
.tx-thumb-in { width: 100%; height: 100%; transform-origin: 60px 34px; }
.tx-thumb-in svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tx-thumb-in.press { animation: tx-press .15s ease-out; }
@keyframes tx-press { 40% { transform: translateY(6px) scale(.96, .94); } }

/* ---------------- drafts: a dark glass panel ---------------- */
.tx-right { position: absolute; right: 30px; top: 78px; width: 598px; bottom: 22px; display: flex; flex-direction: column; gap: 14px; padding: 22px 24px 18px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(42, 36, 70, .95), rgba(22, 18, 38, .96)); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(0, 0, 0, .35), 0 6px 12px rgba(var(--shadow-tint), .4), 0 30px 70px rgba(var(--shadow-tint), .55); }
.tx-rhead { display: flex; align-items: baseline; justify-content: space-between; }
.tx-rhead h3 { margin: 0; font-family: var(--font-display); font-size: 30px; letter-spacing: .05em; color: #fff3dc; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.tx-rhead small { font-size: 14px; font-weight: 500; color: rgba(255, 243, 220, .55); }
.tx-timer { display: grid; grid-template-columns: auto 1fr 64px; gap: 14px; align-items: center; font-size: 11.5px; font-weight: 800; letter-spacing: .16em; color: rgba(150, 215, 255, .9); }
.tx-timebar { height: 14px; border-radius: 7px; overflow: hidden; background: rgba(0, 0, 0, .38); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .55), 0 1px 0 rgba(255, 255, 255, .08); }
.tx-timebar i { display: block; height: 100%; width: 100%; border-radius: 7px; transition: width .1s linear;
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 50%), linear-gradient(90deg, #1688c4, #38c6ff 70%, #8ae0ff); }
.tx-timer b { font-family: var(--font-display); font-weight: 400; font-size: 22px; letter-spacing: .02em; text-align: right; color: #8ae0ff; }
.tx-timer.low, .tx-timer.low b { color: #ff7a6e; }
.tx-timer.idle { opacity: .35; }
.tx-timer.idle .tx-timebar i { width: 100% !important; filter: grayscale(.8); }
.tx-timer.low .tx-timebar i { background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 50%), linear-gradient(90deg, #b8141f, #ff4b3e); }
.tx-drafts { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.tx-drafts.wobble { animation: wobble .4s; }
.tx-draft { position: relative; min-height: 116px; padding: 18px 22px 28px 88px; border: 3px solid var(--ink); border-radius: 18px; color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f0f1f6); box-shadow: inset 0 -3px 0 rgba(23, 18, 31, .07), 0 3px 4px rgba(var(--shadow-tint), .35), 0 14px 26px rgba(var(--shadow-tint), .4);
  font-size: 24px; font-weight: 500; line-height: 1.32;
  transition: transform .15s var(--ease-out), opacity .15s, box-shadow .15s; animation: tx-draft-in .35s var(--ease-pop) both; }
.tx-draft:nth-child(2) { animation-delay: .05s; } .tx-draft:nth-child(3) { animation-delay: .1s; }
@keyframes tx-draft-in { from { transform: translateX(40px); opacity: 0; } }
.tx-draft.locked { background: linear-gradient(180deg, #f7fcff, #e4f3ff); transform: translateX(-6px);
  box-shadow: 0 0 0 4px #38c6ff, 0 0 30px rgba(56, 198, 255, .45), 0 14px 26px rgba(var(--shadow-tint), .45); }
.tx-draft.dim { opacity: .26; transform: scale(.97); }
/* the first-letter keycap: sculpted top, lit from the top-left, side wall in shadow */
.tx-dkey { position: absolute; left: 18px; top: 17px; width: 50px; height: 54px; display: grid; place-items: center; padding-bottom: 7px; border: 2.5px solid var(--ink); border-radius: 11px;
  background: radial-gradient(ellipse 72% 56% at 46% 36%, #f6ffb0 0%, #d7ff3c 56%, #c2ea22 100%);
  box-shadow: inset 0 -7px 0 #8fb800, inset 0 2px 0 rgba(255, 255, 255, .8), 0 3px 0 var(--ink), 0 7px 10px rgba(var(--shadow-tint), .35);
  font-family: var(--font-display); font-size: 28px; color: var(--ink); }
.tx-draft.locked .tx-dkey { transform: translateY(2px); background: radial-gradient(ellipse 72% 56% at 46% 36%, #d4f4ff 0%, #38c6ff 56%, #23aee8 100%);
  box-shadow: inset 0 -5px 0 #1478b8, inset 0 2px 0 rgba(255, 255, 255, .8), 0 1px 0 var(--ink), 0 3px 6px rgba(var(--shadow-tint), .35); }
.tx-dtext b { color: #c81e5b; text-decoration: underline 3px; text-underline-offset: 4px; }
.tx-dtext.tline { --ok-c: #0d9a6c; --bad-c: #d4141f; --caret-c: #ff3d7f; }
.tx-dtext .ch.ok { text-shadow: none; }
.tx-dlen { position: absolute; right: 16px; bottom: 7px; font-size: 11.5px; font-weight: 600; color: #9a93a8; }
.tx-dwait { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; font-family: var(--font-display); font-size: 26px; letter-spacing: .02em; color: rgba(255, 243, 220, .78); }
.tx-dots-lg { position: relative; display: flex; gap: 9px; padding: 16px 22px; border-radius: 26px; background: #e9e9eb; box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }
.tx-dots-lg::before, .tx-dots-lg::after { content: ""; position: absolute; border-radius: 50%; background: #e9e9eb; }
.tx-dots-lg::before { left: -2px; bottom: -2px; width: 15px; height: 15px; }
.tx-dots-lg::after { left: -10px; bottom: -10px; width: 7px; height: 7px; }
.tx-dots-lg i { width: 14px; height: 14px; border-radius: 50%; background: #8e8e93; animation: tx-dot 1s ease-in-out infinite; }
.tx-dots-lg i:nth-child(2) { animation-delay: .15s; } .tx-dots-lg i:nth-child(3) { animation-delay: .3s; }
.tx-keys { font-size: 14px; font-weight: 500; color: rgba(255, 243, 220, .6); text-align: center; }
.tx-dhint { display: none; }
