html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffd23f;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.ot {
  position: relative;
  box-sizing: border-box;
  width: min(300px, 92vw);
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  overflow: hidden;
}

.ot__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px 0;
}

.ot__title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.ot__state {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
}

.ot__view {
  box-sizing: border-box;
  height: 116px;
  margin: 8px 8px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.ot__view::-webkit-scrollbar {
  display: none;
}
.ot__view:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
}

.ot__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 72%;
  gap: 8px;
  width: max-content;
  height: 100%;
  padding: 0 4px;
}

.ot__card {
  box-sizing: border-box;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 12px;
  background: #f0ece2;
  scroll-snap-align: center;
}

.ot__card b {
  font-size: 11px;
  line-height: 1.3;
}

.ot__card span {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  color: #0a4fe8;
}

.ot__card i {
  font-size: 9px;
  font-style: normal;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
}

.ot__shade {
  position: absolute;
  top: 32px;
  bottom: 30px;
  width: 32px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 220ms ease-out;
}

.ot__shade--l {
  left: 8px;
  background: linear-gradient(to right, #fff7e6, rgba(255, 247, 230, 0));
}

.ot__shade--r {
  right: 8px;
  background: linear-gradient(to left, #fff7e6, rgba(255, 247, 230, 0));
  display: grid;
  align-items: end;
  justify-items: center;
}

.ot__shade.is-off {
  opacity: 0;
}

.ot__nudge {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #17141a;
  color: #ffd23f;
  font-size: 13px;
  line-height: 1;
}

.ot__note {
  margin: 0;
  padding: 8px 12px;
  font-size: 10px;
  line-height: 1.4;
  color: rgba(23, 20, 26, 0.72);
}

@keyframes ot-slide {
  0%, 16% {
    transform: translateX(0);
  }
  44%, 72% {
    transform: translateX(-56%);
  }
  92%, 100% {
    transform: translateX(0);
  }
}
@keyframes ot-shade-l {
  0%, 16% {
    opacity: 1;
  }
  20%, 72% {
    opacity: 0;
  }
  80%, 100% {
    opacity: 1;
  }
}
@keyframes ot-shade-r {
  0% {
    opacity: 1;
  }
  44%, 72% {
    opacity: 0;
  }
  80%, 100% {
    opacity: 1;
  }
}
@keyframes ot-nudge {
  0%, 10% {
    transform: translateX(0);
  }
  16% {
    transform: translateX(4px);
  }
  24%, 90% {
    transform: translateX(0);
  }
  94% {
    transform: translateX(4px);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes ot-say {
  0%, 42% {
    opacity: 1;
  }
  43%, 71% {
    opacity: 0.35;
  }
  72%, 100% {
    opacity: 1;
  }
}
.ot.is-demo .ot__track {
  animation-name: ot-slide;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  scroll-snap-type: none;
}
.ot.is-demo .ot__shade--l {
  animation-name: ot-shade-l;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.ot.is-demo .ot__shade--r {
  animation-name: ot-shade-r;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.ot.is-demo .ot__nudge {
  animation-name: ot-nudge;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}
.ot.is-demo .ot__state {
  animation-name: ot-say;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@media (max-width: 340px) {
  .ot__view {
    height: 104px;
  }
  .ot__track {
    grid-auto-columns: 78%;
  }
  .ot__shade {
    width: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ot.is-demo .ot__track,
  .ot.is-demo .ot__nudge,
  .ot.is-demo .ot__state {
    animation: none !important;
    transform: none !important;
  }
  .ot.is-demo .ot__shade--l {
    animation: none !important;
    opacity: 0 !important;
  }
  .ot.is-demo .ot__shade--r {
    animation: none !important;
    opacity: 1 !important;
  }
}
