.preview-page {
  display: none;
}

.preview-animated .preview-page {
  position: absolute;
  inset: 49px 0 0;
  display: grid;
  place-items: center;
  padding: 48px;
  background: linear-gradient(145deg, #f7f9fc, #eef3f8);
}

.preview-message-box {
  width: min(420px, 88%);
  padding: 16px;
  border: 1px solid #dfe4eb;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 15px 35px rgba(36, 51, 70, .1);
  transition: border-color .25s, box-shadow .25s;
}

.preview-message-box > span {
  display: block;
  margin-bottom: 7px;
  color: #69778b;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.preview-message-box p {
  min-height: 72px;
  margin: 0;
  padding: 11px;
  border: 1px solid #e2e6ec;
  border-radius: 8px;
  color: #314158;
  font-size: 10px;
  line-height: 1.55;
}

.preview-message-box p em {
  color: #a1a9b4;
  font-style: normal;
}

.preview-message-box > b {
  display: block;
  width: max-content;
  margin: 11px 0 0 auto;
  padding: 7px 15px;
  border-radius: 7px;
  background: #ff6819;
  color: #fff;
  font-size: 9px;
}

.preview-page > small {
  position: absolute;
  bottom: 28px;
  color: #8995a5;
  font-size: 9px;
}

.preview-animated.is-field-focused .preview-message-box {
  border-color: #ff9b64;
  box-shadow: 0 0 0 4px rgba(255, 104, 25, .1), 0 15px 35px rgba(36, 51, 70, .1);
}

.preview-animated .board {
  position: absolute;
  inset: 49px 0 0;
  min-height: 0;
  transform: translateY(105%);
  opacity: 0;
  transition: transform .48s cubic-bezier(.2, .8, .2, 1), opacity .28s;
}

.preview-animated.is-board-open .board {
  transform: translateY(0);
  opacity: 1;
}

.preview-animated.is-shortcut .shortcut {
  color: #fff;
  background: #ff6819;
  border-color: #ff6819;
  box-shadow: 0 0 0 4px rgba(255, 104, 25, .15);
}

.preview-search {
  min-width: 72px;
  transition: border-color .2s, color .2s, background .2s;
}

.is-searching .preview-search {
  border-color: #ff9a62;
  background: #fff8f3;
  color: #c64c0b;
}

.preview-choice {
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.is-tile-selected .preview-choice {
  transform: translateY(-3px);
  border-color: #ff8a4c;
  box-shadow: 0 12px 25px rgba(255, 104, 25, .18), 0 0 0 3px rgba(255, 104, 25, .09);
}

.preview-cursor {
  position: absolute;
  left: 42%;
  top: 51%;
  width: 24px;
  height: 31px;
  background: #fff;
  clip-path: polygon(0 0, 0 82%, 7px 65%, 13px 82%, 18px 78%, 12px 61%, 23px 60%);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .55));
  opacity: 0;
  transform: translate(80px, 50px) rotate(-10deg);
  transition: opacity .2s, transform .55s cubic-bezier(.2, .8, .2, 1);
}

.is-cursor-selecting .preview-cursor {
  opacity: 1;
  transform: translate(0, 0) rotate(-10deg);
}

.is-clicking .preview-choice {
  transform: translateY(-1px) scale(.985);
  box-shadow: 0 5px 12px rgba(255, 104, 25, .16), 0 0 0 3px rgba(255, 104, 25, .15);
}

.preview-output.is-filled {
  border-color: #d9e5f1;
  background: #fbfdff;
}

.preview-output.is-filled::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.1em;
  margin-left: 2px;
  background: #ff6819;
  vertical-align: -2px;
  animation: preview-caret .75s steps(1) infinite;
}

@keyframes preview-caret {
  50% { opacity: 0; }
}

@media (max-width: 720px) {
  .preview-animated .preview-page { padding: 25px; }
  .preview-message-box { width: 92%; }
  .preview-page > small { bottom: 18px; }
  .preview-cursor { left: 40%; top: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .preview-output.is-filled::after { animation: none; }
}
