/* 12c. A finger, calmly: what a held finger lifts, and the Undo pill (app/js/touch.js). */
/* Held: the card rises under the finger before it can be carried. */
.obj.lift, .ti.lift { scale: 1.04; filter: drop-shadow(0 10px 14px rgba(22, 27, 29, .16)); transition: scale 140ms ease-out, filter 140ms ease-out; }
/* Held on empty space: a ring opens where the finger rests; drag now and a shape is drawn from here. */
#tlift {
  position: fixed; z-index: 30; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--ink) 55%, transparent); pointer-events: none;
}
#tlift.on { animation: tlift 220ms ease-out both; }
@keyframes tlift { from { scale: .4; opacity: 0; } to { scale: 1; opacity: 1; } }
/* The Undo pill: along the bottom, above the keyboard; above the rail or the shapes strip when they show (set from
   script). */
#tundo {
  position: fixed; z-index: 40; left: 50%; translate: -50% 0; bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--kb, 0px)) + 14px);
  display: flex; align-items: center; gap: 4px; max-width: calc(100% - 32px); padding: 4px 4px 4px 14px; border-radius: 10px;
  background: var(--ink); color: var(--canvas); box-shadow: var(--raise); font: 500 13px/20px var(--f-ui);
}
#tundo[hidden] { display: none; }
#tundo.on { animation: tundo 180ms ease-out both; }
@keyframes tundo { from { opacity: 0; translate: -50% 8px; } to { opacity: 1; translate: -50% 0; } }
.tu-t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tu-b {
  flex: none; height: 36px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: inherit;
  font: 600 13px/36px var(--f-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
@media (hover: hover) { .tu-b:hover { background: color-mix(in srgb, var(--canvas) 14%, transparent); } }
/* On a phone or a tablet (html.pocket) a long press on the canvas selects nothing and calls up no system menu, except
   in a card being typed in (Axio, 2026-10-26). Safari's engine selects a card's words all the same, as they can be
   typed in: touch.js's touchstart guard stops that. */
html.pocket #canvas { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.pocket #canvas .obj:focus-within { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* Hints around a held finger on empty space: which way makes what (Axio, 2026-10-23: a guide, which can be turned off). */
#thint { position: fixed; z-index: 29; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
#thint[hidden] { display: none; }
#thint > span {
  position: absolute; display: flex; flex-direction: column; gap: 1px; padding: 6px 9px 7px; border-radius: 9px; white-space: nowrap;
  font: 500 9.5px/13px var(--f-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2);
  background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--raise-sm), var(--edge);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; scale: .9;
  transition: opacity 160ms ease-out, scale 200ms cubic-bezier(.2, .8, .2, 1), translate 200ms cubic-bezier(.2, .8, .2, 1);
}
#thint b { font-weight: 500; }
#thint > span svg { width: 10px; height: 10px; margin-bottom: 3px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* each at its corner of the finger, its arrow on the side the finger is */
#thint > .h-dr { left: 30px; top: 30px; translate: -6px -6px; }
#thint > .h-ur { left: 30px; bottom: 30px; translate: -6px 6px; }
#thint > .h-ul { right: 30px; bottom: 30px; translate: 6px 6px; align-items: flex-end; text-align: right; }
#thint > .h-dl { right: 30px; top: 30px; translate: 6px -6px; align-items: flex-end; text-align: right; }
#thint.on > span, #thint.m > span { opacity: 1; scale: 1; translate: var(--sh, 0 0); }
#thint.m > span { transition: none; translate: 0 0; }
#thint.on > span:nth-child(2) { transition-delay: 30ms; }
#thint.on > span:nth-child(3) { transition-delay: 60ms; }
#thint.on > span:nth-child(4) { transition-delay: 90ms; }
@media (prefers-reduced-motion: reduce) { #thint > span { transition: opacity 120ms ease-out; scale: 1; translate: var(--sh, 0 0); } }
