html, body { overscroll-behavior: none; }

.sign-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.bar-right { display: flex; align-items: center; gap: 10px; }
footer.bar { border-top: 1px solid var(--line); border-bottom: 0; padding-bottom: max(10px, env(safe-area-inset-bottom)); }

.pad-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 12px 16px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--line);
  overflow: hidden;
}
#pad {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.pad-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #c9c9c4;
  font-size: clamp(20px, 3.2vw, 34px);
  pointer-events: none;
}
.pad-hint.hidden { display: none; }
/* 서명 기준선 — 화면에만 보이고 인쇄되지 않음 */
.pad-line {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 28%;
  border-bottom: 2px dashed #ebebe6;
  pointer-events: none;
}

/* 인쇄 누른 직후 잠깐 뜨는 확인 표시 */
.sent-flash {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 16px 30px;
  border-radius: 999px;
  background: rgba(31, 157, 85, 0.94);
  color: #fff;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 700;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  pointer-events: none;
}
.sent-flash.show { animation: sent-flash 1.1s ease-out forwards; }
@keyframes sent-flash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .sent-flash.show { animation: none; opacity: 1; transform: translate(-50%, -50%); transition: opacity 0.3s 0.8s; }
}

/* 최근 보낸 사인 상태 */
.chips {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.chips .badge { font-size: 0.95rem; padding: 4px 12px; }
.badge.outbox { background: #ecece8; color: var(--muted); }
.badge.retry { background: #fbe5e5; color: var(--err); }

button.big { min-width: 160px; min-height: 56px; font-size: 1.15rem; }

@media (max-width: 760px) {
  .chips .badge:nth-last-child(n + 3) { display: none; }   /* 좁으면 최근 2개만 */
}
@media (max-width: 560px) {
  .bar { padding: 8px 10px; gap: 8px; }
  .pad-wrap { margin: 8px; }
  button.big { min-width: 96px; }
  #fsBtn { display: none; }
}
