/* ---------- special messages (looks.js) ----------
   Each look sets --c ("r, g, b") from its colour; the light of the text is
   that colour mixed with white. An arrival plays on .fresh, a loop only on
   .live (the message is on screen); with energy saving or reduced motion
   nothing moves and the running line stands still, its text wrapped. */

.lk { --c: 159, 232, 112; --lit: color-mix(in srgb, rgb(var(--c)) 62%, #fff); position: relative; font-family: var(--mono); color: var(--lit); }
.lk .pemo { filter: drop-shadow(0 0 4px rgba(var(--c), .55)); }

/* In the chat: the look is the card (no frame of its own, no tail), the
   time sits under it as a pill, like a sticker's. */
.mcard.lookcard { flex: 1; max-width: 100%; padding: 0; background: none; border-color: transparent; box-shadow: none; }
.mrow:not(.mine) .mcard.lookcard.first::before { display: none; }
.mcard.lookcard > .mname { padding: 0 4px 5px; }
.mcard.lookcard > .mquote { margin: 0 0 6px; }
.mcard.lookcard .mfoot { margin-top: 5px; }
.mrow:not(.mine) .mcard.lookcard .mfoot { justify-content: flex-start; }
.mcard.lookcard .mmeta { margin: 0; padding: 1px 7px; border-radius: 9px; background: rgba(9, 15, 10, .85); box-shadow: 0 0 0 1px var(--gb); }
.mcard.lookcard .mreacts { margin-top: 5px; }
.mrow.mine .mcard.lookcard .lk-pager, .mrow.mine .mcard.lookcard .lk-neon { margin-left: auto; }

/* ---- banner: a glowing announcement card ---- */
.lk-banner { padding: 11px 16px 14px; border-radius: 14px; overflow: hidden; text-align: center;
  border: 1.5px solid rgba(var(--c), .72);
  background:
    repeating-linear-gradient(0deg, rgba(var(--c), .045) 0 1px, transparent 1px 4px),
    radial-gradient(120% 95% at 0% 0%, rgba(var(--c), .24), transparent 62%),
    radial-gradient(90% 80% at 100% 100%, rgba(var(--c), .12), transparent 70%),
    linear-gradient(160deg, #0d170e, #070c08);
  box-shadow: 0 0 26px -9px rgba(var(--c), .75), inset 0 0 22px -8px rgba(var(--c), .4); }
/* Corner marks, like the chat's frame. */
.lk-banner::before { content: ""; position: absolute; inset: 5px; border-radius: 10px; pointer-events: none; --k: rgba(var(--c), .9);
  background:
    linear-gradient(var(--k), var(--k)) 0 0 / 12px 1.5px no-repeat, linear-gradient(var(--k), var(--k)) 0 0 / 1.5px 12px no-repeat,
    linear-gradient(var(--k), var(--k)) 100% 0 / 12px 1.5px no-repeat, linear-gradient(var(--k), var(--k)) 100% 0 / 1.5px 12px no-repeat,
    linear-gradient(var(--k), var(--k)) 0 100% / 12px 1.5px no-repeat, linear-gradient(var(--k), var(--k)) 0 100% / 1.5px 12px no-repeat,
    linear-gradient(var(--k), var(--k)) 100% 100% / 12px 1.5px no-repeat, linear-gradient(var(--k), var(--k)) 100% 100% / 1.5px 12px no-repeat; }
.lkb-label { display: flex; align-items: center; justify-content: center; gap: 9px; font: 600 10px/1 var(--mono); letter-spacing: .32em; color: rgba(var(--c), .85); }
.lkb-label i { font-style: normal; font-size: 8px; letter-spacing: 0; }
.lkb-title { margin-top: 9px; font: 700 21px/1.22 var(--mono); letter-spacing: .02em; white-space: pre-wrap; overflow-wrap: anywhere;
  text-shadow: 0 0 10px rgba(var(--c), .8), 0 0 26px rgba(var(--c), .4); }
.lkb-title.long { font-size: 17px; }
.lkb-body { margin-top: 7px; font: 400 14px/1.45 var(--mono); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; opacity: .92; }
.lkb-sweep { position: absolute; top: -20%; bottom: -20%; left: -45%; width: 32%; pointer-events: none; transform: translateX(-60%) skewX(-14deg);
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .1) 42%, rgba(var(--c), .28) 50%, rgba(255, 255, 255, .1) 58%, transparent); }
.lk-banner.live .lkb-sweep { animation: lkbsweep 8s ease-in-out infinite; }
@keyframes lkbsweep { 0%, 72% { transform: translateX(-60%) skewX(-14deg); } 100% { transform: translateX(560%) skewX(-14deg); } }
.lk-banner.fresh { animation: lkbunfold .6s cubic-bezier(.2, .8, .3, 1) both; }
.lk-banner.fresh .lkb-title { animation: lkbon .9s steps(1) both; }
@keyframes lkbunfold { from { clip-path: inset(0 50% 0 50% round 14px); filter: brightness(2.2); } 60% { filter: brightness(1.4); } to { clip-path: inset(0 0 0 0 round 14px); filter: none; } }
@keyframes lkbon { 0% { opacity: 0; } 30% { opacity: 1; } 38% { opacity: .3; } 46%, 100% { opacity: 1; } }

/* ---- running line: an LED strip ---- */
.lk-ticker .lkt-win { height: 50px; display: flex; align-items: center; overflow: hidden; border-radius: 11px;
  border: 1px solid rgba(var(--c), .38);
  background: radial-gradient(rgba(var(--c), .085) 1px, transparent 1.5px) 0 0 / 4px 4px, linear-gradient(#060a07, #030504);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, .8), 0 0 18px -8px rgba(var(--c), .6);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.lkt-track { display: inline-flex; flex: none; white-space: nowrap; animation: lktrun 20s linear infinite; animation-play-state: paused; will-change: transform; }
.lk-ticker.live .lkt-track { animation-play-state: running; }
@keyframes lktrun { to { transform: translateX(-50%); } }
.lkt-txt { display: inline-flex; align-items: center; gap: 14px; padding-right: 64px; font: 700 23px/1 var(--mono); letter-spacing: .07em;
  text-shadow: 0 0 6px rgba(var(--c), .9), 0 0 18px rgba(var(--c), .45);
  -webkit-mask-image: radial-gradient(circle, #000 58%, rgba(0, 0, 0, .5) 74%); mask-image: radial-gradient(circle, #000 58%, rgba(0, 0, 0, .5) 74%);
  -webkit-mask-size: 3px 3px; mask-size: 3px 3px; }
.lkt-txt .pemo { width: 1.1em; height: 1.1em; }
.lkt-mark { font-style: normal; font-size: 11px; }
.lk-ticker.fresh .lkt-win { animation: lktfresh .8s ease-out both; }
@keyframes lktfresh { 0% { filter: brightness(2.4); box-shadow: inset 0 0 26px rgba(var(--c), .5), 0 0 26px rgba(var(--c), .8); } 100% { filter: none; } }
/* Still: the whole text, wrapped, in the middle of the strip. */
:is(:root.eco) .lk-ticker .lkt-win { height: auto; min-height: 50px; padding: 10px 14px; justify-content: center; -webkit-mask-image: none; mask-image: none; }
:is(:root.eco) .lk-ticker .lkt-track { flex: 1 1 auto; min-width: 0; animation: none; white-space: normal; display: block; text-align: center; transform: none; }
:is(:root.eco) .lk-ticker .lkt-txt { padding: 0; font-size: 18px; line-height: 1.3; display: inline; }
:is(:root.eco) .lk-ticker .lkt-txt + .lkt-txt, :is(:root.eco) .lk-ticker .lkt-mark { display: none; }
@media (prefers-reduced-motion: reduce) {
  .lk-ticker .lkt-win { height: auto; min-height: 50px; padding: 10px 14px; justify-content: center; -webkit-mask-image: none; mask-image: none; }
  .lk-ticker .lkt-track { flex: 1 1 auto; min-width: 0; animation: none; white-space: normal; display: block; text-align: center; transform: none; }
  .lk-ticker .lkt-txt { padding: 0; font-size: 18px; line-height: 1.3; display: inline; }
  .lk-ticker .lkt-txt + .lkt-txt, .lk-ticker .lkt-mark { display: none; }
}

/* ---- pager: a pager with an LCD ---- */
.lk-pager { width: min(100%, 300px); padding: 8px 12px 10px; border-radius: 22px 22px 18px 18px;
  background: linear-gradient(160deg, #272d2a, #141816 55%, #0d100e); border: 1px solid #323a36;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 -3px 8px rgba(0, 0, 0, .55), 0 12px 26px -16px #000, 0 0 20px -12px rgba(var(--c), .6); }
.lkp-top { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 6px; }
.lkp-brand { font: 700 9px/1 var(--font); letter-spacing: .3em; color: #6d7672; }
.lkp-led { width: 7px; height: 7px; border-radius: 50%; background: #3a1512; box-shadow: inset 0 0 2px #000; }
.lk-pager.fresh:not(.done) .lkp-led { background: #ff5a4f; box-shadow: 0 0 8px #ff5a4f; animation: lkpled .5s steps(1) infinite; }
@keyframes lkpled { 50% { background: #3a1512; box-shadow: none; } }
.lkp-lcd { position: relative; padding: 7px 10px 10px; border-radius: 10px; overflow: hidden;
  background: radial-gradient(130% 120% at 30% 0%, rgba(var(--c), .26), rgba(var(--c), .08) 70%), #070b08;
  border: 1px solid rgba(0, 0, 0, .7); box-shadow: inset 0 0 0 1px rgba(var(--c), .22), inset 0 3px 12px rgba(0, 0, 0, .7); }
/* The pixels of the LCD. */
.lkp-lcd::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .2) 1px, transparent 1px) 0 0 / 3px 3px, linear-gradient(rgba(0, 0, 0, .2) 1px, transparent 1px) 0 0 / 3px 3px; }
.lkp-head { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 5px; margin-bottom: 6px; border-bottom: 1px dashed rgba(var(--c), .3);
  font: 600 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: rgba(var(--c), .8); white-space: nowrap; overflow: hidden; }
.lkp-text { min-height: 2.7em; font: 600 15px/1.35 var(--mono); letter-spacing: .04em; text-transform: uppercase; white-space: pre-wrap; overflow-wrap: anywhere;
  text-shadow: 0 0 6px rgba(var(--c), .8); }
.lkp-typed { -webkit-mask-image: radial-gradient(circle, #000 60%, rgba(0, 0, 0, .55) 76%); mask-image: radial-gradient(circle, #000 60%, rgba(0, 0, 0, .55) 76%);
  -webkit-mask-size: 2.5px 2.5px; mask-size: 2.5px 2.5px; }
.lkp-cur, .lkg-cur { display: inline-block; width: .55em; height: 1.05em; vertical-align: -.15em; margin-left: 2px; background: rgb(var(--c)); box-shadow: 0 0 8px rgba(var(--c), .8); }
.lk.live .lkp-cur, .lk.live .lkg-cur { animation: bncur 1s steps(1) infinite; }
.lkp-keys { display: flex; justify-content: center; gap: 12px; padding-top: 9px; }
.lkp-keys i { width: 30px; height: 8px; border-radius: 5px; background: linear-gradient(#323a36, #171b19); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 1px 2px #000; }
.lk-pager.fresh { animation: lkpbuzz .55s ease-in-out 2; }
@keyframes lkpbuzz { 0%, 100% { transform: none; } 10%, 50%, 90% { transform: translateX(-2px) rotate(-.6deg); } 30%, 70% { transform: translateX(2px) rotate(.6deg); } }

/* ---- board: a departures board of split flaps ---- */
.lk-board { padding: 8px 9px 10px; border-radius: 12px; background: linear-gradient(#111613, #0a0d0b); border: 1px solid #222a25;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 20px -12px rgba(var(--c), .6); }
.lkd-head { display: flex; justify-content: space-between; padding: 0 2px 7px; font: 600 9.5px/1 var(--mono); letter-spacing: .22em; color: rgba(var(--c), .7); }
.lkd-grid { display: grid; gap: 4px; container-type: inline-size; }
.lkd-row { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 2px; }
.lk-board .fl { position: relative; aspect-ratio: .74; display: grid; place-items: center; border-radius: 3px; overflow: hidden;
  background: linear-gradient(#18221a 50%, #101811 50%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
  font: 700 calc(100cqw / var(--cols) * .62)/1 var(--mono); color: var(--lit); text-shadow: 0 0 7px rgba(var(--c), .75); }
.lk-board .fl::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .75); }
.lk-board .fl .pemo { width: 70%; height: auto; margin: 0; vertical-align: 0; }
.lk-board .fl.flip { animation: lkflip .12s ease-in; }
.lk-board .fl.flop { animation: lkflop .12s ease-in; }
@keyframes lkflip { 50% { transform: scaleY(.12); filter: brightness(1.7); } }
@keyframes lkflop { 50% { transform: scaleY(.12); filter: brightness(1.7); } }

/* ---- neon: a sign on a dark wall ---- */
.lk-neon { width: fit-content; max-width: 100%; }
.lkn-wall { padding: 20px 18px; border-radius: 14px; text-align: center; overflow: hidden;
  background: radial-gradient(80% 110% at 50% 50%, rgba(var(--c), .13), transparent 72%),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(255, 255, 255, .018) 22px 24px), #070908;
  border: 1px solid #1a201c; }
.lkn-sign { display: inline-block; padding: 7px 16px 8px; border-radius: 14px; border: 2px solid color-mix(in srgb, rgb(var(--c)) 55%, #fff);
  font: 700 19px/1.2 var(--mono); letter-spacing: .05em; color: color-mix(in srgb, rgb(var(--c)) 32%, #fff); white-space: pre-wrap; overflow-wrap: anywhere;
  text-shadow: 0 0 2px #fff, 0 0 7px rgb(var(--c)), 0 0 16px rgba(var(--c), .9), 0 0 32px rgba(var(--c), .7), 0 0 56px rgba(var(--c), .45);
  box-shadow: 0 0 7px rgba(var(--c), .9), 0 0 20px rgba(var(--c), .55), inset 0 0 10px rgba(var(--c), .55); }
.lkn-sign.l { font-size: 25px; }
.lkn-sign.xl { font-size: 33px; padding: 8px 20px 10px; }
.lk-neon.fresh .lkn-sign { animation: lknon 1.5s linear both; }
.lk-neon.live:not(.fresh) .lkn-sign, .lk-neon.live.done .lkn-sign { animation: lknhum 9s linear infinite; }
@keyframes lknon { 0% { opacity: .08; } 8% { opacity: 1; } 11% { opacity: .15; } 19% { opacity: 1; } 23% { opacity: .35; } 31%, 100% { opacity: 1; } }
@keyframes lknhum { 0%, 93% { opacity: 1; } 94% { opacity: .6; } 95% { opacity: 1; } 97% { opacity: .75; } 98%, 100% { opacity: 1; } }

/* ---- radiogram: a form on perforated tape ---- */
.lkg-form { position: relative; padding: 10px 24px 11px; border-radius: 4px;
  background:
    radial-gradient(circle at 7px 50%, #040605 2.6px, transparent 3.2px) 0 0 / 14px 14px repeat-y,
    radial-gradient(circle at calc(100% - 7px) 50%, #040605 2.6px, transparent 3.2px) 100% 0 / 14px 14px repeat-y,
    linear-gradient(#141a15, #0e130f);
  border-top: 1px dashed rgba(var(--c), .4); border-bottom: 1px dashed rgba(var(--c), .4);
  box-shadow: 0 0 22px -12px rgba(var(--c), .7); }
.lkg-head { display: flex; justify-content: space-between; gap: 10px; font: 600 10px/1.3 var(--mono); letter-spacing: .14em; color: rgba(var(--c), .85); }
.lkg-from { margin-top: 4px; padding-bottom: 7px; border-bottom: 1px solid rgba(var(--c), .2); font: 500 10.5px/1.3 var(--mono); letter-spacing: .1em; color: rgba(var(--c), .65); }
.lkg-text { margin-top: 8px; min-height: 1.5em; font: 600 15px/1.5 var(--mono); letter-spacing: .05em; white-space: pre-wrap; overflow-wrap: anywhere;
  text-shadow: 0 0 6px rgba(var(--c), .6); }
.lkg-end { margin-top: 8px; text-align: center; font: 600 10px/1 var(--mono); letter-spacing: .3em; color: rgba(var(--c), .7); }
.lk-gram:not(.done) .lkg-end { visibility: hidden; }

/* ---------- making one: the emoji panel's «Special» tab ---------- */
.eplooks { grid-template-columns: repeat(2, 1fr) !important; }
.lktile { display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 8px; border-radius: 12px; text-align: left;
  background: rgba(159, 232, 112, .035); border: 1px solid rgba(159, 232, 112, .12); transition: transform .1s; }
.lktile:active { transform: scale(.96); }
.lkgroup { grid-column: 1 / -1; padding: 8px 2px 0; font: 600 11px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.lkgroup:first-child { padding-top: 0; }
.lktile-stage { position: relative; display: block; height: 76px; overflow: hidden; border-radius: 8px; pointer-events: none; }
.lktile-stage > .lk { position: absolute; left: 0; top: 50%; width: 250%; transform: translateY(-50%) scale(.4); transform-origin: 0 50%; }
.lktile-name { display: flex; align-items: center; gap: 6px; padding: 0 2px; font: 600 12.5px/1.2 var(--font); color: var(--text); }
.lktile-name .icon { color: var(--accent); flex: none; }

/* ---------- making one: the composer sheet ---------- */
.lkcompose { display: flex; flex-direction: column; gap: 12px; }
.lkchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.lkchips::-webkit-scrollbar { display: none; }
.lkchip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font: 500 13px var(--font); }
.lkchip .icon { color: var(--text-3); }
.lkchip.on { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.lkchip.on .icon { color: var(--accent); }
.lkchipsep { flex: none; align-self: center; padding: 0 2px 0 6px; font: 600 10px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.lkchipsep:first-child { padding-left: 0; }
.lkstage { position: relative; min-height: 96px; display: flex; flex-direction: column; justify-content: center; padding: 14px 12px; border-radius: 14px;
  background: linear-gradient(rgba(159, 232, 112, .045) 1px, transparent 1px) 50% 0 / 24px 24px, linear-gradient(90deg, rgba(159, 232, 112, .045) 1px, transparent 1px) 50% 0 / 24px 24px, #050806;
  border: 1px solid var(--line); overflow: hidden; }
.lkstage.sample > .lk { opacity: .6; }
.lkstage > .lk-pager, .lkstage > .lk-neon { align-self: center; }
.lkreplay { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(5, 10, 6, .8); color: var(--accent); box-shadow: 0 0 0 1px var(--accent-line, rgba(159, 232, 112, .3)); }
.lkhint { font-size: 12.5px; line-height: 1.4; color: var(--text-3); margin-top: -4px; }
.lkfield { position: relative; display: block; }
.lkinput { min-height: 76px; padding-bottom: 22px; font-family: var(--mono); resize: none; }
.lkcount { position: absolute; right: 12px; bottom: 7px; font: 11px var(--mono); color: var(--text-3); pointer-events: none; }
.lkcount.over { color: var(--danger); }
.lkcolors { display: flex; align-items: center; gap: 10px; }
.lklabel { font-size: 13px; color: var(--text-2); margin-right: auto; }
.lkdot { width: 28px; height: 28px; border-radius: 50%; background: rgb(var(--c)); box-shadow: 0 0 10px -2px rgba(var(--c), .8), inset 0 0 0 2px rgba(0, 0, 0, .35); }
.lkdot.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgb(var(--c)), 0 0 14px rgba(var(--c), .8); }

@media (prefers-reduced-motion: reduce) { .lk, .lk * { animation: none !important; } }

/* ---- oscilloscope: a beam writes on a phosphor screen ---- */
.lk-scope { padding: 8px; border-radius: 16px; background: linear-gradient(160deg, #2a2f2c, #121513); border: 1px solid #333b36;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 24px -16px #000, 0 0 20px -12px rgba(var(--c), .6); }
.lks-screen { position: relative; overflow: hidden; padding: 8px 12px 0; border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(var(--c), .22) 0 3px, transparent 3px 7px) 0 50% / 100% 1px no-repeat,
    repeating-linear-gradient(0deg, rgba(var(--c), .22) 0 3px, transparent 3px 7px) 50% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(var(--c), .09) 1px, transparent 1px) 0 0 / 100% 20%,
    linear-gradient(90deg, rgba(var(--c), .09) 1px, transparent 1px) 0 0 / 10% 100%,
    radial-gradient(120% 100% at 50% 50%, rgba(var(--c), .12), transparent 70%), #040805;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .85), inset 0 0 0 1px rgba(var(--c), .18); }
/* The dark round the edges of a tube. */
.lks-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(140% 120% at 50% 50%, transparent 55%, rgba(0, 0, 0, .55)); }
.lks-head { display: flex; justify-content: space-between; gap: 10px; font: 600 9.5px/1 var(--mono); letter-spacing: .12em; color: rgba(var(--c), .6); }
.lks-text { position: relative; z-index: 1; min-height: 2.8em; padding: 8px 2px 2px; font: 600 16px/1.4 var(--mono); letter-spacing: .04em;
  white-space: pre-wrap; overflow-wrap: anywhere; text-shadow: 0 0 6px rgba(var(--c), .85), 0 0 16px rgba(var(--c), .4); }
/* A letter just written flares white and cools to the colour of the phosphor. */
.lk-scope .ph { animation: lksph 1.9s ease-out both; }
@keyframes lksph { 0% { color: #fff; text-shadow: 0 0 4px #fff, 0 0 12px rgb(var(--c)), 0 0 26px rgba(var(--c), .8); } 100% { color: var(--lit); } }
.lks-beam { display: inline-block; width: 7px; height: 7px; margin-left: 3px; vertical-align: .1em; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px 2px rgb(var(--c)), 0 0 16px 6px rgba(var(--c), .55); transition: opacity .9s; }
.lk-scope.done .lks-beam { opacity: 0; }
.lks-trace { position: relative; height: 34px; margin: 4px -12px 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.lks-trace svg { display: block; width: 200%; height: 100%; will-change: transform; }
.lks-trace path { fill: none; stroke: rgb(var(--c)); vector-effect: non-scaling-stroke; }
.lks-trace path.glow { stroke-width: 5; opacity: .18; }
.lks-trace path.line { stroke-width: 1.4; opacity: .9; }
.lk-scope.live .lks-trace svg { animation: lkstrace 9s linear infinite; }
@keyframes lkstrace { to { transform: translateX(-50%); } }

/* ---- night light: a warm lamp that slowly breathes ---- */
.lk-lamp { width: min(100%, 320px); padding: 22px 18px 18px; border-radius: 20px; text-align: center; overflow: hidden;
  background: radial-gradient(110% 85% at 50% 16%, rgba(var(--c), .2), rgba(var(--c), .06) 48%, transparent 72%), linear-gradient(#0d0b08, #080706);
  border: 1px solid rgba(var(--c), .2); box-shadow: 0 0 30px -14px rgba(var(--c), .7); }
.mrow.mine .mcard.lookcard .lk-lamp { margin-left: auto; }
.lkl-light { position: relative; width: 50px; height: 50px; margin: 0 auto 16px; }
.lkl-orb { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fffaf0, color-mix(in srgb, rgb(var(--c)) 55%, #fff) 30%, rgb(var(--c)) 64%, rgba(var(--c), .8));
  box-shadow: 0 0 18px 4px rgba(var(--c), .5), 0 0 46px 14px rgba(var(--c), .2); }
.lkl-halo { position: absolute; inset: -44px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--c), .26), rgba(var(--c), .07) 45%, transparent 70%); }
.lkl-text { font: 500 16.5px/1.5 var(--font); color: color-mix(in srgb, rgb(var(--c)) 22%, #fff6ea); text-shadow: 0 0 14px rgba(var(--c), .35);
  white-space: pre-wrap; overflow-wrap: anywhere; }
/* Breathing: one breath every 7 s, the light swells a little and settles. */
.lk-lamp.live:not(.fresh) .lkl-orb { animation: lklorb 7s ease-in-out infinite; }
.lk-lamp.live:not(.fresh) .lkl-halo { animation: lklhalo 7s ease-in-out infinite; }
@keyframes lklorb { 0%, 100% { transform: scale(.97); filter: brightness(.94); } 50% { transform: scale(1.03); filter: brightness(1.08); } }
@keyframes lklhalo { 0%, 100% { opacity: .72; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
/* Coming on: the lamp warms up from dark, then the words appear. */
.lk-lamp.fresh .lkl-orb { animation: lklon 2.2s ease-out both; }
.lk-lamp.fresh .lkl-halo { animation: lklhon 2.4s ease-out both; }
.lk-lamp.fresh .lkl-text { animation: lklton 1.6s .7s ease-out both; }
@keyframes lklon { 0% { filter: brightness(.2) saturate(.5); } 100% { filter: none; } }
@keyframes lklhon { 0% { opacity: 0; transform: scale(.55); } 100% { opacity: .72; transform: scale(.94); } }
@keyframes lklton { 0% { opacity: 0; filter: blur(3px); } 100% { opacity: 1; filter: none; } }

/* ---- scratch card: words under a foil of static ---- */
.lk-scratch { padding: 9px 12px 12px; border-radius: 14px; border: 1.5px dashed rgba(var(--c), .7);
  background: radial-gradient(120% 90% at 0% 0%, rgba(var(--c), .16), transparent 60%), linear-gradient(160deg, #13170f, #0a0d0a);
  box-shadow: 0 0 22px -12px rgba(var(--c), .7); }
.lkc-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; font: 600 10px/1.2 var(--mono); letter-spacing: .14em; }
.lkc-title { color: var(--lit); white-space: nowrap; }
.lkc-hint { flex: 1; color: rgba(var(--c), .7); letter-spacing: .06em; text-transform: lowercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lkc-open { flex: none; padding: 3px 9px; border-radius: 9px; border: 1px solid rgba(var(--c), .45); color: var(--lit); font: 600 10.5px/1.2 var(--mono); letter-spacing: .06em; }
.lk-scratch.open .lkc-open, .lk-scratch.open .lkc-hint { display: none; }
.lkc-field { position: relative; min-height: 64px; display: grid; place-items: center; border-radius: 10px; overflow: hidden;
  background: repeating-linear-gradient(45deg, rgba(var(--c), .05) 0 6px, transparent 6px 12px), #0b0f0c; }
.lkc-text { padding: 12px 14px; text-align: center; font: 700 19px/1.3 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
  text-shadow: 0 0 10px rgba(var(--c), .6); }
.lkc-foil { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .7s ease, filter .7s ease; }
.lkc-foil:active { cursor: grabbing; }
/* The sender sees the words through the foil; the receiver rubs it off. */
.lk-scratch.own .lkc-foil { opacity: .5; }
.lk-scratch.open .lkc-foil { opacity: 0; filter: blur(4px); pointer-events: none; }
.lk-scratch.open .lkc-text { animation: lkcopen .9s ease-out; }
@keyframes lkcopen { 0% { filter: brightness(1.8); text-shadow: 0 0 22px rgb(var(--c)); } 100% { filter: none; } }

/* ---- Morse: a lamp, the dots and dashes, the letters under them ---- */
.lk-morse { padding: 10px 12px 12px; border-radius: 14px; border: 1px solid rgba(var(--c), .35);
  background: linear-gradient(rgba(var(--c), .05) 1px, transparent 1px) 0 0 / 100% 12px, linear-gradient(160deg, #111410, #090b09);
  box-shadow: 0 0 22px -12px rgba(var(--c), .6); }
.lkm-head { display: flex; align-items: center; gap: 9px; padding-bottom: 9px; font: 600 10px/1 var(--mono); letter-spacing: .16em; color: rgba(var(--c), .8); }
.lkm-title { flex: 1; }
.lkm-lamp { width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(var(--c), .35), rgba(var(--c), .12) 70%);
  box-shadow: inset 0 0 0 1px rgba(var(--c), .3); transition: background .05s, box-shadow .05s; }
.lkm-lamp.on { background: radial-gradient(circle at 40% 35%, #fff, rgb(var(--c)) 55%); box-shadow: 0 0 10px 3px rgba(var(--c), .7), 0 0 26px 8px rgba(var(--c), .3); }
.lkm-play { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--lit); box-shadow: inset 0 0 0 1px rgba(var(--c), .45); }
.lkm-code { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 11px; min-height: 18px; }
.lkm-g { display: inline-flex; align-items: center; gap: 4px; }
.lkm-g i { display: block; height: 6px; border-radius: 3px; background: rgba(var(--c), .16); transition: background .06s, box-shadow .06s; }
.lkm-g i.d { width: 6px; }
.lkm-g i.s { width: 18px; }
.lkm-g i.past { background: rgba(var(--c), .62); }
.lkm-g i.on { background: #fff; box-shadow: 0 0 6px 1px rgb(var(--c)), 0 0 14px 3px rgba(var(--c), .5); }
.lkm-w { font: 600 11px/1 var(--mono); color: rgba(var(--c), .35); }
.lkm-text { margin-top: 10px; font: 700 18px/1.35 var(--mono); letter-spacing: .18em; white-space: pre-wrap; overflow-wrap: anywhere; text-shadow: 0 0 8px rgba(var(--c), .55); }
.lkm-ch { display: inline-block; transition: opacity .25s, filter .25s; }
.lkm-ch.wait { opacity: .08; filter: blur(2px); }

/* ---- decoding: running symbols crack into the text ---- */
.lk-decode { padding: 9px 12px 12px; border-radius: 12px; border: 1px solid rgba(var(--c), .45);
  background: repeating-linear-gradient(0deg, rgba(var(--c), .05) 0 1px, transparent 1px 3px), linear-gradient(#071008, #040805);
  box-shadow: 0 0 20px -10px rgba(var(--c), .8), inset 0 0 18px -10px rgba(var(--c), .5); }
.lkx-head { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .14em; color: rgba(var(--c), .7); margin-bottom: 6px; }
.lkx-ok { margin-left: auto; color: rgba(var(--c), .45); transition: color .3s, text-shadow .3s; }
.lk-decode .lkx-text.solved ~ .lkx-head .lkx-ok, .lk-decode:has(.lkx-text.solved) .lkx-ok { color: var(--lit); text-shadow: 0 0 8px rgba(var(--c), .8); }
.lkx-again { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--lit); border: 1px solid rgba(var(--c), .4); font-size: 12px; }
.lkx-text { font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--lit); text-shadow: 0 0 6px rgba(var(--c), .6); }
.lkx-c { color: rgba(var(--c), .55); text-shadow: none; }
.lkx-c.ok { color: var(--lit); text-shadow: 0 0 8px rgba(var(--c), .9); }

/* ---- the time capsule: sealed, a countdown; open, it glows ---- */
.lk-capsule { padding: 10px 13px 12px; border-radius: 16px; border: 1.5px solid rgba(var(--c), .55);
  background: radial-gradient(120% 90% at 100% 0%, rgba(var(--c), .2), transparent 60%), linear-gradient(160deg, #120d1c, #07060c);
  box-shadow: 0 0 24px -10px rgba(var(--c), .8), inset 0 0 0 1px rgba(255, 255, 255, .03); }
.lkq-head, .lkgeo-head { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .12em; color: var(--lit); }
.lkq-count { margin-left: auto; font-size: 12px; letter-spacing: .04em; padding: 2px 8px; border-radius: 9px; background: rgba(var(--c), .14); color: var(--lit); font-variant-numeric: tabular-nums; }
.lkq-when, .lkgeo-hint { font-size: 11px; color: rgba(255, 255, 255, .5); margin: 3px 0 8px; font-family: var(--font); }
.lkq-text, .lkgeo-text { font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.lkq-seal, .lkgeo-seal { letter-spacing: .05em; color: rgba(var(--c), .35); filter: blur(.4px); user-select: none; }
.lk-capsule.own .lkq-text, .lk-geo.own .lkgeo-text { opacity: .7; }
.lk-capsule.open { box-shadow: 0 0 30px -8px rgba(var(--c), .95), inset 0 0 22px -10px rgba(var(--c), .6); }
.lk-capsule.open .lkq-count { background: rgba(var(--c), .3); }

/* ---- the geo capsule: «find me», how far and which way ---- */
.lk-geo { padding: 10px 13px 12px; border-radius: 16px; border: 1.5px solid rgba(var(--c), .55);
  background:
    linear-gradient(rgba(var(--c), .06) 1px, transparent 1px) 0 0 / 14px 14px,
    linear-gradient(90deg, rgba(var(--c), .06) 1px, transparent 1px) 0 0 / 14px 14px,
    linear-gradient(160deg, #08141c, #05090c);
  box-shadow: 0 0 24px -10px rgba(var(--c), .8); }
.lkgeo-locate { margin-left: auto; height: 24px; padding: 0 10px; border-radius: 12px; border: 1px solid rgba(var(--c), .5); color: var(--lit); font: 600 11px var(--font); letter-spacing: 0; }
.lkgeo-locate.loading { opacity: .5; }
.lkgeo-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--lit); }
.lkgeo-arrow { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(var(--c), .14); color: var(--lit); transition: transform .5s var(--ease); opacity: .4; }
.lk-geo.located .lkgeo-arrow { opacity: 1; box-shadow: 0 0 10px -2px rgba(var(--c), .8); }
.lk-geo.open { box-shadow: 0 0 30px -8px rgba(var(--c), .95); }
.lk-geo.open .lkgeo-arrow { opacity: 1; transform: none; }

/* The composer's day and hour, place and radius. */
.lkextra { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 10px; }
.lkextra .lkwhen { flex: 1; height: 38px; }
.lkextra > .lklabel { font-size: 12px; color: var(--text-3); }
.lkhere { gap: 10px; align-items: center; }
.lkplace { font: 12px var(--mono); color: var(--text-2); }
.lkradii { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
