/* CSS paper and dust: no extra image download, fully usable over file://. */
.password-note-wrap {
  margin: 19px 0 14px;
}
.password-note {
  --wipe: 0%;
  position: relative;
  display: block;
  width: 100%;
  min-height: 145px;
  padding: 16px 17px 12px;
  color: #423723;
  text-align: left;
  border: 0;
  border-radius: 1px 4px 2px 1px;
  background:
    radial-gradient(ellipse at 98% 12%, #6d542937, transparent 44%),
    radial-gradient(ellipse at 4% 96%, #805b4538, transparent 36%),
    repeating-linear-gradient(0deg, #775d2620 0 1px, transparent 1px 22px),
    linear-gradient(100deg, #c5b586, #e0d1a8 42%, #d3c393);
  box-shadow:
    0 3px 8px #0005,
    inset 0 0 14px #6a49232b;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
  isolation: isolate;
  transform: rotate(-0.7deg);
}
.password-note:before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 19px;
  height: 19px;
  background: linear-gradient(225deg, #2c353b 48%, #a69772 51%, #d6c99e 100%);
  box-shadow: -1px 1px 1px #66522d28;
}
.password-note:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 5px;
  background: repeating-linear-gradient(
    135deg,
    transparent 0 3px,
    #c9b98d 3px 7px
  );
  z-index: -1;
}
.note-tape {
  position: absolute;
  top: -8px;
  left: 28px;
  width: 70px;
  height: 18px;
  background: #aaa78f9e;
  border-inline: 2px dashed #ede4b94d;
  box-shadow: 0 1px 2px #0002;
  transform: rotate(-4deg);
}
.note-heading {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: center;
  padding-right: 8px;
  font-size: 11px;
  letter-spacing: 0.7px;
  color: #685a3d;
}
.note-heading i {
  font-size: 10px;
  font-style: normal;
  transform: rotate(4deg);
  color: #836745;
}
.note-code-window {
  position: relative;
  display: block;
  isolation: isolate;
  overflow: hidden;
  margin: 8px 0 7px;
  padding: 2px 0;
  min-height: 49px;
}
.note-code {
  display: block;
  position: relative;
  white-space: nowrap;
  font:
    800 italic 35px/1.3 "Segoe Print",
    "Comic Sans MS",
    var(--mono);
  letter-spacing: 8px;
  transform: rotate(-1deg);
  color: #37352d;
  text-shadow: 0.6px 0.5px #3933256b;
}
.note-dust {
  position: absolute;
  z-index: 1;
  inset: -3px -12px -3px var(--wipe);
  background:
    radial-gradient(ellipse at 10% 68%, #b0a68a77, transparent 32%),
    radial-gradient(ellipse at 71% 21%, #4d4c42b3, transparent 53%),
    radial-gradient(ellipse at 44% 82%, #ab9d7e88, transparent 49%),
    radial-gradient(circle at 1px 1px, #393a304d 0 0.6px, transparent 0.9px),
    radial-gradient(circle at 2px 3px, #cbc3a861 0 0.7px, transparent 1px),
    #777567;
  background-size:
    auto,
    auto,
    auto,
    4px 5px,
    7px 6px,
    auto;
  box-shadow: -9px 0 9px 4px #777567;
  transform: rotate(0.7deg);
  pointer-events: none;
}
.wipe-cloth {
  display: none;
  position: absolute;
  z-index: 2;
  top: 7px;
  left: clamp(12px, var(--wipe), calc(100% - 15px));
  width: 36px;
  height: 30px;
  border: 1px solid #c7c7b6;
  border-radius: 7px 3px 8px 4px;
  background:
    repeating-linear-gradient(90deg, #c8cabf77 0 1px, transparent 1px 5px),
    linear-gradient(130deg, #edede0, #c4c3b1);
  box-shadow: 2px 4px 5px #342d2855;
  transform: translateX(-50%) rotate(-14deg);
  pointer-events: none;
}
.wipe-cloth:after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed #898e8155;
  border-radius: 4px;
}
.password-note[data-state="wiping"] .wipe-cloth {
  display: block;
  animation: clothRub 0.24s ease-in-out infinite alternate;
}
.password-note[data-state="wiping"] {
  box-shadow:
    0 1px 4px #0005,
    inset 0 0 14px #6a49232b;
}
.password-note[data-state="clean"] {
  cursor: default;
}
.password-note[data-state="clean"] .note-dust {
  opacity: 0;
}
.note-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  color: #655436;
}
.note-percent {
  font: 700 11px/1.6 var(--mono);
  white-space: nowrap;
}
.note-progress {
  display: block;
  height: 2px;
  background: #8f7b423d;
  margin-top: 6px;
  overflow: hidden;
}
.note-progress > span {
  display: block;
  width: var(--wipe);
  height: 100%;
  background: #6a5e3e;
}
#note-help {
  color: #adbec9;
  font-size: 12px;
  line-height: 1.5;
  margin: 9px 0 0;
}
@keyframes clothRub {
  from {
    transform: translate(-50%, -4px) rotate(-14deg);
  }
  to {
    transform: translate(-50%, 5px) rotate(-4deg);
  }
}
@media (max-width: 430px) {
  .password-note {
    min-height: 132px;
    padding: 14px 12px 10px;
  }
  .note-code {
    font-size: 30px;
    letter-spacing: 6px;
  }
  .note-code-window {
    min-height: 42px;
    margin: 7px 0;
  }
  .note-heading {
    font-size: 11px;
    letter-spacing: 0;
  }
  .note-heading i {
    font-size: 10px;
  }
  .note-footer {
    font-size: 12px;
  }
  .password-note-wrap {
    margin: 17px 0 13px;
  }
  #note-help {
    font-size: 11px;
  }
}
@media (max-width: 359px) {
  .note-code {
    font-size: 27px;
    letter-spacing: 4px;
  }
  .note-heading i {
    display: none;
  }
  .note-footer {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .password-note[data-state="wiping"] .wipe-cloth {
    animation: none;
  }
}
