/* A single completion tool; the impression belongs to the paper document. */
.completion-station,
.completion-record {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed var(--paper-rule, #a8a28a);
  color: #363a2f;
  font-family: var(--mono);
}
.completion-station header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.completion-station h3 {
  margin: 0;
  font: 700 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.11em;
}
.completion-station header > span {
  font-size: 10px;
  color: #676951;
}
.stamp-workspace {
  height: 222px;
  position: relative;
  isolation: isolate;
}
.stamp-target {
  position: absolute;
  top: 96px;
  left: 0;
  width: calc(100% - 184px);
  height: 110px;
  min-width: 140px;
  padding: 12px;
  background: transparent;
  border: 1px solid #8d9279;
  outline: 3px double #9b9d86;
  outline-offset: 4px;
  color: #787c65;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
}
.stamp-target > span:first-child {
  position: absolute;
  top: -8px;
  background: var(--paper, #e6dfc5);
  padding: 0 8px;
  font-size: 9px;
  letter-spacing: 0.1em;
}
.stamp-target-copy {
  font-size: 17px;
  letter-spacing: 0.08em;
  font-weight: 700;
  opacity: 0.5;
}
.stamp-target small {
  font-size: 9px;
  color: #696e58;
}
.physical-stamp {
  position: absolute;
  top: 0;
  left: 0;
  width: 156px;
  height: 176px;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  z-index: 3;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: transform 0.16s ease;
  will-change: transform;
  border-radius: 36px 36px 12px 12px;
  -webkit-tap-highlight-color: transparent;
}
.physical-stamp:focus-visible {
  outline: 2px solid #3e694a !important;
  outline-offset: 0;
}
.physical-stamp canvas,
.stamp-fallback {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: transform 0.15s ease;
  filter: drop-shadow(1px 2px 1px #15221933);
}
.stamp-fallback {
  display: none;
}
.stamp-no-webgl canvas {
  display: none;
}
.stamp-no-webgl .stamp-fallback {
  display: block;
}
.stamp-dragging {
  transition: none;
  cursor: grabbing;
}
.stamp-lifted .physical-stamp canvas,
.stamp-lifted .stamp-fallback {
  transform: translateY(-12px) rotate(-3deg);
}
.stamp-cast-shadow {
  position: absolute;
  width: 128px;
  height: 33px;
  margin-left: -64px;
  margin-top: -5px;
  z-index: 0;
  background: radial-gradient(
    ellipse,
    #25271d65 0%,
    #25271d25 48%,
    transparent 72%
  );
  filter: blur(3px);
  transform: rotate(-10deg);
  pointer-events: none;
  transition:
    opacity 0.15s,
    filter 0.15s;
}
.stamp-lifted .stamp-cast-shadow {
  opacity: 0.55;
  filter: blur(8px);
}
.stamp-over-field .stamp-target,
.stamp-aligned .stamp-target {
  border-color: #3e694a;
  outline-color: #3e694a;
  background: #49754a0b;
  color: #3e694a;
}
.stamp-aligned .stamp-target-copy,
.stamp-aligned .stamp-target small {
  opacity: 0.18;
}
.stamp-dock-label {
  position: absolute;
  right: 20px;
  bottom: 1px;
  font: 700 9px var(--mono);
  letter-spacing: 0.12em;
  color: #6d715b;
  pointer-events: none;
}
.stamp-status {
  min-height: 30px;
  margin: 6px 0 0;
  font: 11px/1.5 var(--mono);
  color: #5d634f;
}
.stamp-pressing .physical-stamp canvas,
.stamp-pressing .stamp-fallback {
  animation: stamp-down 0.32s ease-in-out both;
}
.stamp-pressing .stamp-cast-shadow {
  filter: blur(1px);
  opacity: 0.9;
}
@keyframes stamp-down {
  0% {
    transform: translateY(-14px) rotate(-1deg);
  }
  45%,
  64% {
    transform: translateY(7px) scaleY(0.97);
  }
  100% {
    transform: translateY(-9px);
  }
}
.completion-record {
  min-height: 160px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid #9b9d86;
  padding: 24px 12px 15px;
}
.stamp-field-label {
  position: absolute;
  top: -7px;
  left: 15px;
  background: var(--paper, #e6dfc5);
  padding: 0 7px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.ink-impression {
  color: #355f43;
  transform: rotate(-7deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 3px double currentColor;
  padding: 7px 14px;
  font-family: var(--mono);
  box-shadow: inset 0 0 0 1px #355f4340;
  opacity: 0.88;
  animation: ink-appear 0.2s ease-out both;
  mask-image: repeating-linear-gradient(
    9deg,
    #000 0 2px,
    #000b 2px 3px,
    #000 3px 7px
  );
}
.ink-impression strong {
  font-size: clamp(19px, 3vw, 26px);
  letter-spacing: 0.1em;
  line-height: 1.1;
}
.ink-impression span {
  font-size: 8px;
  letter-spacing: 0.22em;
}
.completion-record > small {
  font-size: 10px;
  line-height: 1.5;
  color: #5e654f;
  text-align: center;
}
.completion-blank {
  min-height: 72px;
  font-size: 11px;
  color: #7d806b;
  border-style: dashed;
}
@keyframes ink-appear {
  from {
    opacity: 0;
    filter: blur(1px);
  }
  to {
    opacity: 0.88;
    filter: blur(0);
  }
}
@media (max-width: 600px) {
  .completion-station header {
    display: block;
  }
  .completion-station header > span {
    display: block;
    margin-top: 7px;
    font-size: 10px;
  }
  .stamp-workspace {
    height: 302px;
  }
  .stamp-target {
    top: 174px;
    width: calc(100% - 10px);
    left: 5px;
    height: 106px;
    min-width: 0;
  }
  .stamp-dock-label {
    top: 145px;
    bottom: auto;
    right: 18px;
    font-size: 8px;
  }
  .stamp-status {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .physical-stamp,
  .physical-stamp canvas,
  .stamp-fallback,
  .stamp-cast-shadow {
    transition: none;
  }
  .stamp-pressing .physical-stamp canvas,
  .stamp-pressing .stamp-fallback,
  .ink-impression {
    animation: none;
  }
}
@media print {
  .completion-station {
    display: none !important;
  }
  .completion-record {
    break-inside: avoid;
  }
  .ink-impression {
    animation: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* Public, disposable test document. It never requests account or workspace data. */
.stamp-demo-shell {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 22px 24px 40px;
}
.stamp-demo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}
.stamp-demo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-decoration: none;
  color: var(--text);
}
.stamp-demo-brand img {
  width: 26px;
  height: 28px;
}
.stamp-demo-top label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.stamp-demo-top select {
  width: auto;
  min-height: 38px;
  padding: 8px 26px 8px 10px;
}
.stamp-demo-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 18px;
  gap: 12px;
}
.stamp-demo-heading h1 {
  font-size: 28px;
  margin: 0;
}
.stamp-demo-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}
.stamp-demo-tray {
  padding: 18px 18px 22px;
  border: 1px solid var(--border);
  background: linear-gradient(130deg, var(--paint-light), var(--paint-dark));
  box-shadow:
    0 2px 12px #0004,
    inset 0 1px 0 #ffffff15;
  border-radius: 4px;
}
.stamp-demo-note {
  font: 10px var(--mono);
  color: var(--muted);
  margin-top: 15px;
}
@media (max-width: 600px) {
  .stamp-demo-shell {
    padding: 16px 12px 28px;
  }
  .stamp-demo-tray {
    padding: 14px 8px;
  }
  .stamp-demo-tray .paper-document {
    padding: 22px 23px;
  }
  .stamp-demo-brand {
    font-size: 13px;
    gap: 6px;
  }
  .stamp-demo-top label {
    font-size: 10px;
  }
  .stamp-demo-top select {
    max-width: 104px;
  }
  .stamp-demo-heading h1 {
    font-size: 24px;
  }
}

.physical-stamp:disabled,
.stamp-target:disabled {
  opacity: 1;
}

.stamp-demo-theme{display:flex;align-items:center;gap:8px}
