:root {
  --bg: #ffffff;
  --ink: #1b1a17;
  --paper: #ffffff;
  --soft: rgba(255, 255, 255, 0.62);
  --accent: #2f8f63;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

/* one pill holding two buttons: the request and, while it can still be taken back, Undo */
.db { position: relative; display: inline-flex; align-items: stretch; height: 56px; padding: 4px; border-radius: 28px; background: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(27, 26, 23, 0.2), 0 18px 30px -16px rgba(27, 26, 23, 0.55); transition: background-color 0.45s ease, box-shadow 0.45s ease; }
.db[data-state="sent"], .db[data-state="done"] { background: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 2px rgba(27, 26, 23, 0.16), 0 18px 30px -16px color-mix(in srgb, var(--accent) 80%, #000000); }

.db__main { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px 0 16px; border: 0; border-radius: 24px; background: transparent; color: var(--paper); font: inherit; font-size: 15.500px; font-weight: 680; font-stretch: 104%; letter-spacing: -0.005em; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.db:not([data-state="idle"]) .db__main { cursor: default; }
.db__main:focus-visible, .db__undo:focus-visible { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--paper); }
@media (hover: hover) { .db[data-state="idle"] .db__main:hover { background: rgba(255, 255, 255, 0.09); } }

.db__ico { flex: none; display: block; width: 26px; height: 26px; }
.db__ico svg { display: block; width: 26px; height: 26px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.600; stroke-linecap: round; stroke-linejoin: round; }
.db__tape, .db__tick { stroke-dasharray: 1; stroke-dashoffset: 1; }
.db__tick { stroke-width: 1.800; }

.db__label { display: block; height: 22px; line-height: 22px; overflow: hidden; }
.db__label span { display: block; white-space: nowrap; }

.db__undo { position: relative; flex: none; width: 0; height: 48px; border: 0; border-radius: 24px; background: rgba(255, 255, 255, 0.18); color: var(--paper); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; outline: none; overflow: hidden; opacity: 0; pointer-events: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color 0.2s ease; }
.db[data-state="sent"] .db__undo { pointer-events: auto; }
.db__undo span { position: absolute; left: 0; top: 0; width: 76px; line-height: 44px; text-align: center; }
/* the time left to take it back */
.db__undo i { position: absolute; left: 16px; bottom: 9px; width: 44px; height: 2.500px; border-radius: 2px; background: rgba(255, 255, 255, 0.28); overflow: hidden; }
.db__undo b { display: block; height: 100%; border-radius: 2px; background: var(--paper); transform-origin: 0 50%; }
@media (hover: hover) { .db__undo:hover { background: rgba(255, 255, 255, 0.28); } }

.db__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #1b1a17; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }
